Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9826 from Techjar/fix-tmem-mips
VideoCommon/TextureInfo: Fix mipmap loading from tmem
  • Loading branch information
JMC47 committed Jun 23, 2021
2 parents be2ec72 + 2d59dcb commit 95ecb73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Core/VideoCommon/TextureInfo.cpp
Expand Up @@ -85,8 +85,10 @@ TextureInfo::TextureInfo(const u8* ptr, const u8* tlut_ptr, u32 address,
const u32 limited_mip_count =
std::min<u32>(IntLog2(std::max(width, height)) + 1, raw_mip_count + 1) - 1;

// load mips - TODO: Loading mipmaps from tmem is untested!
// load mips
const u8* src_data = m_ptr + GetTextureSize();
if (tmem_even)
tmem_even += GetTextureSize();

for (u32 i = 0; i < limited_mip_count; i++)
{
Expand Down Expand Up @@ -267,8 +269,6 @@ TextureInfo::MipLevel::MipLevel(u32 level, const TextureInfo& parent, bool from_
m_expanded_width = Common::AlignUp(m_raw_width, parent.GetBlockWidth());
m_expanded_height = Common::AlignUp(m_raw_height, parent.GetBlockHeight());

// load mips - TODO: Loading mipmaps from tmem is untested!

m_texture_size = TexDecoder_GetTextureSizeInBytes(m_expanded_width, m_expanded_height,
parent.GetTextureFormat());

Expand Down

0 comments on commit 95ecb73

Please sign in to comment.