To wait for one or more events to enter the signaled state on a device, call:
// Provided by VK_KHR_synchronization2 void vkCmdWaitEvents2KHR( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfoKHR* pDependencyInfos);
commandBufferis the command buffer into which the command is recorded.
eventCountis the length of the
pEventsis a pointer to an array of
eventCountevents to wait on.
vkCmdWaitEvents2KHR is submitted to a queue, it inserts memory
dependencies according to the elements of
pDependencyInfos and each
corresponding element of
vkCmdWaitEvents2KHR must not be used to wait on event signal
operations occurring on other queues, or signal operations execyted by
The first synchronization scope and
access scope of each memory
dependency defined by any element i of
applied to operations that occurred earlier in
submission order than the last event
signal operation on element i of
Signal operations for an event at index i are only included if:
The event was created without
VK_EVENT_CREATE_DEVICE_ONLY_BIT_KHR, and the first synchronization scope defined by the element of
pDependencyInfosat index i only includes host operations (
The second synchronization scope
and access scope of each
memory dependency defined by any element i of
are applied to operations that occurred later in
submission order than
Applications should be careful to avoid race conditions when using events.
There is no direct ordering guarantee between
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.