mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-26 13:16:58 +00:00
Merge pull request #9016 from liamwhite/drunken-schedule
vk_scheduler: wait for command processing to complete
This commit is contained in:
commit
155213484b
|
@ -139,6 +139,7 @@ void Scheduler::WorkerThread(std::stop_token stop_token) {
|
||||||
Common::SetCurrentThreadName("VulkanWorker");
|
Common::SetCurrentThreadName("VulkanWorker");
|
||||||
do {
|
do {
|
||||||
std::unique_ptr<CommandChunk> work;
|
std::unique_ptr<CommandChunk> work;
|
||||||
|
bool has_submit{false};
|
||||||
{
|
{
|
||||||
std::unique_lock lock{work_mutex};
|
std::unique_lock lock{work_mutex};
|
||||||
if (work_queue.empty()) {
|
if (work_queue.empty()) {
|
||||||
|
@ -150,9 +151,10 @@ void Scheduler::WorkerThread(std::stop_token stop_token) {
|
||||||
}
|
}
|
||||||
work = std::move(work_queue.front());
|
work = std::move(work_queue.front());
|
||||||
work_queue.pop();
|
work_queue.pop();
|
||||||
|
|
||||||
|
has_submit = work->HasSubmit();
|
||||||
|
work->ExecuteAll(current_cmdbuf);
|
||||||
}
|
}
|
||||||
const bool has_submit = work->HasSubmit();
|
|
||||||
work->ExecuteAll(current_cmdbuf);
|
|
||||||
if (has_submit) {
|
if (has_submit) {
|
||||||
AllocateWorkerCommandBuffer();
|
AllocateWorkerCommandBuffer();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue