mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Vulkan: Don't wait for an image in frames that never acquired one
A frame that never draws to the backbuffer never acquires an image, but its final submit still waited on the acquire semaphore, which nothing signals, hanging the GPU. Skip the swap for such frames when finishing them. This replaces the check for a frame with no steps at all, which could also set it partway through a frame that acquires later. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
0b778d6b83
commit
23ba2f62f8
1 file changed
+4
-3
@@ -1706,14 +1706,15 @@ void VulkanRenderManager::Run(VKRRenderThreadTask &task) {
|
||||
frameData.profile.descWriteTime = time_now_d() - descStart;
|
||||
|
||||
queueRunner_.PreprocessSteps(task.steps);
|
||||
// Likely during shutdown, happens in headless.
|
||||
if (task.steps.empty() && !frameData.hasAcquired)
|
||||
frameData.skipSwap = true;
|
||||
//queueRunner_.LogSteps(stepsOnThread, false);
|
||||
queueRunner_.RunSteps(task.steps, task.frame, frameData, frameDataShared_);
|
||||
|
||||
switch (task.runType) {
|
||||
case VKRRunType::SUBMIT:
|
||||
// A frame that never drew to the backbuffer never acquired an image, so there's nothing to
|
||||
// wait for or present. Headless has such frames, and so does shutdown.
|
||||
if (!frameData.hasAcquired)
|
||||
frameData.skipSwap = true;
|
||||
frameData.Submit(vulkan_, FrameSubmitType::FinishFrame, frameDataShared_);
|
||||
break;
|
||||
|
||||
|
||||
Reference in new issue
Block a user