From be7d1d1169a555f9c8740424b88ae5f9d6e07b95 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 12 Apr 2015 11:02:12 -0700 Subject: [PATCH] Add a bit of a hack for smaller framebuf memcpys. Hopefully this doesn't false-positive in any other games. Helps Valkyrie Profile's battle entry effect. --- GPU/Common/FramebufferCommon.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GPU/Common/FramebufferCommon.cpp b/GPU/Common/FramebufferCommon.cpp index 385727d00ec5..5c1465ca6a33 100644 --- a/GPU/Common/FramebufferCommon.cpp +++ b/GPU/Common/FramebufferCommon.cpp @@ -486,6 +486,11 @@ bool FramebufferManagerCommon::NotifyFramebufferCopy(u32 src, u32 dst, int size, srcBuffer = vfb; srcY = yOffset; srcH = size == vfb_byteWidth ? 1 : std::min((u32)size / vfb_byteStride, (u32)vfb->height); + } else if ((offset % vfb_byteStride) == 0 && size == vfb->fb_stride && yOffset < srcY) { + // Valkyrie Profile reads 512 bytes at a time, rather than 2048. So, let's whitelist fb_stride also. + srcBuffer = vfb; + srcY = yOffset; + srcH = 1; } } }