Following concern is probably related to https://github.com/KhronosGroup/Vulkan-Docs/issues/370
There is currently no way to query if WaitSemaphores, passed via VkPresentInfoKHR to vkQueuePresentKHR, are ready to be re-used (i.e. are set back to UNSIGNALED state).
The UNSIGNALED state is a requirement when passing SignalSemaphores to functions
like acquireNextImageKHR() or vkQueueSubmit().
Even when preallocating swapchain-image-count semaphores, it could in theory happen
that a semaphore was not yet set back to UNSIGNALED state before re-using it when no
device/queue waitIdle() is used between frames.
While for the acquireNextImageKHR semaphore it is possible to guarantee the UNSIGNALED
state by waiting for the command buffer submit fence from some older frame (ring buffer approach),
there is no elegant way for the semaphores used for signaling submit completion or finished image
ownership transfer to a separate present queue.
So I was wondering what is the best solution. Is it expensive to just create new semaphores
every frame? Currently my workaround is to preallocate a bit more than “swapchain-image-count”
semaphores and rely on the command buffer fences to throttle when too many frames pile up.
If vkQueuePresentKHR would offer a fence that could be used to check if a frame was actually
presented on screen that would also allow to guarantee that all semaphores from a past frame
are ready to be re-used.