C Specification

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

// Provided by VK_EXT_multi_draw
void vkCmdDrawMultiEXT(
    VkCommandBuffer                             commandBuffer,
    uint32_t                                    drawCount,
    const VkMultiDrawInfoEXT*                   pVertexInfo,
    uint32_t                                    instanceCount,
    uint32_t                                    firstInstance,
    uint32_t                                    stride);

Parameters

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

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

  • pVertexInfo is a pointer to an array of VkMultiDrawInfoEXT with vertex 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 pVertexInfo.

Description

The number of draws recorded is drawCount, with each draw reading, sequentially, a firstVertex and a vertexCount from pVertexInfo. For each recorded draw, primitives are assembled as for vkCmdDraw, and drawn instanceCount times with instanceIndex starting with firstInstance and sequentially for each instance.

Valid Usage
  • VUID-vkCmdDrawMultiEXT-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-vkCmdDrawMultiEXT-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-vkCmdDrawMultiEXT-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-vkCmdDrawMultiEXT-None-04933
    The multiDraw feature must be enabled

  • VUID-vkCmdDrawMultiEXT-drawCount-04934
    drawCount must be less than VkPhysicalDeviceMultiDrawPropertiesEXT::maxMultiDrawCount

  • VUID-vkCmdDrawMultiEXT-drawCount-04935
    If drawCount is greater than zero, pVertexInfo must be a valid pointer to memory containing one or more valid instances of VkMultiDrawInfoEXT structures

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

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

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

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

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

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

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

vkCmdDrawMultiEXT 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