From 868e55ede71cbe454a233093113070dd164fd5fb Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 1 Mar 2018 10:45:46 +0100 Subject: [PATCH] [dxgi] Added support for 422 formats Untested, but should fix error messages in some engines. --- src/dxgi/dxgi_adapter.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dxgi/dxgi_adapter.cpp b/src/dxgi/dxgi_adapter.cpp index e06b09d7..16fee52b 100644 --- a/src/dxgi/dxgi_adapter.cpp +++ b/src/dxgi/dxgi_adapter.cpp @@ -313,8 +313,14 @@ namespace dxvk { // AddColorFormat(DXGI_FORMAT_R1_UNORM, VK_FORMAT_UNDEFINED); AddColorFormat (DXGI_FORMAT_R9G9B9E5_SHAREDEXP, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32); -// AddColorFormat(DXGI_FORMAT_R8G8_B8G8_UNORM, VK_FORMAT_UNDEFINED); -// AddColorFormat(DXGI_FORMAT_G8R8_G8B8_UNORM, VK_FORMAT_UNDEFINED); + + AddColorFormat (DXGI_FORMAT_R8G8_B8G8_UNORM, VK_FORMAT_B8G8R8G8_422_UNORM_KHR, + { VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_G, + VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_ONE }); + + AddColorFormat (DXGI_FORMAT_G8R8_G8B8_UNORM, VK_FORMAT_G8B8G8R8_422_UNORM_KHR, + { VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_G, + VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_ONE }); AddColorFormat (DXGI_FORMAT_B5G6R5_UNORM, VK_FORMAT_B5G6R5_UNORM_PACK16); AddColorFormat (DXGI_FORMAT_B5G5R5A1_UNORM, VK_FORMAT_B5G5R5A1_UNORM_PACK16);