mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-23 14:45:42 +01:00
vulkan: fix more excessive waiting in scheduler
This commit is contained in:
parent
0e7e98e24e
commit
b9b1318bea
@ -65,12 +65,13 @@ void Scheduler::WaitWorker() {
|
|||||||
DispatchWork();
|
DispatchWork();
|
||||||
|
|
||||||
// Ensure the queue is drained.
|
// 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.
|
// Now wait for execution to finish.
|
||||||
// This needs to be done in the same order as WorkerThread.
|
std::scoped_lock el{execution_mutex};
|
||||||
std::unique_lock el{execution_mutex};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Scheduler::DispatchWork() {
|
void Scheduler::DispatchWork() {
|
||||||
|
Loading…
Reference in New Issue
Block a user