diff options
| author | 2023-03-24 00:19:43 -0400 | |
|---|---|---|
| committer | 2023-03-24 00:19:43 -0400 | |
| 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.gz yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.tar.xz yuzu-7a8a7545f2e50b04f0b1d3fdb09bc24275cc09d0.zip | |
Merge pull request #9975 from liamwhite/more-waiting
vulkan: fix more excessive waiting in scheduler
| -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() { | |||
| 65 | DispatchWork(); | 65 | DispatchWork(); |
| 66 | 66 | ||
| 67 | // Ensure the queue is drained. | 67 | // Ensure the queue is drained. |
| 68 | std::unique_lock ql{queue_mutex}; | 68 | { |
| 69 | event_cv.wait(ql, [this] { return work_queue.empty(); }); | 69 | std::unique_lock ql{queue_mutex}; |
| 70 | event_cv.wait(ql, [this] { return work_queue.empty(); }); | ||
| 71 | } | ||
| 70 | 72 | ||
| 71 | // Now wait for execution to finish. | 73 | // Now wait for execution to finish. |
| 72 | // This needs to be done in the same order as WorkerThread. | 74 | std::scoped_lock el{execution_mutex}; |
| 73 | std::unique_lock el{execution_mutex}; | ||
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | void Scheduler::DispatchWork() { | 77 | void Scheduler::DispatchWork() { |