libs/vkd3d: Implement DXGI_FORMAT_A8_UNORM.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2018-02-13 13:15:03 +01:00
committed by Alexandre Julliard
parent d1e62117ea
commit 850f09e703
2 changed files with 8 additions and 0 deletions

View File

@@ -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;