1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 02:52:10 +01:00

[dxgi] Fixed DXGI_FORMAT_A8_UNORM component mapping

This commit is contained in:
Philip Rebohle 2018-01-17 01:13:46 +01:00
parent b3cd126d0f
commit ce129d4172
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -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<VkFormat>(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);