Fix some "double-binds" of the backbuffer.

These are already eliminated by the queuerunner, but better not to
generate them in the first place, for easier sanity checks.
This commit is contained in:
Henrik Rydgård
2024-01-30 10:44:18 +01:00
parent 18ecef1aa5
commit ea180e54c9
4 changed files with 8 additions and 2 deletions
@@ -1383,6 +1383,7 @@ void VulkanRenderManager::Finish() {
EndCurRenderStep();
// Let's do just a bit of cleanup on render commands now.
// TODO: Should look into removing this.
for (auto &step : steps_) {
if (step->stepType == VKRStepType::RENDER) {
CleanupRenderCommands(&step->commands);
+1
View File
@@ -1547,6 +1547,7 @@ 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);
return;
+4
View File
@@ -104,6 +104,10 @@ public:
bool PresentedThisFrame() const {
return presentedThisFrame_;
}
void NotifyPresent() {
// Something else did the present, skipping PresentationCommon.
presentedThisFrame_ = true;
}
void DeviceLost();
void DeviceRestore(Draw::DrawContext *draw);
+2 -2
View File
@@ -1342,13 +1342,13 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) {
if (mode & ScreenRenderMode::TOP) {
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::CLEAR, RPAction::CLEAR, }, "EmuScreen_Stepping");
// Just to make sure.
if (PSP_IsInited() && !g_Config.bSkipBufferEffects) {
PSP_BeginHostFrame();
gpu->CopyDisplayToOutput(true);
PSP_EndHostFrame();
} else {
draw->BindFramebufferAsRenderTarget(nullptr, { RPAction::CLEAR, RPAction::CLEAR, RPAction::CLEAR, }, "EmuScreen_Stepping");
}
// Need to make sure the UI texture is available, for "darken".
screenManager()->getUIContext()->BeginFrame();