summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorweihuoya <zwdreams@gmail.com>2018-12-25 21:24:25 +0800
committerweihuoya <zwdreams@gmail.com>2018-12-25 21:24:25 +0800
commit184b2edc309fa290c6d10b25d229752acf552f41 (patch)
tree8e3683fb63a2694492b81294fcf181a9bce64dcf /Source/Core/VideoCommon/TextureCacheBase.cpp
parenta0673fbb4786f6fdfd78873d873e9a083c742358 (diff)
fx texture overlap
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;