diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp index c1a34cca53..c58142baa5 100644 --- a/Core/TextureReplacer.cpp +++ b/Core/TextureReplacer.cpp @@ -160,7 +160,7 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, GETextureForm const u32 *checkp = (const u32 *)Memory::GetPointer(addr); switch (hash_) { case ReplacedTextureHash::QUICK: - return DoQuickTexHash(checkp, sizeInRAM); + return StableQuickTexHash(checkp, sizeInRAM); default: return 0; } diff --git a/GPU/Common/TextureDecoder.cpp b/GPU/Common/TextureDecoder.cpp index 961dca9f36..bb0afee365 100644 --- a/GPU/Common/TextureDecoder.cpp +++ b/GPU/Common/TextureDecoder.cpp @@ -301,6 +301,7 @@ void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 #ifndef _M_SSE #ifndef ARM64 QuickTexHashFunc DoQuickTexHash = &QuickTexHashBasic; +QuickTexHashFunc StableQuickTexHash = &QuickTexHashNonSSE; UnswizzleTex16Func DoUnswizzleTex16 = &DoUnswizzleTex16Basic; ReliableHash32Func DoReliableHash32 = &XXH32; ReliableHash64Func DoReliableHash64 = &XXH64; @@ -312,6 +313,7 @@ void SetupTextureDecoder() { #ifdef HAVE_ARMV7 if (cpu_info.bNEON) { DoQuickTexHash = &QuickTexHashNEON; + StableQuickTexHash = &QuickTexHashNEON; DoUnswizzleTex16 = &DoUnswizzleTex16NEON; #ifndef IOS // Not sure if this is safe on iOS, it's had issues with xxhash. diff --git a/GPU/Common/TextureDecoder.h b/GPU/Common/TextureDecoder.h index d3ddca9475..6b20498e1b 100644 --- a/GPU/Common/TextureDecoder.h +++ b/GPU/Common/TextureDecoder.h @@ -39,6 +39,7 @@ void DoSwizzleTex16(const u32 *ysrcp, u8 *texptr, int bxc, int byc, u32 pitch); #if defined(_M_SSE) u32 QuickTexHashSSE2(const void *checkp, u32 size); #define DoQuickTexHash QuickTexHashSSE2 +#define StableQuickTexHash QuickTexHashSSE2 // Pitch must be aligned to 16 bits (as is the case on a PSP) void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch); @@ -59,6 +60,7 @@ typedef u32 ReliableHashType; // For ARM64, NEON is mandatory, so we also statically link. #elif defined(ARM64) #define DoQuickTexHash QuickTexHashNEON +#define StableQuickTexHash QuickTexHashNEON #define DoUnswizzleTex16 DoUnswizzleTex16NEON #define DoReliableHash32 ReliableHash32NEON @@ -71,6 +73,7 @@ typedef u64 ReliableHashType; #else typedef u32 (*QuickTexHashFunc)(const void *checkp, u32 size); extern QuickTexHashFunc DoQuickTexHash; +extern QuickTexHashFunc StableQuickTexHash; typedef void (*UnswizzleTex16Func)(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch); extern UnswizzleTex16Func DoUnswizzleTex16;