diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-03-24 05:19:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 05:19:43 +0100 |
commit | 7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0 (patch) | |
tree | 632f33e32988853831e45af61fefc90e59dec30b | |
parent | Merge pull request #9971 from Morph1984/q (diff) | |
parent | vulkan: fix more excessive waiting in scheduler (diff) | |
download | yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar.gz yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar.bz2 yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar.lz yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar.xz yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar.zst yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index c636a1625..55e699552 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -65,12 +65,13 @@ void Scheduler::WaitWorker() { DispatchWork(); // Ensure the queue is drained. - std::unique_lock ql{queue_mutex}; - event_cv.wait(ql, [this] { return work_queue.empty(); }); + { + std::unique_lock ql{queue_mutex}; + event_cv.wait(ql, [this] { return work_queue.empty(); }); + } // Now wait for execution to finish. - // This needs to be done in the same order as WorkerThread. - std::unique_lock el{execution_mutex}; + std::scoped_lock el{execution_mutex}; } void Scheduler::DispatchWork() { |