From fd34a2e74d7b1c19a12b28d73c9caee9ce47f0b7 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 23 Apr 2013 23:02:55 -0700 Subject: [PATCH] More aggressively decimate the second texcache. --- GPU/GLES/TextureCache.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/TextureCache.cpp b/GPU/GLES/TextureCache.cpp index d244d17c97..e4a72e38d7 100644 --- a/GPU/GLES/TextureCache.cpp +++ b/GPU/GLES/TextureCache.cpp @@ -28,6 +28,8 @@ // If a texture hasn't been seen for this many frames, get rid of it. #define TEXTURE_KILL_AGE 200 +// These are cache misses, kill them quicker. +#define TEXTURE_SECOND_KILL_AGE 30 u32 RoundUpToPowerOf2(u32 v) { @@ -89,7 +91,7 @@ void TextureCache::Decimate() { ++iter; } for (TexCache::iterator iter = secondCache.begin(), end = secondCache.end(); iter != end; ) { - if (iter->second.lastFrame + TEXTURE_KILL_AGE < gpuStats.numFrames) { + if (iter->second.lastFrame + TEXTURE_SECOND_KILL_AGE < gpuStats.numFrames) { glDeleteTextures(1, &iter->second.texture); secondCache.erase(iter++); }