From ce129d41723882b3d1347067cb3557c9398e0ed5 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 17 Jan 2018 01:13:46 +0100 Subject: [PATCH] [dxgi] Fixed DXGI_FORMAT_A8_UNORM component mapping --- src/dxgi/dxgi_adapter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index 343cd2736..6907612ae 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -138,8 +138,11 @@ namespace dxvk { if (mode != DxgiFormatMode::Depth) { auto color = m_colorFormats.find(format); - if (color != m_colorFormats.end()) + if (color != m_colorFormats.end()) { + if (color->second.format == static_cast(38)) + Logger::err(str::format(format)); return color->second; + } } if (mode != DxgiFormatMode::Color) { @@ -290,8 +293,8 @@ namespace dxvk { AddColorFormat(DXGI_FORMAT_R8_SINT, VK_FORMAT_R8_SINT); AddColorFormat(DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM, - { VK_COMPONENT_SWIZZLE_ONE, VK_COMPONENT_SWIZZLE_ONE, - VK_COMPONENT_SWIZZLE_ONE, VK_COMPONENT_SWIZZLE_R }); + { VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO, + VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_R }); // AddColorFormat(DXGI_FORMAT_R1_UNORM, VK_FORMAT_UNDEFINED);