]> O.S.I.I.S - jp/vkhelpers.git/commitdiff
pWaitDstStageMask for each semaphore
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 8 Jun 2022 15:23:36 +0000 (17:23 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 8 Jun 2022 15:23:36 +0000 (17:23 +0200)
src/vkhelpers.c

index 3dff6e1dd057d2c2b6210bf40f134b084997f3f0..4f595e1c8d9f3f77d22673ae5c1f6bb52aa677a2 100644 (file)
@@ -96,7 +96,7 @@ void vkh_cmd_submit_timelined (VkhQueue queue, VkCommandBuffer *pCmdBuff, VkSema
        VK_CHECK_RESULT(vkQueueSubmit(queue->queue, 1, &submitInfo, VK_NULL_HANDLE));
 }
 void vkh_cmd_submit_timelined2 (VkhQueue queue, VkCommandBuffer *pCmdBuff, VkSemaphore timelines[2], const uint64_t waits[2], const uint64_t signals[2]) {
-       static VkPipelineStageFlags stageFlags = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
+       static VkPipelineStageFlags stageFlags[2] = { VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT };
        VkTimelineSemaphoreSubmitInfo timelineInfo;
        timelineInfo.sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO;
        timelineInfo.pNext = NULL;
@@ -112,7 +112,7 @@ void vkh_cmd_submit_timelined2 (VkhQueue queue, VkCommandBuffer *pCmdBuff, VkSem
        submitInfo.pWaitSemaphores = timelines;
        submitInfo.signalSemaphoreCount  = 2;
        submitInfo.pSignalSemaphores = timelines;
-       submitInfo.pWaitDstStageMask = &stageFlags,
+       submitInfo.pWaitDstStageMask = stageFlags,
        submitInfo.commandBufferCount = 1;
        submitInfo.pCommandBuffers = pCmdBuff;