mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-08 22:33:08 +02:00
TextureCacheBase: Do not assume EFB copies can safely be deleted when we think they're "unused".
Fixes issue 6040.
This commit is contained in:
parent
0554ce927e
commit
1141af64f6
@ -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++);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user