summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@gmail.com>2012-06-20 16:43:13 +0200
committerNeoBrainX <NeoBrainX@gmail.com>2012-06-20 18:18:21 +0200
commitcc0523e55be8cbb3fb7dcc0815b002f832f1385b (patch)
treeb81af80e247e7ec4397e4d7c521cb13c6de91271 /Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
parent7dabba5095fd2a939d4ff8eeab8781240f65e149 (diff)
TextureCache: Properly assign texture hashes when EFB to RAM is used without caching.
Fixes issue 5472.
Diffstat (limited to 'Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
index 0e43eb013d..5f82a18fc0 100644
--- a/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
+++ b/Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
@@ -159,13 +159,15 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
u8* dst = Memory::GetPointer(dstAddr);
size_t encoded_size = g_encoder->Encode(dst, dstFormat, srcFormat, srcRect, isIntensity, scaleByHalf);
- hash = GetHash64(dst, (int)encoded_size, g_ActiveConfig.iSafeTextureCache_ColorSamples);
+ u64 hash = GetHash64(dst, (int)encoded_size, g_ActiveConfig.iSafeTextureCache_ColorSamples);
// Mark texture entries in destination address range dynamic unless caching is enabled and the texture entry is up to date
if (!g_ActiveConfig.bEFBCopyCacheEnable)
TextureCache::MakeRangeDynamic(addr, (u32)encoded_size);
else if (!TextureCache::Find(addr, hash))
TextureCache::MakeRangeDynamic(addr, (u32)encoded_size);
+
+ this->hash = hash;
}
}