mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
EmuScreen: Use CLEAR instead of DONT_CARE to help the render pass merger.
Should fix #18720 We need to annotate store mode properly too, in order to merge passes that load with DONT_CARE. The reason it's a problem that we fail to merge renderpasses is that old Mali drivers get things in a terribly wrong state if you submit an empty renderpass.
This commit is contained in:
parent
7627de4846
commit
3967d074bf
1 changed files with 5 additions and 5 deletions
|
@ -1497,7 +1497,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
if ((g_Config.bSkipBufferEffects && !g_Config.bSoftwareRendering) || Core_IsStepping()) {
|
||||
// We need to clear here already so that drawing during the frame is done on a clean slate.
|
||||
if (Core_IsStepping() && gpuStats.numFlips != 0) {
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::KEEP, RPAction::DONT_CARE, RPAction::DONT_CARE }, "EmuScreen_BackBuffer");
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::KEEP, RPAction::CLEAR, RPAction::CLEAR }, "EmuScreen_BackBuffer");
|
||||
} else {
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, 0xFF000000 }, "EmuScreen_BackBuffer");
|
||||
}
|
||||
|
@ -1515,7 +1515,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
System_Notify(SystemNotification::KEEP_SCREEN_AWAKE);
|
||||
} else if (!Core_ShouldRunBehind() && strcmp(screenManager()->topScreen()->tag(), "DevMenu") != 0) {
|
||||
// Not on top. Let's not execute, only draw the image.
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::DONT_CARE, RPAction::DONT_CARE }, "EmuScreen_Stepping");
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, }, "EmuScreen_Stepping");
|
||||
// Just to make sure.
|
||||
if (PSP_IsInited() && !g_Config.bSkipBufferEffects) {
|
||||
PSP_BeginHostFrame();
|
||||
|
@ -1584,12 +1584,12 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
// Clear to blue background screen
|
||||
bool dangerousSettings = !Reporting::IsSupported();
|
||||
clearColor = dangerousSettings ? 0xFF900050 : 0xFF900000;
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::DONT_CARE, RPAction::DONT_CARE, clearColor }, "EmuScreen_RuntimeError");
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, clearColor }, "EmuScreen_RuntimeError");
|
||||
// The info is drawn later in renderUI
|
||||
} else {
|
||||
// If we're stepping, it's convenient not to clear the screen entirely, so we copy display to output.
|
||||
// This won't work in non-buffered, but that's fine.
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::DONT_CARE, RPAction::DONT_CARE, clearColor }, "EmuScreen_Stepping");
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, clearColor }, "EmuScreen_Stepping");
|
||||
// Just to make sure.
|
||||
if (PSP_IsInited()) {
|
||||
gpu->CopyDisplayToOutput(true);
|
||||
|
@ -1629,7 +1629,7 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
|
|||
|
||||
if (hasVisibleUI()) {
|
||||
// In most cases, this should already be bound and a no-op.
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::KEEP, RPAction::DONT_CARE, RPAction::DONT_CARE }, "EmuScreen_UI");
|
||||
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::KEEP, RPAction::CLEAR, RPAction::CLEAR }, "EmuScreen_UI");
|
||||
draw->SetViewport(viewport);
|
||||
cardboardDisableButton_->SetVisibility(g_Config.bEnableCardboardVR ? UI::V_VISIBLE : UI::V_GONE);
|
||||
screenManager()->getUIContext()->BeginFrame();
|
||||
|
|
Loading…
Add table
Reference in a new issue