diff options
author | Mai <mathew1800@gmail.com> | 2022-10-08 02:27:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-08 02:27:16 +0200 |
commit | 155213484b9a785c93e16a28285999256587691a (patch) | |
tree | 1e30dc76400901553d63f506a7244f9080c702db /src/video_core/renderer_vulkan/vk_scheduler.cpp | |
parent | Merge pull request #8932 from abouvier/cmake-pkgconfig (diff) | |
parent | vk_scheduler: wait for command processing to complete (diff) | |
download | yuzu-155213484b9a785c93e16a28285999256587691a.tar yuzu-155213484b9a785c93e16a28285999256587691a.tar.gz yuzu-155213484b9a785c93e16a28285999256587691a.tar.bz2 yuzu-155213484b9a785c93e16a28285999256587691a.tar.lz yuzu-155213484b9a785c93e16a28285999256587691a.tar.xz yuzu-155213484b9a785c93e16a28285999256587691a.tar.zst yuzu-155213484b9a785c93e16a28285999256587691a.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_scheduler.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index d96720b80..7934f2a51 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -139,6 +139,7 @@ void Scheduler::WorkerThread(std::stop_token stop_token) { Common::SetCurrentThreadName("VulkanWorker"); do { std::unique_ptr<CommandChunk> work; + bool has_submit{false}; { std::unique_lock lock{work_mutex}; if (work_queue.empty()) { @@ -150,9 +151,10 @@ void Scheduler::WorkerThread(std::stop_token stop_token) { } work = std::move(work_queue.front()); work_queue.pop(); + + has_submit = work->HasSubmit(); + work->ExecuteAll(current_cmdbuf); } - const bool has_submit = work->HasSubmit(); - work->ExecuteAll(current_cmdbuf); if (has_submit) { AllocateWorkerCommandBuffer(); } |