C Specification

To record an indirect cluster culling drawing command, call:

// Provided by VK_HUAWEI_cluster_culling_shader
void vkCmdDrawClusterIndirectHUAWEI(
    VkCommandBuffer                             commandBuffer,
    VkBuffer                                    buffer,
    VkDeviceSize                                offset);

Parameters

  • commandBuffer is the command buffer into which the command is recorded.

  • buffer is the buffer containing draw parameters.

  • offset is the byte offset into buffer where parameters begin.

Description

vkCmdDrawClusterIndirectHUAWEI behaves similarly to vkCmdDrawClusterHUAWEI except that the parameters are read by the device from a buffer during execution. The parameters of the dispatch are encoded in a VkDispatchIndirectCommand structure taken from buffer starting at offset. Note the cluster culling shader pipeline only accepts vkCmdDrawClusterHUAWEI and vkCmdDrawClusterIndirectHUAWEI as drawing commands.

Valid Usage
  • VUID-vkCmdDrawClusterIndirectHUAWEI-drawCount-02718
    If the multiDrawIndirect feature is not enabled, drawCount must be 0 or 1

  • VUID-vkCmdDrawClusterIndirectHUAWEI-drawCount-02719
    drawCount must be less than or equal to VkPhysicalDeviceLimits::maxDrawIndirectCount

  • VUID-vkCmdDrawClusterIndirectHUAWEI-ClusterCullingHUAWEI-07824
    The current pipeline bound to VK_PIPELINE_BIND_POINT_GRAPHICS must contain a shader stage using the ClusterCullingHUAWEI Execution Model

  • VUID-vkCmdDrawClusterIndirectHUAWEI-offset-07918
    offset must be a multiple of VkPhysicalDeviceClusterCullingShaderPropertiesHUAWEI::indirectBufferOffsetAlignment

Valid Usage (Implicit)
  • VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-parameter
    commandBuffer must be a valid VkCommandBuffer handle

  • VUID-vkCmdDrawClusterIndirectHUAWEI-buffer-parameter
    buffer must be a valid VkBuffer handle

  • VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-recording
    commandBuffer must be in the recording state

  • VUID-vkCmdDrawClusterIndirectHUAWEI-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_GRAPHICS_BIT operations

  • VUID-vkCmdDrawClusterIndirectHUAWEI-renderpass
    This command must only be called inside of a render pass instance

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

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

  • VUID-vkCmdDrawClusterIndirectHUAWEI-commonparent
    Both of buffer, and commandBuffer 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

Inside

Outside

VK_QUEUE_GRAPHICS_BIT

Action

Conditional Rendering

vkCmdDrawClusterIndirectHUAWEI is affected by conditional rendering

See Also

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 2014-2026 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0