From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/resource.c | 7 +++++++ libs/vkd3d/utils.c | 1 + 2 files changed, 8 insertions(+)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 712ff9c748f6..77f4f0d14a9b 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1001,6 +1001,13 @@ static VkResult vkd3d_create_texture_view(struct d3d12_device *device, view_desc.components.b = VK_COMPONENT_SWIZZLE_ZERO; view_desc.components.a = VK_COMPONENT_SWIZZLE_ZERO; } + else if (format->dxgi_format == DXGI_FORMAT_A8_UNORM) + { + view_desc.components.r = VK_COMPONENT_SWIZZLE_ZERO; + view_desc.components.g = VK_COMPONENT_SWIZZLE_ZERO; + view_desc.components.b = VK_COMPONENT_SWIZZLE_ZERO; + view_desc.components.a = VK_COMPONENT_SWIZZLE_R; + } else { view_desc.components.r = VK_COMPONENT_SWIZZLE_R; diff --git a/libs/vkd3d/utils.c b/libs/vkd3d/utils.c index a326cae583ac..b3a8027b6048 100644 --- a/libs/vkd3d/utils.c +++ b/libs/vkd3d/utils.c @@ -50,6 +50,7 @@ static const struct vkd3d_format vkd3d_formats[] = {DXGI_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM, 1, 1, 1, 1, COLOR}, {DXGI_FORMAT_R8_UINT, VK_FORMAT_R8_UINT, 1, 1, 1, 1, COLOR}, {DXGI_FORMAT_R8_SNORM, VK_FORMAT_R8_SNORM, 1, 1, 1, 1, COLOR}, + {DXGI_FORMAT_A8_UNORM, VK_FORMAT_R8_UNORM, 1, 1, 1, 1, COLOR}, {DXGI_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR}, {DXGI_FORMAT_B8G8R8A8_TYPELESS, VK_FORMAT_B8G8R8A8_UNORM, 4, 1, 1, 1, COLOR}, {DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, VK_FORMAT_B8G8R8A8_SRGB, 4, 1, 1, 1, COLOR},