Skip to content

Commit

Permalink
SoftGPU headless crashfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Aug 14, 2023
1 parent 1b2cffe commit d1b6aa7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Core/HLE/sceDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,17 @@ void __DisplayFlip(int cyclesLate) {
if (gpu) {
Draw::DrawContext *draw = gpu->GetDrawContext();

g_frameTiming.presentMode = ComputePresentMode(draw, &g_frameTiming.presentInterval);

if (!draw->GetDeviceCaps().presentInstantModeChange && g_frameTiming.presentMode == Draw::PresentMode::FIFO) {
// Some backends can't just flip into MAILBOX/IMMEDIATE mode instantly.
// Vulkan doesn't support the interval setting, so we force skipping the flip.
// TODO: We'll clean this up in a more backend-independent way later.
fastForwardSkipFlip = true;
if (draw) {
g_frameTiming.presentMode = ComputePresentMode(draw, &g_frameTiming.presentInterval);
if (!draw->GetDeviceCaps().presentInstantModeChange && g_frameTiming.presentMode == Draw::PresentMode::FIFO) {
// Some backends can't just flip into MAILBOX/IMMEDIATE mode instantly.
// Vulkan doesn't support the interval setting, so we force skipping the flip.
// TODO: We'll clean this up in a more backend-independent way later.
fastForwardSkipFlip = true;
}
} else {
g_frameTiming.presentMode = Draw::PresentMode::FIFO;
g_frameTiming.presentInterval = 1;
}
}

Expand Down

0 comments on commit d1b6aa7

Please sign in to comment.