diff options
| author | skidau <skidau@gmail.com> | 2015-01-23 00:43:39 +1100 |
|---|---|---|
| committer | skidau <skidau@gmail.com> | 2015-01-23 00:43:39 +1100 |
| commit | d27bd9d291a178892674cdffc397b586b37c0f2b (patch) | |
| tree | 2fc88a9a5f9bccf8a48c8b2fa87c535d216fb7ca /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | 4984215971e0c03a16e40b0c1703840bfa2cdab8 (diff) | |
| parent | 7cf4dd63e45af0617ef7eabc25e3f39f36f1fe84 (diff) | |
Merge pull request #1885 from degasus/custom_texture
CustomTexture: new name format
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 684dc56b5e..3e61ea11f3 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -304,8 +304,8 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) const int texformat = tex.texImage0[id].format; const u32 tlutaddr = tex.texTlut[id].tmem_offset << 9; const u32 tlutfmt = tex.texTlut[id].tlut_format; - const bool use_mipmaps = (tex.texMode0[id].min_filter & 3) != 0; u32 tex_levels = (tex.texMode1[id].max_lod + 0xf) / 0x10 + 1; + const bool use_mipmaps = (tex.texMode0[id].min_filter & 3) != 0 && tex_levels > 0; const bool from_tmem = tex.texImage1[id].image_type != 0; if (0 == address) @@ -410,7 +410,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) src_data, texture_size, &texMem[tlutaddr], palette_size, width, height, - texformat + texformat, use_mipmaps )); if (hires_tex) @@ -476,7 +476,8 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) src_data, texture_size, &texMem[tlutaddr], palette_size, width, height, - texformat + texformat, use_mipmaps, + true ); DumpTexture(entry, basename, 0); } |
