From a353ead3cb489e404ab747b06eab37c7c4b35a08 Mon Sep 17 00:00:00 2001 From: degasus Date: Wed, 14 Jan 2015 20:25:40 +0100 Subject: [PATCH] CustomTexture: Use always safe texture hash --- Source/Core/Common/Hash.h | 2 +- Source/Core/VideoCommon/HiresTextures.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/Hash.h b/Source/Core/Common/Hash.h index 841a10386b..1aa2eefa81 100644 --- a/Source/Core/Common/Hash.h +++ b/Source/Core/Common/Hash.h @@ -13,7 +13,7 @@ u32 HashAdler32(const u8* data, size_t len); // Fairly accurate, slightl u32 HashFNV(const u8* ptr, int length); // Another fast and decent hash u32 HashEctor(const u8* ptr, int length); // JUNK. DO NOT USE FOR NEW THINGS u64 GetCRC32(const u8 *src, int len, u32 samples); // SSE4.2 version of CRC32 -u64 GetHashHiresTexture(const u8 *src, int len, u32 samples); +u64 GetHashHiresTexture(const u8 *src, int len, u32 samples = 0); u64 GetMurmurHash3(const u8 *src, int len, u32 samples); u64 GetHash64(const u8 *src, int len, u32 samples); void SetHash64Function(); diff --git a/Source/Core/VideoCommon/HiresTextures.cpp b/Source/Core/VideoCommon/HiresTextures.cpp index 9e81c6891b..ec678f8c50 100644 --- a/Source/Core/VideoCommon/HiresTextures.cpp +++ b/Source/Core/VideoCommon/HiresTextures.cpp @@ -118,12 +118,12 @@ std::string HiresTexture::GenBaseName(const u8* texture, size_t texture_size, co tlut += 2 * min; } - u64 tex_hash = GetHashHiresTexture(texture, (int)texture_size, g_ActiveConfig.iSafeTextureCache_ColorSamples); + u64 tex_hash = GetHashHiresTexture(texture, (int)texture_size); u64 tlut_hash = 0; u64 hash = tex_hash; if (tlut_size) { - tlut_hash = GetHashHiresTexture(tlut, (int)tlut_size, g_ActiveConfig.iSafeTextureCache_ColorSamples); + tlut_hash = GetHashHiresTexture(tlut, (int)tlut_size); hash ^= tlut_hash; } return StringFromFormat("%s_%08x_%i", SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str(), (u32)hash, (u16)format);