diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index c707bb549f..ad7145e1d3 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -947,7 +947,10 @@ bool TextureCacheCommon::MatchFramebuffer( matchInfo->yOffset = entry.bufw == 0 ? 0 : pixelOffset / (int)entry.bufw; matchInfo->xOffset = entry.bufw == 0 ? 0 : pixelOffset % (int)entry.bufw; } else if (pixelOffset < 0) { - matchInfo->yOffset = entry.bufw == 0 ? 0 : pixelOffset / (int)entry.bufw; + // We don't support negative Y offsets, and negative X offsets are only for the Killzone workaround. + if (pixelOffset < -(int)entry.bufw || !PSP_CoreParameter().compat.flags().SplitFramebufferMargin) { + return false; + } matchInfo->xOffset = entry.bufw == 0 ? 0 : -(-pixelOffset % (int)entry.bufw); } } @@ -957,11 +960,6 @@ bool TextureCacheCommon::MatchFramebuffer( return false; } - if (matchInfo->yOffset < 0 && matchInfo->yOffset - minSubareaHeight <= 0) { - // Can't be inside the framebuffer. - return false; - } - if (fb_stride != entry.bufw) { if (noOffset) { WARN_LOG_ONCE(diffStrides2, G3D, "Matching framebuffer(matching_clut = %s) different strides %d != %d", matchingClutFormat ? "yes" : "no", entry.bufw, fb_stride);