From 8ddd833c8381d0d8352c06d77542471373927b94 Mon Sep 17 00:00:00 2001 From: dsprogrammingprojects Date: Tue, 12 May 2026 11:59:23 -0700 Subject: [PATCH 1/2] Texture Replacement for Double Wildcard Address Only addition for Texture Replacement --- GPU/Common/TextureReplacer.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/GPU/Common/TextureReplacer.cpp b/GPU/Common/TextureReplacer.cpp index 660f00678b..05151d11fa 100644 --- a/GPU/Common/TextureReplacer.cpp +++ b/GPU/Common/TextureReplacer.cpp @@ -929,7 +929,16 @@ static typename std::unordered_map::const_iterator LookupWildcard(co // Anything with this data hash (a little dangerous.) key.cachekey = 0; key.hash = hash; - return map.find(key); + alias = map.find(key); + if (alias != map.end()) + return alias; + + if (!ignoreAddress) { + // Address Only. + key.cachekey = cachekey & ~0xFFFFFFFFULL; + key.hash = 0; + return map.find(key); + } } bool TextureReplacer::FindFiltering(u64 cachekey, u32 hash, TextureFiltering *forceFiltering) { From b5524db1b486de4909178278d851e0038b61e88d Mon Sep 17 00:00:00 2001 From: dsprogrammingprojects Date: Tue, 12 May 2026 15:12:21 -0700 Subject: [PATCH 2/2] Update TextureReplacer.cpp Moved addition to above final check for Clang to pass on final return --- GPU/Common/TextureReplacer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/GPU/Common/TextureReplacer.cpp b/GPU/Common/TextureReplacer.cpp index 05151d11fa..d50c4c24a5 100644 --- a/GPU/Common/TextureReplacer.cpp +++ b/GPU/Common/TextureReplacer.cpp @@ -926,19 +926,19 @@ static typename std::unordered_map::const_iterator LookupWildcard(co return alias; } - // Anything with this data hash (a little dangerous.) - key.cachekey = 0; - key.hash = hash; - alias = map.find(key); - if (alias != map.end()) - return alias; - if (!ignoreAddress) { // Address Only. key.cachekey = cachekey & ~0xFFFFFFFFULL; key.hash = 0; - return map.find(key); + alias = map.find(key); + if (alias != map.end()) + return alias; } + + // Anything with this data hash (a little dangerous.) + key.cachekey = 0; + key.hash = hash; + return map.find(key); } bool TextureReplacer::FindFiltering(u64 cachekey, u32 hash, TextureFiltering *forceFiltering) {