diff options
| author | 2022-10-03 20:03:25 -0400 | |
|---|---|---|
| committer | 2022-10-03 20:03:25 -0400 | |
| commit | 7969d4d5de2661348c89c5b5d1481624edfce182 (patch) | |
| tree | 3981e87a9622794c550cf2c5d623debbd9522ca7 | |
| parent | Merge pull request #8955 from german77/amiibo-rewrite (diff) | |
| download | yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.gz yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.xz yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.zip | |
vk_scheduler: wait for command processing to complete
Diffstat (limited to '')
| -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 a331ff37e..7a4868e58 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) { | |||
| 139 | Common::SetCurrentThreadName("yuzu:VulkanWorker"); | 139 | Common::SetCurrentThreadName("yuzu:VulkanWorker"); |
| 140 | do { | 140 | do { |
| 141 | std::unique_ptr<CommandChunk> work; | 141 | std::unique_ptr<CommandChunk> work; |
| 142 | bool has_submit{false}; | ||
| 142 | { | 143 | { |
| 143 | std::unique_lock lock{work_mutex}; | 144 | std::unique_lock lock{work_mutex}; |
| 144 | if (work_queue.empty()) { | 145 | if (work_queue.empty()) { |
| @@ -150,9 +151,10 @@ void Scheduler::WorkerThread(std::stop_token stop_token) { | |||
| 150 | } | 151 | } |
| 151 | work = std::move(work_queue.front()); | 152 | work = std::move(work_queue.front()); |
| 152 | work_queue.pop(); | 153 | work_queue.pop(); |
| 154 | |||
| 155 | has_submit = work->HasSubmit(); | ||
| 156 | work->ExecuteAll(current_cmdbuf); | ||
| 153 | } | 157 | } |
| 154 | const bool has_submit = work->HasSubmit(); | ||
| 155 | work->ExecuteAll(current_cmdbuf); | ||
| 156 | if (has_submit) { | 158 | if (has_submit) { |
| 157 | AllocateWorkerCommandBuffer(); | 159 | AllocateWorkerCommandBuffer(); |
| 158 | } | 160 | } |