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.
This commit is contained in:
Unknown W. Brackets committed 2015-12-30 13:31:16 -08:00
1 parent 6856fbbef7
commit 1f5813dd82
1 file changed
+7
+7
View File
@@ -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++;