mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Merge pull request #18822 from hrydgard/safer-tokimeki-fix
Avoid vertically merging the two main framebuffers, even if FramebufferAllowLargeVerticalOffset is on.
This commit is contained in:
commit
b28502a07e
@ -425,7 +425,8 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(Framebuffer
|
||||
vfb->height = drawing_height;
|
||||
}
|
||||
break;
|
||||
} else if (!PSP_CoreParameter().compat.flags().DisallowFramebufferAtOffset && v->fb_stride == params.fb_stride && v->fb_format == params.fb_format && !PSP_CoreParameter().compat.flags().SplitFramebufferMargin) {
|
||||
} else if (!PSP_CoreParameter().compat.flags().DisallowFramebufferAtOffset && !PSP_CoreParameter().compat.flags().SplitFramebufferMargin &&
|
||||
v->fb_stride == params.fb_stride && v->fb_format == params.fb_format) {
|
||||
u32 v_fb_first_line_end_ptr = v->fb_address + v->fb_stride * bpp;
|
||||
u32 v_fb_end_ptr = v->fb_address + v->fb_stride * v->height * bpp;
|
||||
|
||||
@ -441,7 +442,9 @@ VirtualFramebuffer *FramebufferManagerCommon::DoSetRenderFrameBuffer(Framebuffer
|
||||
drawing_width += x_offset;
|
||||
break;
|
||||
}
|
||||
} else if (PSP_CoreParameter().compat.flags().FramebufferAllowLargeVerticalOffset && params.fb_address > v->fb_address && v->fb_stride > 0 && (params.fb_address - v->fb_address) % v->FbStrideInBytes() == 0) {
|
||||
} else if (PSP_CoreParameter().compat.flags().FramebufferAllowLargeVerticalOffset &&
|
||||
params.fb_address > v->fb_address && v->fb_stride > 0 && (params.fb_address - v->fb_address) % v->FbStrideInBytes() == 0 &&
|
||||
params.fb_address != 0x04088000 && v->fb_address != 0x04000000) { // Heuristic to avoid merging the main framebuffers.
|
||||
int y_offset = (params.fb_address - v->fb_address) / v->FbStrideInBytes();
|
||||
if (y_offset <= v->bufferHeight) { // note: v->height is misdetected as 256 instead of 272 here in tokimeki. Note that 272 is just the height of the upper part, it's supersampling vertically.
|
||||
vfb = v;
|
||||
|
@ -1460,7 +1460,6 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
||||
Achievements::FrameUpdate();
|
||||
}
|
||||
|
||||
_dbg_assert_(gpu);
|
||||
if (gpu && gpu->PresentedThisFrame()) {
|
||||
framebufferBound = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user