mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Headless: Present OpenGL frames too
OpenGL's render thread only finishes a frame when it's presented, so the emu thread eventually waited forever in BeginFrame for a free frame, with the render thread waiting for work. GPU tests and games hung, silently, as a blocked host thread also defeats the timeouts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
47730e0eb0
commit
c9cddb99e9
1 file changed
+6
-4
@@ -330,12 +330,14 @@ struct AutoTestOptions {
|
||||
int requiredDisableHLE;
|
||||
};
|
||||
|
||||
// Ends a frame of the draw context the way the app does, presenting it. With Vulkan, presenting is
|
||||
// also what returns a frame's image, and a frame that isn't presented would wait forever for its
|
||||
// next one. The other backends present to a hidden window, which could wait for vsync.
|
||||
// Ends a frame of the draw context the way the app does, presenting it. Unpresented frames never
|
||||
// finish: with Vulkan, presenting is what returns a frame's image, and OpenGL's render thread only
|
||||
// finishes a frame when it's presented, so either would eventually wait forever. Neither waits for
|
||||
// vsync here (Vulkan and, on macOS, OpenGL render offscreen, and the hidden-window OpenGL context
|
||||
// swaps with interval 0). D3D11 presents to a hidden window, which could.
|
||||
static void EndDrawFrame(Draw::DrawContext *draw) {
|
||||
draw->EndFrame();
|
||||
if (GetGPUBackend() == GPUBackend::VULKAN) {
|
||||
if (GetGPUBackend() == GPUBackend::VULKAN || GetGPUBackend() == GPUBackend::OPENGL) {
|
||||
draw->Present(Draw::PresentMode::FIFO);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user