summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureInfo.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2021-06-23 18:21:55 -0400
committerGitHub <noreply@github.com>2021-06-23 18:21:55 -0400
commit95ecb73b112e637197c12fe9546a1b9bf728f2af (patch)
treefe652fe8c156071c994d0d9aed58e50454845ac0 /Source/Core/VideoCommon/TextureInfo.cpp
parentbe2ec728e4cd642e22c8558dec7d75ca254a19b2 (diff)
parent2d59dcb95d1256bdbe0bf020c029b191477a241c (diff)
Merge pull request #9826 from Techjar/fix-tmem-mips
VideoCommon/TextureInfo: Fix mipmap loading from tmem
Diffstat (limited to 'Source/Core/VideoCommon/TextureInfo.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/TextureInfo.cpp b/Source/Core/VideoCommon/TextureInfo.cpp
index 166b58497e..7f51c40dc9 100644
--- a/Source/Core/VideoCommon/TextureInfo.cpp
+++ b/Source/Core/VideoCommon/TextureInfo.cpp
@@ -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++)
{
@@ -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());