summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2021-09-18 17:29:46 +1200
committerScott Mansell <phiren@gmail.com>2021-09-18 23:58:24 +1200
commitce80a96aeee88994973ac8e7aebcbd466cd6863c (patch)
tree3dd97f651253f8122d37b012e66d7296599c899f /Source/Core/VideoCommon
parenta6baca6bf62eab8539a42b6103d56b5e7af530dd (diff)
BPStructs: ensure side effects are same
Missed this side effect when fixing crash in Mario Kart Wii wifi
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/BPStructs.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp
index 42ca1545a5..1ea2cbb5c2 100644
--- a/Source/Core/VideoCommon/BPStructs.cpp
+++ b/Source/Core/VideoCommon/BPStructs.cpp
@@ -226,6 +226,8 @@ static void BPWritten(const BPCmd& bp)
srcRect.right = bpmem.copyTexSrcXY.x + bpmem.copyTexSrcWH.x + 1;
srcRect.bottom = bpmem.copyTexSrcXY.y + bpmem.copyTexSrcWH.y + 1;
+ const UPE_Copy PE_copy = bpmem.triggerEFBCopy;
+
// Since the copy X and Y coordinates/sizes are 10-bit, the game can configure a copy region up
// to 1024x1024. Hardware tests have found that the number of bytes written does not depend on
// the configured stride, instead it is based on the size registers, writing beyond the length
@@ -250,6 +252,12 @@ static void BPWritten(const BPCmd& bp)
// Just ignore it
// Apparently Mario Kart Wii in wifi mode can generate a deformed EFB copy of size 4x4
// at offset (328,1020)
+ if (PE_copy.copy_to_xfb == 1)
+ {
+ // Make sure we disable Bounding box to match the side effects of the non-failure path
+ BoundingBox::Disable();
+ }
+
return;
}
@@ -262,7 +270,6 @@ static void BPWritten(const BPCmd& bp)
const u32 copy_height = srcRect.GetHeight();
// Check if we are to copy from the EFB or draw to the XFB
- const UPE_Copy PE_copy = bpmem.triggerEFBCopy;
if (PE_copy.copy_to_xfb == 0)
{
// bpmem.zcontrol.pixel_format to PixelFormat::Z24 is when the game wants to copy from ZBuffer