From 7fd0b58ce797fe2c5023b50a288d2e27c07cf293 Mon Sep 17 00:00:00 2001 From: swinston Date: Wed, 28 Jan 2026 01:55:27 -0800 Subject: [PATCH] Fix timeline semaphore value counts to include binary semaphore values in submit info --- attachments/32_ecosystem_utilities.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/attachments/32_ecosystem_utilities.cpp b/attachments/32_ecosystem_utilities.cpp index 596f424e..aca76eac 100644 --- a/attachments/32_ecosystem_utilities.cpp +++ b/attachments/32_ecosystem_utilities.cpp @@ -1632,19 +1632,19 @@ class HelloTriangleApplication std::array signalSemaphores = {*renderFinishedSemaphores[imageIndex], *timelineSemaphore}; std::array 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]);