vpr::Semaphore class

The semaphore is Vulkan's device-exclusive synchronization primitive.

They are used to synchronize command submissions across different queues and queue families, and cannot have their state queried or modified by the device. Semaphores are automatically reset after being used in a batch of command submissions.

VkQueueSubmit() is the only command capable of modifying the internal state of a semaphore object. While usage of these objects is internally atomic for the API, external semaphore references (e.g, handles in the pWaitSemaphores and pSignalSemaphores array of VkSubmitInfo) must have their usage synchronized (in case one reference ends up in a signal for one submission, and a wait for another submission, but lack of synchronization submits the wait submission before the signal submission).