To wait for one or more events to enter the signaled state on a device, call:
// Provided by VK_VERSION_1_3 void vkCmdWaitEvents2( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* pDependencyInfos);
or the equivalent command
// Provided by VK_KHR_synchronization2 void vkCmdWaitEvents2KHR( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, const VkDependencyInfo* 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.
vkCmdWaitEvents2 is submitted to a queue, it inserts memory
dependencies according to the elements of
pDependencyInfos and each
corresponding element of
vkCmdWaitEvents2 must not be used to wait on event signal operations
occurring on other queues, or signal operations executed 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, 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.