summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorConnor McLaughlin <stenzek@gmail.com>2019-01-16 08:49:36 +1000
committerGitHub <noreply@github.com>2019-01-16 08:49:36 +1000
commit59623160686bb038bcd61d11d3b2263f09822c7e (patch)
tree444f901171716eedad6fab4637a437dc74df804b /Source/Core/VideoCommon/TextureCacheBase.cpp
parent1d3e3de44b177eb7bdd07a02afefb83ac9ba5812 (diff)
parent184b2edc309fa290c6d10b25d229752acf552f41 (diff)
Merge pull request #7643 from weihuoya/texture-overlap
Texture: fx overlap src position
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index e0406708ba..89cde6542d 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -1378,9 +1378,10 @@ bool TextureCacheBase::LoadTextureFromOverlappingTextures(TCacheEntry* entry_to_
}
else
{
+ s32 srcNumBlocksX = entry->native_width / tex_info.block_width;
s32 block_offset = (entry_to_update->addr - entry->addr) / tex_info.bytes_per_block;
- s32 block_x = block_offset % numBlocksX;
- s32 block_y = block_offset / numBlocksX;
+ s32 block_x = block_offset % srcNumBlocksX;
+ s32 block_y = block_offset / srcNumBlocksX;
src_x = block_x * tex_info.block_width;
src_y = block_y * tex_info.block_height;
dst_x = 0;