From ca6e4635aa32a724296d4804c63a4a530d79ed21 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 13 Apr 2014 16:25:09 -0700 Subject: [PATCH] Fix texture cache invalidation. --- GPU/GLES/TextureCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 1f1e90cf76..be9ca20a5a 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -138,8 +138,8 @@ void TextureCache::Invalidate(u32 addr, int size, GPUInvalidationType type) { // They could invalidate inside the texture, let's just give a bit of leeway. const int LARGEST_TEXTURE_SIZE = 512 * 512 * 4; - u64 startKey = addr - LARGEST_TEXTURE_SIZE; - u64 endKey = addr + size + LARGEST_TEXTURE_SIZE; + u64 startKey = (u64)(addr - LARGEST_TEXTURE_SIZE) << 32; + u64 endKey = (u64)(addr + size + LARGEST_TEXTURE_SIZE) << 32; for (TexCache::iterator iter = cache.lower_bound(startKey), end = cache.upper_bound(endKey); iter != end; ++iter) { u32 texAddr = iter->second.addr; u32 texEnd = iter->second.addr + iter->second.sizeInRAM;