vkCmdResetEvent2KHR(3)

# vkCmdResetEvent2KHR(3) Manual Page

## Name

vkCmdResetEvent2KHR - Reset an event object to non-signaled state

Loading… please wait.

## C Specification

To unsignal the event from a device, call:

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

## Parameters

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

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

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

## Description

When vkCmdResetEvent2KHR 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 `stage` or stages that are logically earlier than `stage`.

The second synchronization scope includes only the event unsignal operation.

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

Valid Usage

- VUID-vkCmdResetEvent2KHR-stageMask-03929
  If the geometry shaders feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR`

- VUID-vkCmdResetEvent2KHR-stageMask-03930
  If the tessellation shaders feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR` or `VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR`

- VUID-vkCmdResetEvent2KHR-stageMask-03931
  If the conditional rendering feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT`

- VUID-vkCmdResetEvent2KHR-stageMask-03932
  If the fragment density map feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT`

- VUID-vkCmdResetEvent2KHR-stageMask-03933
  If the transform feedback feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT`

- VUID-vkCmdResetEvent2KHR-stageMask-03934
  If the mesh shaders feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV`

- VUID-vkCmdResetEvent2KHR-stageMask-03935
  If the task shaders feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV`

- VUID-vkCmdResetEvent2KHR-stageMask-03936
  If the shading rate image feature is not enabled, `stageMask` must not contain `VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV`

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

- VUID-vkCmdResetEvent2KHR-stageMask-03830
  `stageMask` must not include `VK_PIPELINE_STAGE_2_HOST_BIT_KHR`

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

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

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

Valid Usage (Implicit)

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

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

- VUID-vkCmdResetEvent2KHR-stageMask-parameter
  `stageMask` must be a valid combination of VkPipelineStageFlagBits2KHR values

- VUID-vkCmdResetEvent2KHR-stageMask-requiredbitmask
  `stageMask` must not be `0`

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

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

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

- VUID-vkCmdResetEvent2KHR-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 | Supported Queue Types | Pipeline Type
--- | --- | --- | ---
Primary Secondary | Outside | Graphics Compute |

## See Also

VkCommandBuffer, VkEvent, VkPipelineStageFlags2KHR

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

SPDX-License-Identifier: CC-BY-4.0