From 1f5813dd823ee3b754e28ffb309ef79879bbe15d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 30 Dec 2015 13:31:16 -0800 Subject: [PATCH] Mark frequently, but known, changed textures. We don't have to rehash these, but they still may be too slow to upscale. May help #6031. --- GPU/GLES/TextureCache.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index 79a013bea0..d5b7c907c0 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -242,6 +242,13 @@ void TextureCache::Invalidate(u32 addr, int size, GPUInvalidationType type) { gpuStats.numTextureInvalidations++; // Start it over from 0 (unless it's safe.) iter->second.numFrames = type == GPU_INVALIDATE_SAFE ? 256 : 0; + if (type == GPU_INVALIDATE_SAFE) { + u32 diff = gpuStats.numFlips - iter->second.lastFrame; + // We still need to mark if the texture is frequently changing, even if it's safely changing. + if (diff < TEXCACHE_FRAME_CHANGE_FREQUENT) { + iter->second.status |= TexCacheEntry::STATUS_CHANGE_FREQUENT; + } + } iter->second.framesUntilNextFullHash = 0; } else if (!iter->second.framebuffer) { iter->second.invalidHint++;