KhronosGroup / KhronosGroup/Vulkan-Docs

Swapchain and timeline semaphores

Open
#2,665 3 comments 4 reactions 1 assignee Claimed by @cubanismo View on GitHub
Feature Request Resolving Inside Khronos System Integration
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

Hello,

It is already Vulkan 1.4 and Timeline semaphores have been in standard for a long time. Yet the documentation states that:

```
All elements of the pWaitSemaphores member of pPresentInfo must be created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_BINARY
```

That makes a set of present semaphores. Also there is `vkAcquireNextImageKHR` which accepts a binary semaphore, which makes it another set of semaphores.

I was wondering, would it be possible to replace this with timeline semaphores instead, which could have meaning of present ID. Completion value on this semaphore could be interpreted as swapchain image index as well with a simple division.

Next, something like `vkAcquireNextImageKHR` could just return a value to wait upon with the timeline semaphore as well.

Overall that could reduce the maintenance burden of the swapchain while letting less mistakes and more variability of implementations, effectively reducing number of semaphores to 2.

Is that a good idea? Feel free to correct me if something does not make sense.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.