vkCmdResetEvent2(3)

# vkCmdResetEvent2(3) Manual Page

## Name

vkCmdResetEvent2 - Reset an event object to non-signaled state

Loading… please wait.

## C Specification

To unsignal the event from a device, call:

    // Provided by VK_VERSION_1_3
    void vkCmdResetEvent2(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags2                       stageMask);

or the equivalent command

    // Provided by VK_KHR_synchronization2
    void vkCmdResetEvent2KHR(
        VkCommandBuffer                             commandBuffer,
        VkEvent                                     event,
        VkPipelineStageFlags2                       stageMask);

## Parameters

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

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

- `stageMask` is a VkPipelineStageFlags2 mask of pipeline stages used to determine the first synchronization scope.

## Description

When vkCmdResetEvent2 is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and defines an event unsignal operation which resets the event to the unsignaled state.

The first synchronization scope includes all commands that occur earlier in submission order. The synchronization scope is limited to operations by `stageMask` or stages that are logically earlier than `stageMask`.

The second synchronization scope includes only the event unsignal operation.

If `event` is already in the unsignaled state when vkCmdResetEvent2 is executed on the device, then this command has no effect, no event unsignal operation occurs, and no execution dependency is generated.

Valid Usage

- VUID-vkCmdResetEvent2-stageMask-03929
  If the `geometryShader` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT`

- VUID-vkCmdResetEvent2-stageMask-03930
  If the `tessellationShader` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT` or `VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT`

- VUID-vkCmdResetEvent2-stageMask-03931
  If the `conditionalRendering` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT`

- VUID-vkCmdResetEvent2-stageMask-03932
  If the `fragmentDensityMap` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT`

- VUID-vkCmdResetEvent2-stageMask-03933
  If the `transformFeedback` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT`

- VUID-vkCmdResetEvent2-stageMask-03934
  If the `meshShader` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_EXT`

- VUID-vkCmdResetEvent2-stageMask-03935
  If the `taskShader` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_EXT`

- VUID-vkCmdResetEvent2-stageMask-07316
  If neither of the `shadingRateImage` or the `attachmentFragmentShadingRate` features are enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR`

- VUID-vkCmdResetEvent2-stageMask-04957
  If the `subpassShading` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_SUBPASS_SHADER_BIT_HUAWEI`

- VUID-vkCmdResetEvent2-stageMask-04995
  If the `invocationMask` feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_INVOCATION_MASK_BIT_HUAWEI`

- VUID-vkCmdResetEvent2-stageMask-07946
  If neither the VK_NV_ray_tracing extension or the `rayTracingPipeline` feature are enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR`

- VUID-vkCmdResetEvent2-synchronization2-03829
  The `synchronization2` feature must be enabled

- VUID-vkCmdResetEvent2-stageMask-03830
  `stageMask` must not include `VK_PIPELINE_STAGE_2_HOST_BIT`

- VUID-vkCmdResetEvent2-event-03831
  There must be an execution dependency between `vkCmdResetEvent2` and the execution of any vkCmdWaitEvents that includes `event` in its `pEvents` parameter

- VUID-vkCmdResetEvent2-event-03832
  There must be an execution dependency between `vkCmdResetEvent2` and the execution of any vkCmdWaitEvents2 that includes `event` in its `pEvents` parameter

- VUID-vkCmdResetEvent2-commandBuffer-03833
  `commandBuffer`’s current device mask must include exactly one physical device

Valid Usage (Implicit)

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

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

- VUID-vkCmdResetEvent2-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits2 values

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

- VUID-vkCmdResetEvent2-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support graphics, compute, decode, or encode operations

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

- VUID-vkCmdResetEvent2-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 | Graphics Compute Decode Encode | Synchronization

## See Also

VK_KHR_synchronization2, VK_VERSION_1_3, VkCommandBuffer, VkEvent, VkPipelineStageFlags2

## 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-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0