mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-11-24 03:23:02 +00:00
vk_scheduler: wait for command processing to complete
This commit is contained in:
parent
61399de5db
commit
7969d4d5de
1 changed files with 4 additions and 2 deletions
|
@ -139,6 +139,7 @@ void Scheduler::WorkerThread(std::stop_token stop_token) {
|
|||
Common::SetCurrentThreadName("yuzu:VulkanWorker");
|
||||
do {
|
||||
std::unique_ptr<CommandChunk> work;
|
||||
bool has_submit{false};
|
||||
{
|
||||
std::unique_lock lock{work_mutex};
|
||||
if (work_queue.empty()) {
|
||||
|
@ -150,9 +151,10 @@ void Scheduler::WorkerThread(std::stop_token stop_token) {
|
|||
}
|
||||
work = std::move(work_queue.front());
|
||||
work_queue.pop();
|
||||
|
||||
has_submit = work->HasSubmit();
|
||||
work->ExecuteAll(current_cmdbuf);
|
||||
}
|
||||
const bool has_submit = work->HasSubmit();
|
||||
work->ExecuteAll(current_cmdbuf);
|
||||
if (has_submit) {
|
||||
AllocateWorkerCommandBuffer();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue