diff options
author | Merry <git@mary.rs> | 2022-04-07 20:32:40 +0200 |
---|---|---|
committer | Merry <git@mary.rs> | 2022-04-07 20:44:07 +0200 |
commit | bbc585881a69b899bfaa9c2982c87a2034d4331e (patch) | |
tree | aa24a84a9a885da4a112d943ec267b02bba83e39 /src/video_core/renderer_vulkan/vk_scheduler.cpp | |
parent | input_common: Replace lock_guard with scoped_lock (diff) | |
download | yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.gz yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.bz2 yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.lz yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.xz yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.tar.zst yuzu-bbc585881a69b899bfaa9c2982c87a2034d4331e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index ad320991b..6a9416457 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -73,7 +73,7 @@ void VKScheduler::DispatchWork() { return; } { - std::lock_guard lock{work_mutex}; + std::scoped_lock lock{work_mutex}; work_queue.push(std::move(chunk)); } work_cv.notify_one(); @@ -157,7 +157,7 @@ void VKScheduler::WorkerThread(std::stop_token stop_token) { if (has_submit) { AllocateWorkerCommandBuffer(); } - std::lock_guard reserve_lock{reserve_mutex}; + std::scoped_lock reserve_lock{reserve_mutex}; chunk_reserve.push_back(std::move(work)); } while (!stop_token.stop_requested()); } @@ -282,7 +282,7 @@ void VKScheduler::EndRenderPass() { } void VKScheduler::AcquireNewChunk() { - std::lock_guard lock{reserve_mutex}; + std::scoped_lock lock{reserve_mutex}; if (chunk_reserve.empty()) { chunk = std::make_unique<CommandChunk>(); return; |