diff options
| author | Mai M <mathew1800@gmail.com> | 2021-05-22 19:39:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-22 19:39:52 -0400 |
| commit | 95aadff0e7f8e5f6bbcc0d7d650e45040b417e6b (patch) | |
| tree | 0f244d3014a250ecc7f43839c677999b2c880c05 /Source/Core | |
| parent | f9b0225b69ab566287e08346741ce37b14d5cf38 (diff) | |
| parent | 42d1658c5055a6f100cd5154a582e6422a89ad2e (diff) | |
Merge pull request #9737 from Techjar/fix-textureinfo-hasmips
VideoCommon/TextureInfo: Restore old mipmap detection logic
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/VideoCommon/TextureInfo.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureInfo.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/TextureInfo.cpp b/Source/Core/VideoCommon/TextureInfo.cpp index 6980a25cef..33c1e43cda 100644 --- a/Source/Core/VideoCommon/TextureInfo.cpp +++ b/Source/Core/VideoCommon/TextureInfo.cpp @@ -74,6 +74,7 @@ TextureInfo::TextureInfo(const u8* ptr, const u8* tlut_ptr, u32 address, if (mip_count) { + m_mipmaps_enabled = true; const u32 raw_mip_count = *mip_count; // GPUs don't like when the specified mipmap count would require more than one 1x1-sized LOD in @@ -151,7 +152,7 @@ TextureInfo::NameDetails TextureInfo::CalculateTextureName() NameDetails result; result.base_name = fmt::format("{}{}x{}{}_{:016x}", format_prefix, m_raw_width, m_raw_height, - m_mip_levels.empty() ? "" : "_m", tex_hash); + m_mipmaps_enabled ? "_m" : "", tex_hash); result.tlut_name = tlut_size ? fmt::format("_{:016x}", tlut_hash) : ""; result.format_name = fmt::format("_{}", static_cast<int>(m_texture_format)); diff --git a/Source/Core/VideoCommon/TextureInfo.h b/Source/Core/VideoCommon/TextureInfo.h index 71e4b58dd9..d48e63706f 100644 --- a/Source/Core/VideoCommon/TextureInfo.h +++ b/Source/Core/VideoCommon/TextureInfo.h @@ -102,6 +102,7 @@ private: TextureFormat m_texture_format; TLUTFormat m_tlut_format; + bool m_mipmaps_enabled = false; std::vector<MipLevel> m_mip_levels; u32 m_texture_size = 0; |
