diff options
| author | Matthew Parlane <parlane@gmail.com> | 2012-12-24 12:58:15 +1300 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2012-12-24 12:58:15 +1300 |
| commit | f6418bd09357a528bc495f6854512586d76f28c6 (patch) | |
| tree | ce7748e276363190022f766f4e2d3664712f7c58 /Source/Core/VideoCommon/Src/TextureCacheBase.cpp | |
| parent | d9dd94ac8b696ceb0e6b32eaafcc302b41f43bd1 (diff) | |
| parent | eedca572702c7416805375bd652c56af8665d167 (diff) | |
Merge branch 'master' into wii-usb
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureCacheBase.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index a5c390df3d..7c47c35bb6 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -205,8 +205,11 @@ void TextureCache::ClearRenderTargets() tcend = textures.end(); for (; iter!=tcend; ++iter) - if (iter->second->type != TCET_EC_DYNAMIC) - iter->second->type = TCET_NORMAL; + if (iter->second->type == TCET_EC_VRAM) + { + delete iter->second; + textures.erase(iter++); + } } bool TextureCache::CheckForCustomTextureLODs(u64 tex_hash, int texformat, unsigned int levels) @@ -782,7 +785,7 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat textures[dstAddr] = entry = g_texture_cache->CreateRenderTargetTexture(scaled_tex_w, scaled_tex_h); // TODO: Using the wrong dstFormat, dumb... - entry->SetGeneralParameters(dstAddr, 0, dstFormat, 0); + entry->SetGeneralParameters(dstAddr, 0, dstFormat, 1); entry->SetDimensions(tex_w, tex_h, scaled_tex_w, scaled_tex_h); entry->SetHashes(TEXHASH_INVALID); entry->type = TCET_EC_VRAM; |
