Compute shader chapter documentation not properly updated to timeline semaphores
@gpx1000 is already working on this.
Since Dec 7, 2025.
Assessment
This issue has not been assessed yet.
Description
The compute shader chapter code been updated to use Timeline semaphores. The documentation though hasn't been properly updated and still uses separate fences, e.g.:
We then use these to synchronize the compute buffer submission with the graphics submission:
[,c++]
----
{
// Compute submission
while ( vk::Result::eTimeout == device->waitForFences(**computeInFlightFences[frameIndex], vk::True, UINT64_MAX) )
;
updateUniformBuffer(frameIndex);
device->resetFences( **computeInFlightFences[frameIndex] );
computeCommandBuffers[frameIndex]->reset();
recordComputeCommandBuffer();
const vk::SubmitInfo submitInfo({}, {}, {**computeCommandBuffers[frameIndex]}, { **computeFinishedSemaphores[frameIndex]});
computeQueue->submit(submitInfo, **computeInFlightFences[frameIndex]);
}
{
// Graphics submission
while ( vk::Result::eTimeout == device->waitForFences(**inFlightFences[frameIndex], vk::True, UINT64_MAX))
...
device->resetFences( **inFlightFences[frameIndex] );
commandBuffers[frameIndex]->reset();
recordCommandBuffer(imageIndex);
vk::Semaphore waitSemaphores[] = {**presentCompleteSemaphore[frameIndex], **computeFinishedSemaphores[frameIndex]};
vk::PipelineStageFlags waitDestinationStageMask[] = { vk::PipelineStageFlagBits::eVertexInput, vk::PipelineStageFlagBits::eColorAttachmentOutput };
const vk::SubmitInfo submitInfo( waitSemaphores, waitDestinationStageMask, {**commandBuffers[frameIndex]}, {**renderFinishedSemaphore[frameIndex]} );
graphicsQueue->submit(submitInfo, **inFlightFences[frameIndex]);
----
- Dominant language
- C++
- Stars
- 424
- Forks
- 127
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from KhronosGroup/Vulkan-Tutorial
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
KhronosGroup/Vulkan-Tutorial#519 · 1 assignee ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
KhronosGroup/Vulkan-Tutorial#511 · 1 assignee ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
KhronosGroup/Vulkan-Tutorial#508 · 1 assignee ·
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
KhronosGroup/Vulkan-Tutorial#499 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
KhronosGroup/Vulkan-Tutorial#498 ·
All issues in KhronosGroup/Vulkan-Tutorial
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100