diff --git a/Core/TextureReplacer.cpp b/Core/TextureReplacer.cpp index 16f0374fc4..7cdb34c23a 100644 --- a/Core/TextureReplacer.cpp +++ b/Core/TextureReplacer.cpp @@ -246,9 +246,9 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, GETextureForm case ReplacedTextureHash::QUICK: return StableQuickTexHash(checkp, sizeInRAM); case ReplacedTextureHash::XXH32: - return DoReliableHash32(checkp, sizeInRAM, 0xBACD7814); + return XXH32(checkp, sizeInRAM, 0xBACD7814); case ReplacedTextureHash::XXH64: - return DoReliableHash64(checkp, sizeInRAM, 0xBACD7814); + return XXH64(checkp, sizeInRAM, 0xBACD7814); default: return 0; } @@ -269,7 +269,7 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, GETextureForm case ReplacedTextureHash::XXH32: for (int y = 0; y < h; ++y) { - u32 rowHash = DoReliableHash32(checkp, bytesPerLine, 0xBACD7814); + u32 rowHash = XXH32(checkp, bytesPerLine, 0xBACD7814); result = (result * 11) ^ rowHash; checkp += stride; } @@ -277,7 +277,7 @@ u32 TextureReplacer::ComputeHash(u32 addr, int bufw, int w, int h, GETextureForm case ReplacedTextureHash::XXH64: for (int y = 0; y < h; ++y) { - u32 rowHash = DoReliableHash64(checkp, bytesPerLine, 0xBACD7814); + u32 rowHash = XXH64(checkp, bytesPerLine, 0xBACD7814); result = (result * 11) ^ rowHash; checkp += stride; } diff --git a/GPU/Common/TextureDecoder.h b/GPU/Common/TextureDecoder.h index dd01b65bce..803c6c3929 100644 --- a/GPU/Common/TextureDecoder.h +++ b/GPU/Common/TextureDecoder.h @@ -45,31 +45,11 @@ u32 QuickTexHashSSE2(const void *checkp, u32 size); void DoUnswizzleTex16Basic(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch); #define DoUnswizzleTex16 DoUnswizzleTex16Basic -#include "ext/xxhash.h" -#define DoReliableHash32 XXH32 -#define DoReliableHash64 XXH64 - -#if defined(_M_X64) || defined(ARM64) -#define DoReliableHash XXH64 -typedef u64 ReliableHashType; -#else -#define DoReliableHash XXH32 -typedef u32 ReliableHashType; -#endif - // For ARM64, NEON is mandatory, so we also statically link. #elif PPSSPP_ARCH(ARM64) || defined(ARM64) #define DoQuickTexHash QuickTexHashNEON #define StableQuickTexHash QuickTexHashNEON #define DoUnswizzleTex16 DoUnswizzleTex16NEON - -#include "ext/xxhash.h" -#define DoReliableHash32 XXH32 -#define DoReliableHash64 XXH64 - -#define DoReliableHash XXH64 -typedef u64 ReliableHashType; - #else typedef u32 (*QuickTexHashFunc)(const void *checkp, u32 size); extern QuickTexHashFunc DoQuickTexHash; @@ -77,13 +57,6 @@ extern QuickTexHashFunc StableQuickTexHash; typedef void (*UnswizzleTex16Func)(const u8 *texptr, u32 *ydestp, int bxc, int byc, u32 pitch); extern UnswizzleTex16Func DoUnswizzleTex16; - -#include "ext/xxhash.h" -#define DoReliableHash32 XXH32 -#define DoReliableHash64 XXH64 - -#define DoReliableHash XXH32 -typedef u32 ReliableHashType; #endif CheckAlphaResult CheckAlphaRGBA8888Basic(const u32 *pixelData, int stride, int w, int h); diff --git a/GPU/D3D11/TextureCacheD3D11.cpp b/GPU/D3D11/TextureCacheD3D11.cpp index 0b59f6daed..9b6ad9b70c 100644 --- a/GPU/D3D11/TextureCacheD3D11.cpp +++ b/GPU/D3D11/TextureCacheD3D11.cpp @@ -209,7 +209,7 @@ void TextureCacheD3D11::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBa const u32 clutExtendedBytes = std::min(clutTotalBytes_ + clutBaseBytes, clutMaxBytes_); if (replacer_.Enabled()) - clutHash_ = DoReliableHash32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); + clutHash_ = XXH32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); else clutHash_ = XXH3_64bits((const char *)clutBufRaw_, clutExtendedBytes) & 0xFFFFFFFF; clutBuf_ = clutBufRaw_; diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index 4c0d6c4c9a..c5e70491ef 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -251,7 +251,7 @@ void TextureCacheDX9::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase const u32 clutExtendedBytes = std::min(clutTotalBytes_ + clutBaseBytes, clutMaxBytes_); if (replacer_.Enabled()) - clutHash_ = DoReliableHash32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); + clutHash_ = XXH32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); else clutHash_ = XXH3_64bits((const char *)clutBufRaw_, clutExtendedBytes) & 0xFFFFFFFF; clutBuf_ = clutBufRaw_; diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index ee9db82361..17c2acd6f5 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -250,7 +250,7 @@ void TextureCacheGLES::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBas const u32 clutExtendedBytes = std::min(clutTotalBytes_ + clutBaseBytes, clutMaxBytes_); if (replacer_.Enabled()) - clutHash_ = DoReliableHash32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); + clutHash_ = XXH32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); else clutHash_ = XXH3_64bits((const char *)clutBufRaw_, clutExtendedBytes) & 0xFFFFFFFF; diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 6f0bc779b4..bf51e1f74e 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -508,7 +508,7 @@ void TextureCacheVulkan::UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutB const u32 clutExtendedBytes = std::min(clutTotalBytes_ + clutBaseBytes, clutMaxBytes_); if (replacer_.Enabled()) - clutHash_ = DoReliableHash32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); + clutHash_ = XXH32((const char *)clutBufRaw_, clutExtendedBytes, 0xC0108888); else clutHash_ = XXH3_64bits((const char *)clutBufRaw_, clutExtendedBytes) & 0xFFFFFFFF; clutBuf_ = clutBufRaw_;