diff options
| author | Techjar <tecknojar@gmail.com> | 2021-06-18 16:21:38 -0400 |
|---|---|---|
| committer | Techjar <tecknojar@gmail.com> | 2021-06-20 16:49:39 -0400 |
| commit | 2d59dcb95d1256bdbe0bf020c029b191477a241c (patch) | |
| tree | 57182c2df09e09b2842e27e048fc52e924e3e535 /Source/Core/VideoCommon/TextureInfo.cpp | |
| parent | 3e1a25ead050554add154efcc236e1f7a9d427e9 (diff) | |
VideoCommon/TextureInfo: Fix mipmap loading from tmem
Even address needs to be offset to the first mipmap entry.
Diffstat (limited to 'Source/Core/VideoCommon/TextureInfo.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/TextureInfo.cpp b/Source/Core/VideoCommon/TextureInfo.cpp index 09c5dee375..13358789bf 100644 --- a/Source/Core/VideoCommon/TextureInfo.cpp +++ b/Source/Core/VideoCommon/TextureInfo.cpp @@ -84,8 +84,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++) { @@ -260,8 +262,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()); |
