summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Chat <arkolbed@gmail.com>2018-05-04 09:45:42 -0500
committerDr. Chat <arkolbed@gmail.com>2018-05-04 09:45:42 -0500
commitf54ac240a49c91d7c6d65acbf0ab51e69b7c5f19 (patch)
tree9738fa0178911bd0e7bad33a1ce9463556cc7cc8
parent7a3d0b683b1f33908f7467d64a5126075b8de4ee (diff)
[Vulkan] Stupid hack to fix ABGR4 formats.
-rw-r--r--src/xenia/gpu/vulkan/texture_cache.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc
index f79367b64..15369643a 100644
--- a/src/xenia/gpu/vulkan/texture_cache.cc
+++ b/src/xenia/gpu/vulkan/texture_cache.cc
@@ -548,6 +548,12 @@ TextureCache::TextureView* TextureCache::DemandView(Texture* texture,
VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ONE,
VK_COMPONENT_SWIZZLE_IDENTITY,
};
+ if (texture->texture_info.texture_format == TextureFormat::k_4_4_4_4) {
+ swiz_component_map[0] = VK_COMPONENT_SWIZZLE_A;
+ swiz_component_map[1] = VK_COMPONENT_SWIZZLE_B;
+ swiz_component_map[2] = VK_COMPONENT_SWIZZLE_G;
+ swiz_component_map[3] = VK_COMPONENT_SWIZZLE_R;
+ }
view_info.components = {
swiz_component_map[(swizzle >> 0) & 0x7],