diff options
author | Liam <byteslice@airmail.cc> | 2023-04-15 04:53:37 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-04-15 04:53:37 +0200 |
commit | e3fb9b5e0049b87a25c551219d4b009550af5f6d (patch) | |
tree | 3529e92f967aa5196e656020c300652f7fa59cc5 /src/video_core/renderer_vulkan/vk_scheduler.cpp | |
parent | Merge pull request #10030 from Wollnashorn/botw-amd-fix (diff) | |
download | yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.tar yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.tar.gz yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.tar.bz2 yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.tar.lz yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.tar.xz yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.tar.zst yuzu-e3fb9b5e0049b87a25c551219d4b009550af5f6d.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_scheduler.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.cpp b/src/video_core/renderer_vulkan/vk_scheduler.cpp index b264e6ada..057e16967 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.cpp +++ b/src/video_core/renderer_vulkan/vk_scheduler.cpp @@ -212,45 +212,13 @@ void Scheduler::SubmitExecution(VkSemaphore signal_semaphore, VkSemaphore wait_s const u64 signal_value = master_semaphore->NextTick(); Record([signal_semaphore, wait_semaphore, signal_value, this](vk::CommandBuffer cmdbuf) { cmdbuf.End(); - const VkSemaphore timeline_semaphore = master_semaphore->Handle(); - - const u32 num_signal_semaphores = signal_semaphore ? 2U : 1U; - const std::array signal_values{signal_value, u64(0)}; - const std::array signal_semaphores{timeline_semaphore, signal_semaphore}; - - const u32 num_wait_semaphores = wait_semaphore ? 2U : 1U; - const std::array wait_values{signal_value - 1, u64(1)}; - const std::array wait_semaphores{timeline_semaphore, wait_semaphore}; - static constexpr std::array<VkPipelineStageFlags, 2> wait_stage_masks{ - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, - }; - - const VkTimelineSemaphoreSubmitInfo timeline_si{ - .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, - .pNext = nullptr, - .waitSemaphoreValueCount = num_wait_semaphores, - .pWaitSemaphoreValues = wait_values.data(), - .signalSemaphoreValueCount = num_signal_semaphores, - .pSignalSemaphoreValues = signal_values.data(), - }; - const VkSubmitInfo submit_info{ - .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, - .pNext = &timeline_si, - .waitSemaphoreCount = num_wait_semaphores, - .pWaitSemaphores = wait_semaphores.data(), - .pWaitDstStageMask = wait_stage_masks.data(), - .commandBufferCount = 1, - .pCommandBuffers = cmdbuf.address(), - .signalSemaphoreCount = num_signal_semaphores, - .pSignalSemaphores = signal_semaphores.data(), - }; if (on_submit) { on_submit(); } - switch (const VkResult result = device.GetGraphicsQueue().Submit(submit_info)) { + switch (const VkResult result = master_semaphore->SubmitQueue( + cmdbuf, signal_semaphore, wait_semaphore, signal_value)) { case VK_SUCCESS: break; case VK_ERROR_DEVICE_LOST: |