vkCmdBindInvocationMaskHUAWEI(3)

# vkCmdBindInvocationMaskHUAWEI(3) Manual Page

## Name

vkCmdBindInvocationMaskHUAWEI - Bind an invocation mask image on a command buffer

## C Specification

When invocation mask image usage is enabled in the bound ray tracing pipeline, the pipeline uses an invocation mask image specified by the command:

    // Provided by VK_HUAWEI_invocation_mask
    void vkCmdBindInvocationMaskHUAWEI(
        VkCommandBuffer                             commandBuffer,
        VkImageView                                 imageView,
        VkImageLayout                               imageLayout);

## Parameters

- `commandBuffer` is the command buffer into which the command will be recorded

- `imageView` is an image view handle specifying the invocation mask image `imageView` may be VK_NULL_HANDLE, which is equivalent to specifying a view of an image filled with ones value.

- `imageLayout` is the layout that the image subresources accessible from `imageView` will be in when the invocation mask image is accessed

## Description

Valid Usage

- VUID-vkCmdBindInvocationMaskHUAWEI-None-04976
  The `invocationMask` feature must be enabled

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04977
  If `imageView` is not VK_NULL_HANDLE, it must be a valid VkImageView handle of type VK_IMAGE_VIEW_TYPE_2D

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04978
  If `imageView` is not VK_NULL_HANDLE, it must have a format of VK_FORMAT_R8_UINT

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04979
  If `imageView` is not VK_NULL_HANDLE, it must have been created with the VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI usage flag set

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-04980
  If `imageView` is not VK_NULL_HANDLE, `imageLayout` must be VK_IMAGE_LAYOUT_GENERAL

- VUID-vkCmdBindInvocationMaskHUAWEI-width-04981
  Thread mask image resolution must match the `width` and `height` in vkCmdTraceRaysKHR

- VUID-vkCmdBindInvocationMaskHUAWEI-None-04982
  Each element in the invocation mask image must have the value `0` or `1`. The value 1 means the invocation is active

- VUID-vkCmdBindInvocationMaskHUAWEI-depth-04983
  `depth` in vkCmdTraceRaysKHR must be 1

Valid Usage (Implicit)

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

- VUID-vkCmdBindInvocationMaskHUAWEI-imageView-parameter
  If `imageView` is not VK_NULL_HANDLE, `imageView` must be a valid VkImageView handle

- VUID-vkCmdBindInvocationMaskHUAWEI-imageLayout-parameter
  `imageLayout` must be a valid VkImageLayout value

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

- VUID-vkCmdBindInvocationMaskHUAWEI-commandBuffer-cmdpool
  The `VkCommandPool` that `commandBuffer` was allocated from must support VK_QUEUE_COMPUTE_BIT operations

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

- VUID-vkCmdBindInvocationMaskHUAWEI-videocoding
  This command must only be called outside of a video coding scope

- VUID-vkCmdBindInvocationMaskHUAWEI-commonparent
  Both of `commandBuffer`, and `imageView` that are valid handles of non-ignored parameters 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 | Outside | VK_QUEUE_COMPUTE_BIT | State

Conditional Rendering

vkCmdBindInvocationMaskHUAWEI is not affected by conditional rendering

## See Also

VK_HUAWEI_invocation_mask, VkCommandBuffer, VkImageLayout, VkImageView

## 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