diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-05-03 16:54:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 16:54:24 +0200 |
commit | ffeb5cdd8df31dac9744845c7146d7364c843b9c (patch) | |
tree | 5c2567321f0f2397ab0637c5c913489817966eda /src/video_core/renderer_vulkan/vk_present_manager.cpp | |
parent | Merge pull request #10146 from liamwhite/catch3 (diff) | |
parent | vk_present_manager: Fix softlocks when disabling async present (diff) | |
download | yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.tar yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.tar.gz yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.tar.bz2 yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.tar.lz yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.tar.xz yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.tar.zst yuzu-ffeb5cdd8df31dac9744845c7146d7364c843b9c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_present_manager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cpp index a137c66f2..c49583013 100644 --- a/src/video_core/renderer_vulkan/vk_present_manager.cpp +++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp @@ -153,16 +153,19 @@ Frame* PresentManager::GetRenderFrame() { return frame; } -void PresentManager::PushFrame(Frame* frame) { +void PresentManager::Present(Frame* frame) { if (!use_present_thread) { + scheduler.WaitWorker(); CopyToSwapchain(frame); free_queue.push(frame); return; } - std::unique_lock lock{queue_mutex}; - present_queue.push(frame); - frame_cv.notify_one(); + scheduler.Record([this, frame](vk::CommandBuffer) { + std::unique_lock lock{queue_mutex}; + present_queue.push(frame); + frame_cv.notify_one(); + }); } void PresentManager::RecreateFrame(Frame* frame, u32 width, u32 height, bool is_srgb, |