Skip to content
Permalink
Browse files

VideoBackends: Fix GPU decoding of XFB buffers

Was using UNORM instead of UINT, resulting in invalid values.
  • Loading branch information...
stenzek committed Feb 28, 2019
1 parent db67630 commit 21d81f99ff9d51cb1dd845260e8655753bf0db4b
@@ -108,7 +108,7 @@ bool VertexManager::Initialize()
format_mapping = {{
{TEXEL_BUFFER_FORMAT_R8_UINT, DXGI_FORMAT_R8_UINT},
{TEXEL_BUFFER_FORMAT_R16_UINT, DXGI_FORMAT_R16_UINT},
{TEXEL_BUFFER_FORMAT_RGBA8_UINT, DXGI_FORMAT_R8G8B8A8_UNORM},
{TEXEL_BUFFER_FORMAT_RGBA8_UINT, DXGI_FORMAT_R8G8B8A8_UINT},
{TEXEL_BUFFER_FORMAT_R32G32_UINT, DXGI_FORMAT_R32G32_UINT},
}};
for (const auto& it : format_mapping)
@@ -75,7 +75,7 @@ bool VertexManager::Initialize()
format_mapping = {{
{TEXEL_BUFFER_FORMAT_R8_UINT, GL_R8UI},
{TEXEL_BUFFER_FORMAT_R16_UINT, GL_R16UI},
{TEXEL_BUFFER_FORMAT_RGBA8_UINT, GL_RGBA8},
{TEXEL_BUFFER_FORMAT_RGBA8_UINT, GL_RGBA8UI},
{TEXEL_BUFFER_FORMAT_R32G32_UINT, GL_RG32UI},
}};
glGenTextures(static_cast<GLsizei>(m_texel_buffer_views.size()), m_texel_buffer_views.data());
@@ -101,7 +101,7 @@ bool VertexManager::Initialize()
format_mapping = {{
{TEXEL_BUFFER_FORMAT_R8_UINT, VK_FORMAT_R8_UINT},
{TEXEL_BUFFER_FORMAT_R16_UINT, VK_FORMAT_R16_UINT},
{TEXEL_BUFFER_FORMAT_RGBA8_UINT, VK_FORMAT_R8G8B8A8_UNORM},
{TEXEL_BUFFER_FORMAT_RGBA8_UINT, VK_FORMAT_R8G8B8A8_UINT},
{TEXEL_BUFFER_FORMAT_R32G32_UINT, VK_FORMAT_R32G32_UINT},
}};
for (const auto& it : format_mapping)

0 comments on commit 21d81f9

Please sign in to comment.
You can’t perform that action at this time.