Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
TextureCacheBase: Do not assume EFB copies can safely be deleted when…
… we think they're "unused".

Fixes issue 6040.
  • Loading branch information
NeoBrainX authored and NeoBrainX committed Feb 25, 2013
1 parent 0554ce9 commit 1141af6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Core/VideoCommon/Src/TextureCacheBase.cpp
Expand Up @@ -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++);
}
Expand Down

0 comments on commit 1141af6

Please sign in to comment.