diff --git a/src/gui/rhi/qrhivulkan.cpp b/src/gui/rhi/qrhivulkan.cpp index dbef24848ea..7ff3f335d82 100644 --- a/src/gui/rhi/qrhivulkan.cpp +++ b/src/gui/rhi/qrhivulkan.cpp @@ -2847,18 +2847,17 @@ QRhi::FrameOpResult QRhiVulkan::endAndSubmitPrimaryCommandBuffer(VkCommandBuffer if (signalSem) signalSemaphoresForQueueSubmit.append(*signalSem); + submitInfo.waitSemaphoreCount = uint32_t(waitSemaphoresForQueueSubmit.count()); if (!waitSemaphoresForQueueSubmit.isEmpty()) { - submitInfo.waitSemaphoreCount = uint32_t(waitSemaphoresForQueueSubmit.count()); submitInfo.pWaitSemaphores = waitSemaphoresForQueueSubmit.constData(); + semaphoresWaitMasksForQueueSubmit.resize(waitSemaphoresForQueueSubmit.count(), VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT); + submitInfo.pWaitDstStageMask = semaphoresWaitMasksForQueueSubmit.constData(); } + submitInfo.signalSemaphoreCount = uint32_t(signalSemaphoresForQueueSubmit.count()); if (!signalSemaphoresForQueueSubmit.isEmpty()) { - submitInfo.signalSemaphoreCount = uint32_t(signalSemaphoresForQueueSubmit.count()); submitInfo.pSignalSemaphores = signalSemaphoresForQueueSubmit.constData(); } - VkPipelineStageFlags psf = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; - submitInfo.pWaitDstStageMask = &psf; - err = df->vkQueueSubmit(gfxQueue, 1, &submitInfo, cmdFence); waitSemaphoresForQueueSubmit.clear(); diff --git a/src/gui/rhi/qrhivulkan_p.h b/src/gui/rhi/qrhivulkan_p.h index cdd2b42ea34..13bcf741fbf 100644 --- a/src/gui/rhi/qrhivulkan_p.h +++ b/src/gui/rhi/qrhivulkan_p.h @@ -1089,6 +1089,7 @@ public: #endif QVarLengthArray waitSemaphoresForQueueSubmit; + QVarLengthArray semaphoresWaitMasksForQueueSubmit; QVarLengthArray signalSemaphoresForQueueSubmit; QVarLengthArray waitSemaphoresForPresent; };