summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-11-19 17:35:07 +1000
committerStenzek <stenzek@gmail.com>2017-11-22 18:49:33 +1000
commit193763ca3ab62086c5a2f09870ffdc84cbd8ee00 (patch)
treef5a1f5982796907d4062d8925d8fa09da85e73e5 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent6577365851967d03caf1b70f440e1eee76198ebb (diff)
TextureCacheBase: Don't crop last row/column of XFB copies
Unsure why this was happening in the first place.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp31
1 files changed, 8 insertions, 23 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 31701e6bc0..d6290001a9 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -406,8 +406,11 @@ TextureCacheBase::DoPartialTextureUpdates(TCacheEntry* entry_to_update, u8* pale
dstrect.top = dst_y;
dstrect.right = (dst_x + copy_width);
dstrect.bottom = (dst_y + copy_height);
- entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, 0, 0,
- dstrect, 0, 0);
+ for (u32 layer = 0; layer < entry->texture->GetConfig().layers; layer++)
+ {
+ entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, layer,
+ 0, dstrect, layer, 0);
+ }
if (isPaletteTexture)
{
@@ -1367,34 +1370,16 @@ bool TextureCacheBase::LoadTextureFromOverlappingTextures(TCacheEntry* entry_to_
srcrect.right = (src_x + copy_width);
srcrect.bottom = (src_y + copy_height);
- if (static_cast<int>(entry->GetWidth()) == srcrect.GetWidth())
- {
- srcrect.right -= 1;
- }
-
- if (static_cast<int>(entry->GetHeight()) == srcrect.GetHeight())
- {
- srcrect.bottom -= 1;
- }
-
dstrect.left = dst_x;
dstrect.top = dst_y;
dstrect.right = (dst_x + copy_width);
dstrect.bottom = (dst_y + copy_height);
- if (static_cast<int>(entry_to_update->GetWidth()) == dstrect.GetWidth())
- {
- dstrect.right -= 1;
- }
-
- if (static_cast<int>(entry_to_update->GetHeight()) == dstrect.GetHeight())
+ for (u32 layer = 0; layer < entry->texture->GetConfig().layers; layer++)
{
- dstrect.bottom -= 1;
+ entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, layer,
+ 0, dstrect, layer, 0);
}
-
- entry_to_update->texture->CopyRectangleFromTexture(entry->texture.get(), srcrect, 0, 0,
- dstrect, 0, 0);
-
updated_entry = true;
if (tex_info.is_palette_texture)