summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-19 18:40:33 +0100
committerLiam <byteslice@airmail.cc>2023-03-19 18:40:33 +0100
commitb9b1318bea1af744fb9183e808ba00352ffed4d1 (patch)
tree36c2fe33621d77b3721ed75a93d483c8291f0e5b
parentMerge pull request #9966 from bunnei/bounded-polyfill (diff)
downloadyuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.tar
yuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.tar.gz
yuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.tar.bz2
yuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.tar.lz
yuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.tar.xz
yuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.tar.zst
yuzu-b9b1318bea1af744fb9183e808ba00352ffed4d1.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_scheduler.cpp9
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() {