Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions attachments/32_ecosystem_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1632,19 +1632,19 @@ class HelloTriangleApplication
std::array<vk::Semaphore, 2> signalSemaphores = {*renderFinishedSemaphores[imageIndex], *timelineSemaphore};
std::array<uint64_t, 2> signalValues = {0, signalValue}; // Binary semaphore value is ignored

timelineInfo.waitSemaphoreValueCount = 1; // Only for the timeline semaphore
timelineInfo.pWaitSemaphoreValues = &waitValues[1];
timelineInfo.signalSemaphoreValueCount = 1; // Only for the timeline semaphore
timelineInfo.pSignalSemaphoreValues = &signalValues[1];
timelineInfo.waitSemaphoreValueCount = 2;
timelineInfo.pWaitSemaphoreValues = waitValues.data();
timelineInfo.signalSemaphoreValueCount = 2;
timelineInfo.pSignalSemaphoreValues = signalValues.data();

vk::SubmitInfo submitInfo{
.pNext = &timelineInfo,
.waitSemaphoreCount = 1, // Only wait on the binary semaphore
.pWaitSemaphores = &waitSemaphores[0],
.pWaitDstStageMask = &waitStages[0],
.waitSemaphoreCount = 2,
.pWaitSemaphores = waitSemaphores.data(),
.pWaitDstStageMask = waitStages.data(),
.commandBufferCount = 1,
.pCommandBuffers = &*commandBuffers[frameIndex],
.signalSemaphoreCount = 2, // Signal both semaphores
.signalSemaphoreCount = 2,
.pSignalSemaphores = signalSemaphores.data()};

queue.submit(submitInfo, *inFlightFences[frameIndex]);
Expand Down
Loading