1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[d3d9] Avoid needless swizzle for A4R4G4B4

Should fix this d3d9 format working on Intel ANV

Impacts #1455
This commit is contained in:
Joshua Ashton 2020-02-16 22:54:28 +00:00
parent 50cf3a465b
commit a6d554615e

View File

@ -39,11 +39,9 @@ namespace dxvk {
VK_IMAGE_ASPECT_COLOR_BIT };
case D3D9Format::A4R4G4B4: return {
VK_FORMAT_R4G4B4A4_UNORM_PACK16,
VK_FORMAT_B4G4R4A4_UNORM_PACK16,
VK_FORMAT_UNDEFINED,
VK_IMAGE_ASPECT_COLOR_BIT,
{ VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_A, VK_COMPONENT_SWIZZLE_R }};
VK_IMAGE_ASPECT_COLOR_BIT };
case D3D9Format::R3G3B2: return {}; // Unsupported
@ -57,11 +55,11 @@ namespace dxvk {
case D3D9Format::A8R3G3B2: return {}; // Unsupported
case D3D9Format::X4R4G4B4: return {
VK_FORMAT_R4G4B4A4_UNORM_PACK16,
VK_FORMAT_B4G4R4A4_UNORM_PACK16,
VK_FORMAT_UNDEFINED,
VK_IMAGE_ASPECT_COLOR_BIT,
{ VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B,
VK_COMPONENT_SWIZZLE_A, VK_COMPONENT_SWIZZLE_ONE }};
{ VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G,
VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_ONE }};
case D3D9Format::A2B10G10R10: return {
VK_FORMAT_A2B10G10R10_UNORM_PACK32, // The A2 is out of place here. This should be investigated.