diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2018-05-16 22:04:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-16 22:04:20 +0200 |
| commit | 8fa8aa3e1b31078a9ccf403a41fff622f77bfcaf (patch) | |
| tree | 4aa8ff271902d1dfdd57e2bdc20fdb44fdf3f95a /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | 8ca1bf52c98b903caeb398c4d61964078f7b43df (diff) | |
| parent | 011ee110bc2bd4783501a3a978e3206a1960aa79 (diff) | |
Merge pull request #6870 from lioncash/hash
Common/Hash: Namespace code under the Common namespace
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 345770bba2..bf9dc98b9d 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -81,7 +81,7 @@ TextureCacheBase::TextureCacheBase() HiresTexture::Init(); - SetHash64Function(); + Common::SetHash64Function(); InvalidateAllBindPoints(); } @@ -733,13 +733,13 @@ TextureCacheBase::GetTexture(u32 address, u32 width, u32 height, const TextureFo // TODO: This doesn't hash GB tiles for preloaded RGBA8 textures (instead, it's hashing more data // from the low tmem bank than it should) - base_hash = GetHash64(src_data, texture_size, textureCacheSafetyColorSampleSize); + base_hash = Common::GetHash64(src_data, texture_size, textureCacheSafetyColorSampleSize); u32 palette_size = 0; if (isPaletteTexture) { palette_size = TexDecoder_GetPaletteSize(texformat); - full_hash = - base_hash ^ GetHash64(&texMem[tlutaddr], palette_size, textureCacheSafetyColorSampleSize); + full_hash = base_hash ^ Common::GetHash64(&texMem[tlutaddr], palette_size, + textureCacheSafetyColorSampleSize); } else { @@ -1225,17 +1225,17 @@ std::optional<TextureLookupInformation> TextureCacheBase::ComputeTextureInformat // TODO: This doesn't hash GB tiles for preloaded RGBA8 textures (instead, it's hashing more data // from the low tmem bank than it should) - tex_info.base_hash = GetHash64(tex_info.src_data, tex_info.total_bytes, - tex_info.texture_cache_safety_color_sample_size); + tex_info.base_hash = Common::GetHash64(tex_info.src_data, tex_info.total_bytes, + tex_info.texture_cache_safety_color_sample_size); tex_info.is_palette_texture = IsColorIndexed(tex_format); if (tex_info.is_palette_texture) { tex_info.palette_size = TexDecoder_GetPaletteSize(tex_format); - tex_info.full_hash = - tex_info.base_hash ^ GetHash64(&texMem[tex_info.tlut_address], tex_info.palette_size, - tex_info.texture_cache_safety_color_sample_size); + tex_info.full_hash = tex_info.base_hash ^ + Common::GetHash64(&texMem[tex_info.tlut_address], tex_info.palette_size, + tex_info.texture_cache_safety_color_sample_size); } else { @@ -2043,7 +2043,7 @@ u64 TextureCacheBase::TCacheEntry::CalculateHash() const u8* ptr = Memory::GetPointer(addr); if (memory_stride == BytesPerRow()) { - return GetHash64(ptr, size_in_bytes, HashSampleSize()); + return Common::GetHash64(ptr, size_in_bytes, HashSampleSize()); } else { @@ -2062,7 +2062,7 @@ u64 TextureCacheBase::TCacheEntry::CalculateHash() const { // Multiply by a prime number to mix the hash up a bit. This prevents identical blocks from // canceling each other out - temp_hash = (temp_hash * 397) ^ GetHash64(ptr, BytesPerRow(), samples_per_row); + temp_hash = (temp_hash * 397) ^ Common::GetHash64(ptr, BytesPerRow(), samples_per_row); ptr += memory_stride; } return temp_hash; |
