Function Prototype

vkCreateEvent

Create a new event object

To create an event, call:

VkResult vkCreateEvent(
    VkDevice device,
    const VkEventCreateInfo* pCreateInfo,
    const VkAllocationCallbacks* pAllocator,
    VkEvent* pEvent);
  • device is the logical device that creates the event.
  • pCreateInfo is a pointer to a VkEventCreateInfo structure containing information about how the event is to be created.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.
  • pEvent is a pointer to a handle in which the resulting event object is returned.

When created, the event object is in the unsignaled state.

Valid Usage

VUID-vkCreateEvent-device-09672

device must support at least one queue family with one of the VK_QUEUE_VIDEO_ENCODE_BIT_KHR, VK_QUEUE_VIDEO_DECODE_BIT_KHR, VK_QUEUE_COMPUTE_BIT, or VK_QUEUE_GRAPHICS_BIT capabilities

VUID-vkCreateEvent-events-04468

If the VK_KHR_portability_subset extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::events is VK_FALSE, then the implementation does not support events, and vkCreateEvent must not be used

Valid Usage (Implicit)

VUID-vkCreateEvent-device-parameter

device must be a valid VkDevice handle

VUID-vkCreateEvent-pCreateInfo-parameter

pCreateInfo must be a valid pointer to a valid VkEventCreateInfo structure

VUID-vkCreateEvent-pAllocator-parameter

If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure

VUID-vkCreateEvent-pEvent-parameter

pEvent must be a valid pointer to a VkEvent handle