From 09c29bbdc5167347268f6a78163f30a09032ef1a Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 9 Aug 2017 22:27:41 -0500 Subject: [PATCH] Vulkan: Search by a texture's base format when fetching. --- src/xenia/gpu/vulkan/texture_cache.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index 3190fe38d..018f78693 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -1340,10 +1340,9 @@ bool TextureCache::SetupTextureBinding(VkCommandBuffer command_buffer, // Disabled? // TODO(benvanik): reset sampler. - if (!fetch.type) { - return true; + if (fetch.type != 0x2) { + return false; } - assert_true(fetch.type == 0x2); TextureInfo texture_info; if (!TextureInfo::Prepare(fetch, &texture_info)) { @@ -1356,6 +1355,9 @@ bool TextureCache::SetupTextureBinding(VkCommandBuffer command_buffer, return false; // invalid texture used } + // Search via the base format. + texture_info.texture_format = GetBaseFormat(texture_info.texture_format); + auto texture = Demand(texture_info, command_buffer, completion_fence); auto sampler = Demand(sampler_info); // assert_true(texture != nullptr && sampler != nullptr);