mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 22:34:54 +00:00
Merge pull request #9737 from Techjar/fix-textureinfo-hasmips
VideoCommon/TextureInfo: Restore old mipmap detection logic
This commit is contained in:
commit
95aadff0e7
2 changed files with 3 additions and 1 deletions
|
@ -74,6 +74,7 @@ TextureInfo::TextureInfo(const u8* ptr, const u8* tlut_ptr, u32 address,
|
||||||
|
|
||||||
if (mip_count)
|
if (mip_count)
|
||||||
{
|
{
|
||||||
|
m_mipmaps_enabled = true;
|
||||||
const u32 raw_mip_count = *mip_count;
|
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
|
// 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;
|
NameDetails result;
|
||||||
result.base_name = fmt::format("{}{}x{}{}_{:016x}", format_prefix, m_raw_width, m_raw_height,
|
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.tlut_name = tlut_size ? fmt::format("_{:016x}", tlut_hash) : "";
|
||||||
result.format_name = fmt::format("_{}", static_cast<int>(m_texture_format));
|
result.format_name = fmt::format("_{}", static_cast<int>(m_texture_format));
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ private:
|
||||||
TextureFormat m_texture_format;
|
TextureFormat m_texture_format;
|
||||||
TLUTFormat m_tlut_format;
|
TLUTFormat m_tlut_format;
|
||||||
|
|
||||||
|
bool m_mipmaps_enabled = false;
|
||||||
std::vector<MipLevel> m_mip_levels;
|
std::vector<MipLevel> m_mip_levels;
|
||||||
|
|
||||||
u32 m_texture_size = 0;
|
u32 m_texture_size = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue