summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2022-10-04 02:03:25 +0200
committerLiam <byteslice@airmail.cc>2022-10-04 02:03:25 +0200
commit7969d4d5de2661348c89c5b5d1481624edfce182 (patch)
tree3981e87a9622794c550cf2c5d623debbd9522ca7 /src/video_core
parentMerge pull request #8955 from german77/amiibo-rewrite (diff)
downloadyuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar
yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.gz
yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.bz2
yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.lz
yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.xz
yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.tar.zst
yuzu-7969d4d5de2661348c89c5b5d1481624edfce182.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_vulkan/vk_scheduler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp
index a331ff37e..7a4868e58 100644
--- a/src/video_core/renderer_vulkan/vk_scheduler.cpp
+++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp
@@ -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();
}