diff options
| author | NeoBrainX <NeoBrainX@googlemail.com> | 2013-02-25 12:36:50 +0000 |
|---|---|---|
| committer | NeoBrainX <NeoBrainX@googlemail.com> | 2013-02-25 12:36:50 +0000 |
| commit | 1141af64f64b801fc1509bb9c1eff92436f340e6 (patch) | |
| tree | 86cd73938424d93be9a649507367b059c5bb91f9 /Source/Core/VideoCommon/Src/TextureCacheBase.cpp | |
| parent | 0554ce927e0deebc21e12c30561c2edbabc8a74a (diff) | |
TextureCacheBase: Do not assume EFB copies can safely be deleted when we think they're "unused".
Fixes issue 6040.
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureCacheBase.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index fda4f21a7e..46aaf79bd4 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -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++); } |
