@@ -1640,19 +1640,19 @@ class HelloTriangleApplication
16401640 std::array<vk::Semaphore, 2 > signalSemaphores = {*renderFinishedSemaphores[imageIndex], *timelineSemaphore};
16411641 std::array<uint64_t , 2 > signalValues = {0 , signalValue}; // Binary semaphore value is ignored
16421642
1643- timelineInfo.waitSemaphoreValueCount = 1 ; // Only for the timeline semaphore
1644- timelineInfo.pWaitSemaphoreValues = & waitValues[ 1 ] ;
1645- timelineInfo.signalSemaphoreValueCount = 1 ; // Only for the timeline semaphore
1646- timelineInfo.pSignalSemaphoreValues = & signalValues[ 1 ] ;
1643+ timelineInfo.waitSemaphoreValueCount = 2 ;
1644+ timelineInfo.pWaitSemaphoreValues = waitValues. data () ;
1645+ timelineInfo.signalSemaphoreValueCount = 2 ;
1646+ timelineInfo.pSignalSemaphoreValues = signalValues. data () ;
16471647
16481648 vk::SubmitInfo submitInfo{
16491649 .pNext = &timelineInfo,
1650- .waitSemaphoreCount = 1 , // Only wait on the binary semaphore
1651- .pWaitSemaphores = & waitSemaphores[ 0 ] ,
1652- .pWaitDstStageMask = & waitStages[ 0 ] ,
1650+ .waitSemaphoreCount = 2 ,
1651+ .pWaitSemaphores = waitSemaphores. data () ,
1652+ .pWaitDstStageMask = waitStages. data () ,
16531653 .commandBufferCount = 1 ,
16541654 .pCommandBuffers = &*commandBuffers[frameIndex],
1655- .signalSemaphoreCount = 2 , // Signal both semaphores
1655+ .signalSemaphoreCount = 2 ,
16561656 .pSignalSemaphores = signalSemaphores.data ()};
16571657
16581658 queue.submit (submitInfo, *inFlightFences[frameIndex]);
0 commit comments