vulkan-3.14.1: Bindings to the Vulkan graphics API.
Safe HaskellNone
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
Extension and Version Dependencies
  • Requires Vulkan 1.0
Contact

Other Extension Metadata

Last Modified Date
2021-05-19
IP Status
No known IP claims.
Contributors
  • Mike Blumenkrantz, VALVE
  • Piers Daniell, NVIDIA
  • Jason 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 to draw.

-> ("firstInstance" ::: Word32)

firstInstance is the instance ID of the first instance to draw.

-> ("stride" ::: Word32)

stride is the byte stride between consecutive elements of pVertexInfo.

-> io () 

vkCmdDrawMultiEXT - Draw primitives

Description

drawCount draws are executed with parameters taken from pVertexInfo. The number of draw commands recorded is drawCount, with each command reading, sequentially, a firstVertex and a vertexCount from pVertexInfo.

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

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 ScopeSupported Queue Types
Primary SecondaryInside Graphics

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 to draw.

-> ("firstInstance" ::: Word32)

firstInstance is the instance ID of the first instance to 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

drawCount indexed draws are executed with parameters taken from pIndexInfo. The number of draw commands recorded is drawCount, with each command reading, sequentially, a firstIndex and an indexCount from pIndexInfo. 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

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 ScopeSupported Queue Types
Primary SecondaryInside Graphics

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
Eq 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

Storable 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
Eq 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

Storable 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 VkPhysicalDeviceMultiDrawPropertiesPropertiesEXT 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
Eq 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

Storable 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

The members of the PhysicalDeviceMultiDrawFeaturesEXT structure describe 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
Eq 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

Storable 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 #