To signal an event from a device, call:
// Provided by VK_VERSION_1_3 void vkCmdSetEvent2( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo);
or the equivalent command
// Provided by VK_KHR_synchronization2 void vkCmdSetEvent2KHR( VkCommandBuffer commandBuffer, VkEvent event, const VkDependencyInfo* pDependencyInfo);
commandBufferis the command buffer into which the command is recorded.
eventis the event that will be signaled.
pDependencyInfois a pointer to a VkDependencyInfo structure defining the first scopes of this operation.
When vkCmdSetEvent2 is submitted to a queue, it defines the first half
of memory dependencies defined by
pDependencyInfo, as well as an event
signal operation which sets the event to the signaled state.
A memory dependency is defined between the event signal operation and
commands that occur earlier in submission order.
The first synchronization scope and
access scope are defined by
the union of all the memory dependencies defined by
and are applied to all operations that occur earlier in
Queue family ownership transfers and
image layout transitions
pDependencyInfo are also included in the first scopes.
Future vkCmdWaitEvents2 commands rely on all values of each element in
pDependencyInfo matching exactly with those used to signal the
vkCmdWaitEvents must not be used to wait on the result of a signal
operation defined by
The extra information provided by vkCmdSetEvent2 compared to vkCmdSetEvent allows implementations to more efficiently schedule the operations required to satisfy the requested dependencies. With vkCmdSetEvent, the full dependency information is not known until vkCmdWaitEvents is recorded, forcing implementations to insert the required operations at that point and not before.
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.