Skip to content

Commit

Permalink
[dxgi] Fixed packed 16-bit format mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Apr 8, 2018
1 parent acaf6c9 commit 83a0eda
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/dxgi/dxgi_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ namespace dxvk {
{ 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);
AddColorFormat (DXGI_FORMAT_B5G6R5_UNORM, VK_FORMAT_R5G6B5_UNORM_PACK16);
AddColorFormat (DXGI_FORMAT_B5G5R5A1_UNORM, VK_FORMAT_A1R5G5B5_UNORM_PACK16);

AddColorFormatTypeless(DXGI_FORMAT_B8G8R8A8_TYPELESS, VK_FORMAT_B8G8R8A8_UNORM);
AddColorFormat (DXGI_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_UNORM);
Expand All @@ -383,7 +383,9 @@ namespace dxvk {

// AddColorFormat(DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, VK_FORMAT_UNDEFINED);

AddColorFormat (DXGI_FORMAT_B4G4R4A4_UNORM, VK_FORMAT_B4G4R4A4_UNORM_PACK16);
AddColorFormat (DXGI_FORMAT_B4G4R4A4_UNORM, VK_FORMAT_B4G4R4A4_UNORM_PACK16,
{ VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_R,
VK_COMPONENT_SWIZZLE_A, VK_COMPONENT_SWIZZLE_B });

/***********************************************************************************/
/* B L O C K F O R M A T S */
Expand Down

0 comments on commit 83a0eda

Please sign in to comment.