TextureCacheBase: Do not assume EFB copies can safely be deleted when we think they're "unused".

Fixes issue 6040.
This commit is contained in:
NeoBrainX 2013-02-25 12:36:50 +00:00
parent 0554ce927e
commit 1141af64f6

View File

@ -129,8 +129,13 @@ void TextureCache::Cleanup()
TexCache::iterator tcend = textures.end();
while (iter != tcend)
{
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount) // TODO: Deleting EFB copies might not be a good idea here...
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount)
{
// EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted
// TODO: encoding the texture back to RAM here might be a good idea
if (g_ActiveConfig.bCopyEFBToTexture && entry->IsEfbCopy())
continue;
delete iter->second;
textures.erase(iter++);
}