Skip to content

Commit 7fd0b58

Browse files
committed
Fix timeline semaphore value counts to include binary semaphore values in submit info
1 parent 109a4f4 commit 7fd0b58

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

attachments/32_ecosystem_utilities.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,19 +1632,19 @@ class HelloTriangleApplication
16321632
std::array<vk::Semaphore, 2> signalSemaphores = {*renderFinishedSemaphores[imageIndex], *timelineSemaphore};
16331633
std::array<uint64_t, 2> signalValues = {0, signalValue}; // Binary semaphore value is ignored
16341634

1635-
timelineInfo.waitSemaphoreValueCount = 1; // Only for the timeline semaphore
1636-
timelineInfo.pWaitSemaphoreValues = &waitValues[1];
1637-
timelineInfo.signalSemaphoreValueCount = 1; // Only for the timeline semaphore
1638-
timelineInfo.pSignalSemaphoreValues = &signalValues[1];
1635+
timelineInfo.waitSemaphoreValueCount = 2;
1636+
timelineInfo.pWaitSemaphoreValues = waitValues.data();
1637+
timelineInfo.signalSemaphoreValueCount = 2;
1638+
timelineInfo.pSignalSemaphoreValues = signalValues.data();
16391639

16401640
vk::SubmitInfo submitInfo{
16411641
.pNext = &timelineInfo,
1642-
.waitSemaphoreCount = 1, // Only wait on the binary semaphore
1643-
.pWaitSemaphores = &waitSemaphores[0],
1644-
.pWaitDstStageMask = &waitStages[0],
1642+
.waitSemaphoreCount = 2,
1643+
.pWaitSemaphores = waitSemaphores.data(),
1644+
.pWaitDstStageMask = waitStages.data(),
16451645
.commandBufferCount = 1,
16461646
.pCommandBuffers = &*commandBuffers[frameIndex],
1647-
.signalSemaphoreCount = 2, // Signal both semaphores
1647+
.signalSemaphoreCount = 2,
16481648
.pSignalSemaphores = signalSemaphores.data()};
16491649

16501650
queue.submit(submitInfo, *inFlightFences[frameIndex]);

0 commit comments

Comments
 (0)