C Specification

To record an ordered sequence of indexed draws which have no state changes between them, call:

// Provided by VK_EXT_multi_draw
void vkCmdDrawMultiIndexedEXT(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    drawCount,
    const VkMultiDrawIndexedInfoEXT*            pIndexInfo,
    uint32_t                                    instanceCount,
    uint32_t                                    firstInstance,
    uint32_t                                    stride,
    const int32_t*                              pVertexOffset);

Parameters

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

  • drawCount is the number of draws to execute, and can be zero.

  • pIndexInfo is a pointer to an array of VkMultiDrawIndexedInfoEXT with index information to be drawn.

  • instanceCount is the number of instances per draw.

  • firstInstance is the instance ID of the first instance in each draw.

  • stride is the byte stride between consecutive elements of pIndexInfo.

  • pVertexOffset is NULL or a pointer to the value added to the vertex index before indexing into the vertex buffer. When specified, VkMultiDrawIndexedInfoEXT::offset is ignored.

Description

The number of draws recorded is drawCount, with each draw reading, sequentially, a firstIndex and an indexCount from pIndexInfo. For each recorded draw, primitives are assembled as for vkCmdDrawIndexed, and drawn instanceCount times with instanceIndex starting with firstInstance and sequentially for each instance. If pVertexOffset is NULL, a vertexOffset is also read from pIndexInfo, otherwise the value from dereferencing pVertexOffset is used.

Valid Usage
  • VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02712
    If commandBuffer is a protected command buffer and protectedNoFault is not supported, any resource written to by the VkPipeline object bound to the pipeline bind point used by this command must not be an unprotected resource

  • VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-02713
    If commandBuffer is a protected command buffer and protectedNoFault is not supported, pipeline stages other than the framebuffer-space and compute stages in the VkPipeline object bound to the pipeline bind point used by this command must not write to any resource

  • VUID-vkCmdDrawMultiIndexedEXT-commandBuffer-04617
    If any of the shader stages of the VkPipeline bound to the pipeline bind point used by this command uses the RayQueryKHR capability, then commandBuffer must not be a protected command buffer

  • VUID-vkCmdDrawMultiIndexedEXT-None-07312
    If the maintenance6 feature is not enabled, a valid index buffer must be bound

  • VUID-vkCmdDrawMultiIndexedEXT-robustBufferAccess2-08798
    If the robustBufferAccess2 feature is not enabled, (indexSize × (firstIndex + indexCount) + offset) must be less than or equal to the size of the bound index buffer, with indexSize being based on the type specified by indexType, where the index buffer, indexType, and offset are specified via vkCmdBindIndexBuffer or vkCmdBindIndexBuffer2. If vkCmdBindIndexBuffer2 is used to bind the index buffer, the size of the bound index buffer is vkCmdBindIndexBuffer2::size

  • VUID-vkCmdDrawMultiIndexedEXT-None-04937
    The multiDraw feature must be enabled

  • VUID-vkCmdDrawMultiIndexedEXT-drawCount-04939
    drawCount must be less than VkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount

  • VUID-vkCmdDrawMultiIndexedEXT-drawCount-04940
    If drawCount is greater than zero, pIndexInfo must be a valid pointer to memory containing one or more valid instances of VkMultiDrawIndexedInfoEXT structures

  • VUID-vkCmdDrawMultiIndexedEXT-drawCount-09629
    If drawCount is greater than 1, stride must be a multiple of 4 and must be greater than or equal to sizeof(VkMultiDrawIndexedInfoEXT)

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

  • VUID-vkCmdDrawMultiIndexedEXT-pVertexOffset-parameter
    If pVertexOffset is not NULL, pVertexOffset must be a valid pointer to a valid int32_t value

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

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

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

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

  • VUID-vkCmdDrawMultiIndexedEXT-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

Inside

Outside

VK_QUEUE_GRAPHICS_BIT

Action

Conditional Rendering

vkCmdDrawMultiIndexedEXT 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