diff options
| author | degasus <wickmarkus@web.de> | 2015-01-11 23:11:04 +0100 |
|---|---|---|
| committer | degasus <wickmarkus@web.de> | 2015-01-11 23:11:04 +0100 |
| commit | 22e06daf5c41c3d201edba8c22c85df5bafee63b (patch) | |
| tree | 60bacefa80e92cf96ad313eb80a7728fbbfd58ad /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | 728431256853989b63b963fc4816cf255b6ec382 (diff) | |
TexCache: recreate the entry on level missmatch
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index b5418069ca..a2b32410f9 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -466,6 +466,13 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) const bool use_native_mips = use_mipmaps && !using_custom_lods && (width == nativeW && height == nativeH); texLevels = (use_native_mips || using_custom_lods) ? texLevels : 1; // TODO: Should be forced to 1 for non-pow2 textures (e.g. efb copies with automatically adjusted IR) + if (entry && entry->config.levels != texLevels) + { + // delete the texture and make a new one + delete entry; + entry = nullptr; + } + // create the entry/texture if (nullptr == entry) { |
