vulkan-3.26.1: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_multi_draw

Description

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
Not ratified
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2
Contact

Other Extension Metadata

Last Modified Date
2021-05-19
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

MultiDrawIndexedInfoEXT, MultiDrawInfoEXT, PhysicalDeviceMultiDrawFeaturesEXT, PhysicalDeviceMultiDrawPropertiesEXT, cmdDrawMultiEXT, cmdDrawMultiIndexedEXT

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.

Synopsis

Documentation

cmdDrawMultiEXT Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("vertexInfo" ::: Vector MultiDrawInfoEXT)

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

-> ("instanceCount" ::: Word32)

instanceCount is the number of instances per draw.

-> ("firstInstance" ::: Word32)

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

-> ("stride" ::: Word32)

stride is the byte stride between consecutive elements of pVertexInfo.

-> 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 graphics operations
  • This command must only be called inside of a render pass instance
  • 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 LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryInside Outside Graphics Action

See Also

VK_EXT_multi_draw, CommandBuffer, MultiDrawInfoEXT

cmdDrawMultiIndexedEXT Source #

Arguments

:: forall io. MonadIO io 
=> CommandBuffer

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

-> ("indexInfo" ::: Vector MultiDrawIndexedInfoEXT)

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

-> ("instanceCount" ::: Word32)

instanceCount is the number of instances per draw.

-> ("firstInstance" ::: Word32)

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

-> ("stride" ::: Word32)

stride is the byte stride between consecutive elements of pIndexInfo.

-> ("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.

-> 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 graphics operations
  • This command must only be called inside of a render pass instance
  • 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 LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryInside Outside Graphics Action

See Also

VK_EXT_multi_draw, CommandBuffer, MultiDrawIndexedInfoEXT

data MultiDrawInfoEXT Source #

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

MultiDrawInfoEXT 

Fields

Instances

Instances details
Storable MultiDrawInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Show MultiDrawInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Eq MultiDrawInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

FromCStruct MultiDrawInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

ToCStruct MultiDrawInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Zero MultiDrawInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

data MultiDrawIndexedInfoEXT Source #

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

MultiDrawIndexedInfoEXT 

Fields

  • firstIndex :: Word32

    firstIndex is the first index to draw.

  • indexCount :: Word32

    indexCount is the number of vertices to draw.

  • vertexOffset :: Int32

    vertexOffset is the value added to the vertex index before indexing into the vertex buffer for indexed multidraws.

Instances

Instances details
Storable MultiDrawIndexedInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Show MultiDrawIndexedInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Eq MultiDrawIndexedInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

FromCStruct MultiDrawIndexedInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

ToCStruct MultiDrawIndexedInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Zero MultiDrawIndexedInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

data PhysicalDeviceMultiDrawPropertiesEXT Source #

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.

Valid Usage (Implicit)

See Also

VK_EXT_multi_draw, StructureType

Constructors

PhysicalDeviceMultiDrawPropertiesEXT 

Fields

  • maxMultiDrawCount :: Word32

    maxMultiDrawCount indicates the maximum number of draw calls which can be batched into a single multidraw.

Instances

Instances details
Storable PhysicalDeviceMultiDrawPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Show PhysicalDeviceMultiDrawPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Eq PhysicalDeviceMultiDrawPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

FromCStruct PhysicalDeviceMultiDrawPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

ToCStruct PhysicalDeviceMultiDrawPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Zero PhysicalDeviceMultiDrawPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

data PhysicalDeviceMultiDrawFeaturesEXT Source #

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. PhysicalDeviceMultiDrawFeaturesEXT can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_EXT_multi_draw, Bool32, StructureType

Constructors

PhysicalDeviceMultiDrawFeaturesEXT 

Fields

Instances

Instances details
Storable PhysicalDeviceMultiDrawFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Show PhysicalDeviceMultiDrawFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Eq PhysicalDeviceMultiDrawFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

FromCStruct PhysicalDeviceMultiDrawFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

ToCStruct PhysicalDeviceMultiDrawFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

Zero PhysicalDeviceMultiDrawFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_multi_draw

pattern EXT_MULTI_DRAW_SPEC_VERSION :: forall a. Integral a => a Source #

type EXT_MULTI_DRAW_EXTENSION_NAME = "VK_EXT_multi_draw" Source #

pattern EXT_MULTI_DRAW_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #