mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Stricter checks for negative framebuffer offsets. Fixes #15937
This commit is contained in:
parent
437d6d30a0
commit
1c9ec36fd8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user