rsx: Properly handle conversion of G8B8 and related formats

- These formats are 16-bit packed, not separate 8-bit channels. Conversion requires byteswap for them.
This commit is contained in:
kd-11 2020-06-16 21:24:05 +03:00 committed by kd-11
parent 83d818d96f
commit c764925b4d
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ namespace gl
case texture::internal_format::r32f:
return { GL_RED, GL_FLOAT, 4, true };
case texture::internal_format::rg8:
return { GL_RG, GL_UNSIGNED_BYTE, 1, false };
return { GL_RG, GL_UNSIGNED_SHORT, 2, true };
case texture::internal_format::rg16:
return { GL_RG, GL_UNSIGNED_SHORT, 2, true };
case texture::internal_format::rg16f:

View File

@ -394,8 +394,6 @@ namespace vk
{
//8-bit
case VK_FORMAT_R8_UNORM:
case VK_FORMAT_R8G8_UNORM:
case VK_FORMAT_R8G8_SNORM:
case VK_FORMAT_A8B8G8R8_UNORM_PACK32:
case VK_FORMAT_R8G8B8A8_UNORM:
return{ false, 1 };
@ -406,6 +404,8 @@ namespace vk
case VK_FORMAT_R16_UINT:
case VK_FORMAT_R16_SFLOAT:
case VK_FORMAT_R16_UNORM:
case VK_FORMAT_R8G8_UNORM:
case VK_FORMAT_R8G8_SNORM:
case VK_FORMAT_R16G16_UNORM:
case VK_FORMAT_R16G16_SFLOAT:
case VK_FORMAT_R16G16B16A16_SFLOAT: