mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Be more consistent with NotifyPresent
..
This commit is contained in:
parent
e39153d622
commit
e9c7eaf427
2 changed files with 8 additions and 5 deletions
|
@ -1567,9 +1567,9 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) {
|
|||
// No framebuffer to display! Clear to black.
|
||||
if (useBufferedRendering_) {
|
||||
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::CLEAR, Draw::RPAction::CLEAR, Draw::RPAction::CLEAR }, "CopyDisplayToOutput");
|
||||
presentation_->NotifyPresent();
|
||||
}
|
||||
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE);
|
||||
presentation_->NotifyPresent();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1628,6 +1628,7 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) {
|
|||
if (Memory::IsValidAddress(fbaddr)) {
|
||||
// The game is displaying something directly from RAM. In GTA, it's decoded video.
|
||||
DrawFramebufferToOutput(Memory::GetPointerUnchecked(fbaddr), displayStride_, displayFormat_);
|
||||
// This effectively calls presentation_->NotifyPresent();
|
||||
return;
|
||||
} else {
|
||||
DEBUG_LOG(Log::FrameBuf, "Found no FBO to display! displayFBPtr = %08x", fbaddr);
|
||||
|
@ -1635,8 +1636,9 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) {
|
|||
if (useBufferedRendering_) {
|
||||
// Bind and clear the backbuffer. This should be the first time during the frame that it's bound.
|
||||
draw_->BindFramebufferAsRenderTarget(nullptr, { Draw::RPAction::CLEAR, Draw::RPAction::CLEAR, Draw::RPAction::CLEAR }, "CopyDisplayToOutput_NoFBO");
|
||||
}
|
||||
} // For non-buffered rendering, every frame is cleared anyway.
|
||||
gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE);
|
||||
presentation_->NotifyPresent();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1700,7 +1702,9 @@ void FramebufferManagerCommon::CopyDisplayToOutput(bool reallyDirty) {
|
|||
presentation_->SourceFramebuffer(vfb->fbo, actualWidth, actualHeight);
|
||||
presentation_->CopyToOutput(flags, uvRotation, u0, v0, u1, v1);
|
||||
} else if (useBufferedRendering_) {
|
||||
WARN_LOG(Log::FrameBuf, "Current VFB lacks an FBO: %08x", vfb->fb_address);
|
||||
WARN_LOG(Log::FrameBuf, "Using buffered rendering, and current VFB lacks an FBO: %08x", vfb->fb_address);
|
||||
} else {
|
||||
presentation_->NotifyPresent();
|
||||
}
|
||||
|
||||
// This may get called mid-draw if the game uses an immediate flip.
|
||||
|
|
|
@ -1366,7 +1366,6 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
|
||||
draw->SetViewport(viewport);
|
||||
draw->SetScissorRect(0, 0, g_display.pixel_xres, g_display.pixel_yres);
|
||||
skipBufferEffects = true;
|
||||
framebufferBound = true;
|
||||
}
|
||||
draw->SetTargetSize(g_display.pixel_xres, g_display.pixel_yres);
|
||||
|
@ -1510,7 +1509,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
Draw::BackendState state = draw->GetCurrentBackendState();
|
||||
|
||||
// We allow if !state.valid, that means it's not the Vulkan backend.
|
||||
_assert_msg_(!state.valid || state.passes >= 1, "skipB: %d sw: %d", (int)skipBufferEffects, (int)g_Config.bSoftwareRendering);
|
||||
_assert_msg_(!state.valid || state.passes >= 1, "skipB: %d sw: %d screenmode: %d", (int)skipBufferEffects, (int)g_Config.bSoftwareRendering, mode);
|
||||
|
||||
screenManager()->getUIContext()->BeginFrame();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue