C Specification

To record an indirect dispatching command, call:

// Provided by VK_KHR_device_address_commands
void vkCmdDispatchIndirect2KHR(
    VkCommandBuffer                             commandBuffer,
    const VkDispatchIndirect2InfoKHR*           pInfo);

Parameters

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

  • pInfo is a pointer to a VkDispatchIndirect2InfoKHR structure defining parameters of this command.

Description

vkCmdDispatchIndirect2KHR behaves similarly to vkCmdDispatchIndirect except that the parameters, encoded in a VkDispatchIndirectCommand structure, are read by the device from an address range during execution.

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

  • VUID-vkCmdDispatchIndirect2KHR-pInfo-parameter
    pInfo must be a valid pointer to a valid VkDispatchIndirect2InfoKHR structure

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

  • VUID-vkCmdDispatchIndirect2KHR-commandBuffer-cmdpool
    The VkCommandPool that commandBuffer was allocated from must support VK_QUEUE_COMPUTE_BIT operations

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

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

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

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

Action

Conditional Rendering

vkCmdDispatchIndirect2KHR 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