vkCmdSetEvent(3)

# vkCmdSetEvent(3) Manual Page

## Name

vkCmdSetEvent - Set an event object to signaled state

## C Specification

To set the state of an event to signaled from a device, call:

Warning | This functionality is superseded by vkCmdSetEvent2. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_0
    void vkCmdSetEvent(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags                        stageMask);

## Parameters

- `commandBuffer` is the command buffer into which the command is recorded.

- `event` is the event that will be signaled.

- `stageMask` specifies the source stage mask used to determine the first synchronization scope.

## Description

`vkCmdSetEvent` behaves identically to vkCmdSetEvent2, except that it does not define an access scope, and must only be used with vkCmdWaitEvents, not vkCmdWaitEvents2.

Valid Usage

- VUID-vkCmdSetEvent-stageMask-04090
  If the `geometryShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT

- VUID-vkCmdSetEvent-stageMask-04091
  If the `tessellationShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT or VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT

- VUID-vkCmdSetEvent-stageMask-04092
  If the `conditionalRendering` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04093
  If the `fragmentDensityMap` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04094
  If the `transformFeedback` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04095
  If the `meshShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_MESH_SHADER_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-04096
  If the `taskShader` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_TASK_SHADER_BIT_EXT

- VUID-vkCmdSetEvent-stageMask-07318
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR

- VUID-vkCmdSetEvent-stageMask-03937
  If the `synchronization2` feature is not enabled, `stageMask` must not be `0`

- VUID-vkCmdSetEvent-stageMask-07949
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stageMask` must not contain VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR

- VUID-vkCmdSetEvent-stageMask-10754
  If the `accelerationStructure` feature is not enabled, `stageMask` must not contain VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR

- VUID-vkCmdSetEvent-stageMask-06457
  Any pipeline stage included in `stageMask` must be supported by the capabilities of the queue family specified by the `queueFamilyIndex` member of the VkCommandPoolCreateInfo structure that was used to create the `VkCommandPool` that `commandBuffer` was allocated from, as specified in the table of supported pipeline stages

- VUID-vkCmdSetEvent-stageMask-01149
  `stageMask` must not include VK_PIPELINE_STAGE_HOST_BIT

- VUID-vkCmdSetEvent-commandBuffer-01152
  The current device mask of `commandBuffer` must include exactly one physical device

Valid Usage (Implicit)

- VUID-vkCmdSetEvent-commandBuffer-parameter
  `commandBuffer` must be a valid VkCommandBuffer handle

- VUID-vkCmdSetEvent-event-parameter
  `event` must be a valid VkEvent handle

- VUID-vkCmdSetEvent-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits values

- VUID-vkCmdSetEvent-commandBuffer-recording
  `commandBuffer` must be in the recording state

- VUID-vkCmdSetEvent-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT, VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_VIDEO_DECODE_BIT_KHR, or VK_QUEUE_VIDEO_ENCODE_BIT_KHR operations

- VUID-vkCmdSetEvent-renderpass
  This command must only be called outside of a render pass instance

- VUID-vkCmdSetEvent-suspended
  This command must not be called between suspended render pass instances

- VUID-vkCmdSetEvent-commonparent
  Both of `commandBuffer`, and `event` must have been created, allocated, or retrieved from the same VkDevice

Host Synchronization

- Host access to `commandBuffer` must be externally synchronized

- Host access to the `VkCommandPool` that `commandBuffer` was allocated from must be externally synchronized

Command Properties

Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type
--- | --- | --- | --- | ---
Primary Secondary | Outside | Both | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT VK_QUEUE_VIDEO_DECODE_BIT_KHR VK_QUEUE_VIDEO_ENCODE_BIT_KHR | Synchronization

Conditional Rendering

vkCmdSetEvent is not affected by conditional rendering

## See Also

VK_VERSION_1_0, VkCommandBuffer, VkEvent, VkPipelineStageFlags

## Document Notes

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.

## Copyright

Copyright 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0