HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_multi_draw

Name

VK_EXT_multi_draw - device extension

VK_EXT_multi_draw

Name String

VK_EXT_multi_draw

Extension Type

Device extension

Registered Extension Number

393

Revision

1

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_get_physical_device_properties2

or

Vulkan Version 1.1

Contact

Other Extension Metadata

Last Modified Date

2021-05-19

Interactions and External Dependencies
  • Interacts with Vulkan 1.1.

  • Interacts with VK_KHR_shader_draw_parameters.

IP Status

No known IP claims.

Contributors
  • Mike Blumenkrantz, VALVE

  • Piers Daniell, NVIDIA

  • Faith Ekstrand, INTEL

  • Spencer Fricke, SAMSUNG

  • Ricardo Garcia, IGALIA

  • Jon Leech, KHRONOS

  • Stu Smith, AMD

Description

Processing multiple draw commands in sequence incurs measurable overhead within drivers due to repeated state checks and updates during dispatch. This extension enables passing the entire sequence of draws directly to the driver in order to avoid any such overhead, using an array of MultiDrawInfoEXT or MultiDrawIndexedInfoEXT structs with cmdDrawMultiEXT or cmdDrawMultiIndexedEXT, respectively. These functions could be used any time multiple draw commands are being recorded without any state changes between them in order to maximize performance.

New Commands

New Structures

New Enum Constants

New or Modified Built-In Variables

  • (modified)DrawIndex

Version History

  • Revision 1, 2021-01-20 (Mike Blumenkrantz)

    • Initial version

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification.

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

  • 6 types
  • 2 values
  • Packagevulkan-3.27
  • Exports10
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_multi_draw.hs
valuecmdDrawMultiEXT
  1. :: MonadIO io
  2. => CommandBuffer

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

  3. -> "vertexInfo" ::: Vector MultiDrawInfoEXT

    pVertexInfo is a pointer to an array of MultiDrawInfoEXT with vertex information to be drawn.

  4. -> "instanceCount" ::: Word32

    instanceCount is the number of instances per draw.

  5. -> "firstInstance" ::: Word32

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

  6. -> "stride" ::: Word32

    stride is the byte stride between consecutive elements of pVertexInfo.

  7. -> io ()
#

vkCmdDrawMultiEXT - Draw primitives

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 cmdDraw, and drawn instanceCount times with instanceIndex starting with firstInstance and sequentially for each instance.

Valid Usage

Valid Usage (Implicit)

  • commandBuffer must be in the recording state

  • The CommandPool that commandBuffer was allocated from must support QUEUE_GRAPHICS_BIT operations

  • This command must only be called inside of a render pass instance

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

  • 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 CommandPool 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

VK_EXT_multi_draw, CommandBuffer, MultiDrawInfoEXT

valuecmdDrawMultiIndexedEXT
  1. :: MonadIO io
  2. => CommandBuffer

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

  3. -> "indexInfo" ::: Vector MultiDrawIndexedInfoEXT

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

  4. -> "instanceCount" ::: Word32

    instanceCount is the number of instances per draw.

  5. -> "firstInstance" ::: Word32

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

  6. -> "stride" ::: Word32

    stride is the byte stride between consecutive elements of pIndexInfo.

  7. -> "vertexOffset" ::: Maybe Int32

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

  8. -> io ()
#

vkCmdDrawMultiIndexedEXT - Draw primitives

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 cmdDrawIndexed, 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

Valid Usage (Implicit)

  • If pVertexOffset is not NULL, pVertexOffset must be a valid pointer to a valid int32_t value

  • commandBuffer must be in the recording state

  • The CommandPool that commandBuffer was allocated from must support QUEUE_GRAPHICS_BIT operations

  • This command must only be called inside of a render pass instance

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

  • 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 CommandPool 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

VK_EXT_multi_draw, CommandBuffer, MultiDrawIndexedInfoEXT

datadata MultiDrawInfoEXT
#

VkMultiDrawInfoEXT - Structure specifying a multi-draw command

Description

The members of MultiDrawInfoEXT have the same meaning as the firstVertex and vertexCount parameters in cmdDraw.

See Also

VK_EXT_multi_draw, cmdDrawMultiEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkMultiDrawIndexedInfoEXT - Structure specifying a multi-draw command

Description

The firstIndex, indexCount, and vertexOffset members of MultiDrawIndexedInfoEXT have the same meaning as the firstIndex, indexCount, and vertexOffset parameters, respectively, of cmdDrawIndexed.

See Also

VK_EXT_multi_draw, cmdDrawMultiIndexedEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceMultiDrawPropertiesEXT - Structure describing multidraw limits of an implementation

Members

The members of the PhysicalDeviceMultiDrawPropertiesEXT structure describe the following features:

Description

If the PhysicalDeviceMultiDrawPropertiesEXT structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Structure Chaining

Extends the structure

See Also

VK_EXT_multi_draw, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceMultiDrawFeaturesEXT - Structure describing whether the implementation supports multi draw functionality

Members

This structure describes the following features:

Description

If the PhysicalDeviceMultiDrawFeaturesEXT structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. If the application wishes to use a Device with any features described by PhysicalDeviceMultiDrawFeaturesEXT, it must add an instance of the structure, with the desired feature members set to TRUE, to the pNext chain of DeviceCreateInfo when creating the Device.

Structure Chaining

Extends the structures

See Also

VK_EXT_multi_draw, Bool32, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero