Browse Source
Merge pull request #9975 from liamwhite/more-waiting
vulkan: fix more excessive waiting in scheduler
pull/15/merge
Morph
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
4 deletions
-
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() { |
|
|
|
|