mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #9975 from liamwhite/more-waiting
vulkan: fix more excessive waiting in scheduler
This commit is contained in:
commit
7a8a7545f2
@ -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(); });
|
||||
}
|
||||
|
||||
// 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() {
|
||||
|
Loading…
Reference in New Issue
Block a user