From f54ac240a49c91d7c6d65acbf0ab51e69b7c5f19 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Fri, 4 May 2018 09:45:42 -0500 Subject: [PATCH] [Vulkan] Stupid hack to fix ABGR4 formats. --- src/xenia/gpu/vulkan/texture_cache.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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],