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

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

Modulevulkan-3.27GHC2021

Vulkan.Extensions.VK_EXT_device_generated_commands

Name

VK_EXT_device_generated_commands - device extension

VK_EXT_device_generated_commands

Name String

VK_EXT_device_generated_commands

Extension Type

Device extension

Registered Extension Number

573

Revision

1

Ratification Status

Ratified

Extension and Version Dependencies

VK_KHR_buffer_device_address          or

Vulkan Version 1.2      and

VK_KHR_maintenance5 or Vulkan Version 1.3

API Interactions
  • Interacts with VK_EXT_shader_object

Contact
Extension Proposal

VK_EXT_device_generated_commands

Other Extension Metadata

Last Modified Date

2024-02-23

Interactions and External Dependencies
  • This extension requires Vulkan 1.1

  • This extension requires VK_EXT_buffer_device_address or VK_KHR_buffer_device_address or Vulkan 1.2 for the ability to bind vertex and index buffers on the device.

  • This extension requires VK_KHR_maintenance5 for the ability to use VkPipelineCreateFlags2KHR.

  • This extension interacts with VK_NV_mesh_shader. If the latter extension is not supported, remove the command tokens to initiate NV mesh tasks drawing in this extension.

  • This extension interacts with VK_EXT_mesh_shader. If the latter extension is not supported, remove the command tokens to initiate EXT mesh tasks drawing in this extension.

  • This extension interacts with VK_KHR_ray_tracing_pipeline. If the latter extension is not supported, remove the command tokens to initiate ray tracing in this extension.

  • This extension interacts with VK_EXT_shader_object. If the latter extension is not supported, remove references to shader objects in this extension.

Contributors
  • Mike Blumenkrantz, VALVE

  • Hans-Kristian Arntzen, VALVE

  • Jan-Harald Fredriksen, ARM

  • Spencer Fricke, LunarG

  • Ricardo Garcia, Igalia

  • Tobias Hector, AMD

  • Baldur Karlsson, VALVE

  • Christoph Kubisch, NVIDIA

  • Lionel Landwerlin, INTEL

  • Jon Leech, Khronos

  • Ting Wei, ARM

  • Ken Shanyi Zhang, AMD

  • Faith Ekstrand, Collabora

  • Vikram Kushwaha, NVIDIA

  • Connor Abbott, VALVE

  • Samuel Pitoiset, VALVE

Description

This extension allows the device to generate a number of commands for command buffers. It provides a subset of functionality from both VK_NV_device_generated_commands and VK_NV_device_generated_commands_compute as well as some new features.

When rendering a large number of objects, the device can be leveraged to implement a number of critical functions, like updating matrices, or implementing occlusion culling, frustum culling, front to back sorting, etc. Implementing those on the device does not require any special extension, since an application is free to define its own data structures, and just process them using shaders.

To render objects which have been processed on the device, Vulkan has several ways to perform indirect rendering, from the most basic cmdDrawIndirect with one indirect draw to cmdDrawIndirectCount which supports multiple indirect draws batched together, with a way to determine number of draws at device execution time.

However, if rendering state needs to change between the indirect draws, then unextended Vulkan forces the application to speculatively record a prohibitive number of redundant indirect commands covering all possible state combinations - which could end up processing nothing after culling - or read back the processed stream and issue graphics command from the host. For very large scenes, the synchronization overhead and cost to generate the command buffer can become the bottleneck. This extension allows an application to generate a device side stream of state changes and commands, and convert it efficiently into a command buffer without having to read it back to the host.

Furthermore, it allows incremental changes to such command buffers by manipulating only partial sections of a command stream — for example pipeline and shader object bindings. Unextended Vulkan requires re-creation of entire command buffers in such a scenario, or updates synchronized on the host.

The intended usage for this extension is for the application to:

For each draw in a sequence, the following can be specified:

  • a number of vertex buffer bindings

  • a different index buffer, with an optional dynamic offset and index type

  • a number of different push constants

  • updates to bound shader stages

For each dispatch in a sequence, the following can be specified:

  • a number of different push constants

  • updates to bound shader stages

For each trace rays in a sequence, the following can be specified:

  • a number of different push constants

  • updates to bound shader stages

While the GPU can be faster than a CPU to generate the commands, it will not happen asynchronously to the device, therefore the primary use case is generating “less” total work (occlusion culling, classification to use specialized shaders, etc.).

New Object Types

New Commands

New Structures

If VK_EXT_shader_object is supported:

New Unions

New Enums

New Bitmasks

New Enum Constants

Example Code

TODO

Version History

  • Revision 1, 2024-02-23 (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.

  • 36 types
  • 11 values
  • Packagevulkan-3.27
  • Exports85
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceVK_EXT_device_generated_commands.hs
valuecmdExecuteGeneratedCommandsEXT
  1. :: (Extendss GeneratedCommandsInfoEXT a, PokeChain a, MonadIO io)
  2. => CommandBuffer

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

  3. -> "isPreprocessed" ::: Bool

    isPreprocessed represents whether the input data has already been preprocessed on the device. If it is FALSE this command will implicitly trigger the preprocessing step, otherwise not.

  4. -> GeneratedCommandsInfoEXT a

    pGeneratedCommandsInfo is a pointer to a GeneratedCommandsInfoEXT structure containing parameters affecting the generation of commands.

  5. -> io ()
#

vkCmdExecuteGeneratedCommandsEXT - Generate and execute commands on the device

Description

If the INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT flag was used to create the GeneratedCommandsInfoEXT::indirectCommandsLayout then the execution of sequences through this command may use implementation-defined ordering which is not guaranteed to be coherent using the same input data. It does not affect the order of token processing within a sequence. This is the implied ordering with INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT.

After a call to cmdExecuteGeneratedCommandsEXT, command buffer state will become undefined according to the tokens executed. This table specifies the relationship between tokens used and state invalidation.

Indirect Execution State Invalidation

Valid Usage

Valid Usage (Implicit)

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

Both

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action Indirection

Conditional Rendering

vkCmdExecuteGeneratedCommandsEXT is affected by conditional rendering

See Also

VK_EXT_device_generated_commands, Bool32, CommandBuffer, GeneratedCommandsInfoEXT

valuecmdPreprocessGeneratedCommandsEXT
  1. :: (Extendss GeneratedCommandsInfoEXT a, PokeChain a, MonadIO io)
  2. => CommandBuffer

    commandBuffer is the command buffer which does the preprocessing.

  3. -> GeneratedCommandsInfoEXT a

    pGeneratedCommandsInfo is a pointer to a GeneratedCommandsInfoEXT structure containing parameters affecting the preprocessing step.

  4. -> "stateCommandBuffer" ::: CommandBuffer

    stateCommandBuffer is a command buffer from which to snapshot current states affecting the preprocessing step. When a graphics command action token is used, graphics state is snapshotted. When a compute action command token is used, compute state is snapshotted. When a ray tracing action command token is used, ray tracing state is snapshotted. It can be deleted at any time after this command has been recorded.

  5. -> io ()
#

vkCmdPreprocessGeneratedCommandsEXT - Performs preprocessing for generated commands

Description

stateCommandBuffer access is not synchronized by the driver, meaning that this command buffer must not be modified between threads in an unsafe manner.

Valid Usage

  • commandBuffer must not be a protected command buffer

Valid Usage (Implicit)

  • pGeneratedCommandsInfo must be a valid pointer to a valid GeneratedCommandsInfoEXT structure

  • stateCommandBuffer must be a valid CommandBuffer handle

  • commandBuffer must be in the recording state

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

  • This command must only be called outside 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

  • commandBuffer must be a primary CommandBuffer

  • Both of commandBuffer, and stateCommandBuffer must have been created, allocated, or retrieved from the same Device

Host Synchronization

  • Host access to commandBuffer must be externally synchronized

  • Host access to stateCommandBuffer 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

Outside

Outside

VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT

Action

Conditional Rendering

vkCmdPreprocessGeneratedCommandsEXT is not affected by conditional rendering

See Also

VK_EXT_device_generated_commands, CommandBuffer, GeneratedCommandsInfoEXT

valuegetGeneratedCommandsMemoryRequirementsEXT
  1. :: (Extendss GeneratedCommandsMemoryRequirementsInfoEXT a, PokeChain a, Extendss MemoryRequirements2 b, PokeChain b, PeekChain b, MonadIO io)
  2. => Device

    device is the logical device that owns the buffer.

    device must be a valid Device handle

  3. -> GeneratedCommandsMemoryRequirementsInfoEXT a

    pInfo is a pointer to a GeneratedCommandsMemoryRequirementsInfoEXT structure containing parameters required for the memory requirements query.

    pInfo must be a valid pointer to a valid GeneratedCommandsMemoryRequirementsInfoEXT structure

  4. -> io (MemoryRequirements2 b)
#

vkGetGeneratedCommandsMemoryRequirementsEXT - Retrieve the buffer allocation requirements for generated commands

Description

If the size returned is zero, the preprocessing step can be skipped for this layout.

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, Device, GeneratedCommandsMemoryRequirementsInfoEXT, MemoryRequirements2

valuecreateIndirectCommandsLayoutEXT
  1. :: (Extendss IndirectCommandsLayoutCreateInfoEXT a, PokeChain a, MonadIO io)
  2. => Device

    device is the logical device that creates the indirect command layout.

  3. -> IndirectCommandsLayoutCreateInfoEXT a

    pCreateInfo is a pointer to a IndirectCommandsLayoutCreateInfoEXT structure containing parameters affecting creation of the indirect command layout.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io IndirectCommandsLayoutEXT
#

vkCreateIndirectCommandsLayoutEXT - Create an indirect command layout object

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

See Also

VK_EXT_device_generated_commands, AllocationCallbacks, Device, IndirectCommandsLayoutCreateInfoEXT, IndirectCommandsLayoutEXT

A convenience wrapper to make a compatible pair of calls to createIndirectCommandsLayoutEXT and destroyIndirectCommandsLayoutEXT

To ensure that destroyIndirectCommandsLayoutEXT is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

valuedestroyIndirectCommandsLayoutEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device that destroys the layout.

  3. -> IndirectCommandsLayoutEXT

    indirectCommandsLayout is the layout to destroy.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io ()
#

vkDestroyIndirectCommandsLayoutEXT - Destroy an indirect commands layout

Valid Usage

  • All submitted commands that refer to indirectCommandsLayout must have completed execution

  • If AllocationCallbacks were provided when indirectCommandsLayout was created, a compatible set of callbacks must be provided here

  • If no AllocationCallbacks were provided when indirectCommandsLayout was created, pAllocator must be NULL

Valid Usage (Implicit)

  • device must be a valid Device handle

  • If indirectCommandsLayout is not NULL_HANDLE, indirectCommandsLayout must be a valid IndirectCommandsLayoutEXT handle

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • If indirectCommandsLayout is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to indirectCommandsLayout must be externally synchronized

See Also

VK_EXT_device_generated_commands, AllocationCallbacks, Device, IndirectCommandsLayoutEXT

valuecreateIndirectExecutionSetEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device that creates the indirect execution set.

  3. -> IndirectExecutionSetCreateInfoEXT

    pCreateInfo is a pointer to a IndirectExecutionSetCreateInfoEXT structure containing parameters affecting creation of the indirect execution set.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io IndirectExecutionSetEXT
#

vkCreateIndirectExecutionSetEXT - Create an indirect execution set

Valid Usage

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

See Also

VK_EXT_device_generated_commands, AllocationCallbacks, Device, IndirectExecutionSetCreateInfoEXT, IndirectExecutionSetEXT

A convenience wrapper to make a compatible pair of calls to createIndirectExecutionSetEXT and destroyIndirectExecutionSetEXT

To ensure that destroyIndirectExecutionSetEXT is always called: pass bracket (or the allocate function from your favourite resource management library) as the last argument. To just extract the pair pass (,) as the last argument.

valuedestroyIndirectExecutionSetEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the indirect execution set.

  3. -> IndirectExecutionSetEXT

    indirectExecutionSet is the indirect execution set to destroy.

  4. -> "allocator" ::: Maybe AllocationCallbacks

    pAllocator controls host memory allocation as described in the Memory Allocation chapter.

  5. -> io ()
#

vkDestroyIndirectExecutionSetEXT - Destroy an indirect execution set

Valid Usage

  • All submitted commands that refer to indirectExecutionSet must have completed execution

Valid Usage (Implicit)

  • device must be a valid Device handle

  • If indirectExecutionSet is not NULL_HANDLE, indirectExecutionSet must be a valid IndirectExecutionSetEXT handle

  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure

  • If indirectExecutionSet is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to indirectExecutionSet must be externally synchronized

See Also

VK_EXT_device_generated_commands, AllocationCallbacks, Device, IndirectExecutionSetEXT

valueupdateIndirectExecutionSetPipelineEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the indirect execution set.

  3. -> IndirectExecutionSetEXT

    indirectExecutionSet is the indirect execution set being updated.

  4. -> "executionSetWrites" ::: Vector WriteIndirectExecutionSetPipelineEXT

    pExecutionSetWrites is a pointer to an array of WriteIndirectExecutionSetPipelineEXT structures describing the elements to update.

  5. -> io ()
#

vkUpdateIndirectExecutionSetPipelineEXT - Update the contents of an indirect execution set

Valid Usage

  • executionSetWriteCount must be less than or equal to IndirectExecutionSetPipelineInfoEXT::maxPipelineCount

  • Each element in the pExecutionSetWrites array must have a unique WriteIndirectExecutionSetPipelineEXT::index

  • Each member of the Indirect Execution Set referenced by the update command must not be in use by the device

  • If initialPipeline was created without PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, each pipeline in pExecutionSetWrites must also have been created without PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT

  • If initialPipeline was created with PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, each pipeline in pExecutionSetWrites must also have been created with PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT

  • If initialPipeline was created without PIPELINE_CREATE_2_DESCRIPTOR_HEAP_BIT_EXT, the layout of each pipeline in pExecutionSetWrites must be compatible with the initialPipeline used to create the Indirect Execution Set

  • Each pipeline in the Indirect Execution Set must have identically defined static and dynamic state values to the initialPipeline used to create the Indirect Execution Set

  • Each pipeline in the Indirect Execution Set must have identically defined fragment outputs interface to the initialPipeline used to create the Indirect Execution Set

  • Each pipeline in the Indirect Execution Set must match the initialPipeline used to create the Indirect Execution Set in its included shader stages

  • Each pipeline in the Indirect Execution Set must match the initialPipeline used to create the Indirect Execution Set in its use of FragDepth

  • Each pipeline in the Indirect Execution Set must match the initialPipeline used to create the Indirect Execution Set in its use of SampleMask

  • Each pipeline in the Indirect Execution Set must match the initialPipeline used to create the Indirect Execution Set in its use of StencilExportEXT

Valid Usage (Implicit)

  • device must be a valid Device handle

  • indirectExecutionSet must be a valid IndirectExecutionSetEXT handle

  • pExecutionSetWrites must be a valid pointer to an array of executionSetWriteCount valid WriteIndirectExecutionSetPipelineEXT structures

  • executionSetWriteCount must be greater than 0

  • indirectExecutionSet must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to indirectExecutionSet must be externally synchronized

See Also

VK_EXT_device_generated_commands, Device, IndirectExecutionSetEXT, WriteIndirectExecutionSetPipelineEXT

valueupdateIndirectExecutionSetShaderEXT
  1. :: MonadIO io
  2. => Device

    device is the logical device that owns the indirect execution set.

  3. -> IndirectExecutionSetEXT

    indirectExecutionSet is the indirect execution set being updated.

  4. -> "executionSetWrites" ::: Vector WriteIndirectExecutionSetShaderEXT

    pExecutionSetWrites is a pointer to an array of WriteIndirectExecutionSetShaderEXT structures describing the elements to update.

  5. -> io ()
#

vkUpdateIndirectExecutionSetShaderEXT - Update the contents of an indirect execution set

Valid Usage

  • Each element in the pExecutionSetWrites array must have a unique WriteIndirectExecutionSetShaderEXT::index

  • Each member of the Indirect Execution Set referenced by the update command must not be in use by the device

  • If the shaders in pInitialShaders were created without SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, each shader in pExecutionSetWrites must also have been created without SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

  • If the shaders in pInitialShaders were created with SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, each pipeline in pExecutionSetWrites must also have been created with SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT

  • If the shaders in pInitialShaders were created without SHADER_CREATE_DESCRIPTOR_HEAP_BIT_EXT, the descriptor layout of each shader in pExecutionSetWrites must be compatible with the initial layout info used to create the Indirect Execution Set

  • Each fragment shader element in the Indirect Execution Set must have identically defined fragment outputs interface to the initial shader state used to create the Indirect Execution Set

  • Each fragment shader element in the Indirect Execution Set must match the initial shader state used to create the Indirect Execution Set in its use of FragDepth

  • Each fragment shader element in the Indirect Execution Set must match the initial shader state used to create the Indirect Execution Set in its use of SampleMask

  • Each fragment shader element in the Indirect Execution Set must match the initial shader state used to create the Indirect Execution Set in its use of StencilExportEXT

Valid Usage (Implicit)

  • device must be a valid Device handle

  • indirectExecutionSet must be a valid IndirectExecutionSetEXT handle

  • pExecutionSetWrites must be a valid pointer to an array of executionSetWriteCount valid WriteIndirectExecutionSetShaderEXT structures

  • executionSetWriteCount must be greater than 0

  • indirectExecutionSet must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to indirectExecutionSet must be externally synchronized

See Also

VK_EXT_device_generated_commands, Device, IndirectExecutionSetEXT, WriteIndirectExecutionSetShaderEXT

VkPhysicalDeviceDeviceGeneratedCommandsFeaturesEXT - Structure describing the device-generated compute features that can be supported by an implementation

Members

This structure describes the following features:

Description

If the PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT 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 PhysicalDeviceDeviceGeneratedCommandsFeaturesEXT, 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_device_generated_commands, Bool32, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT - Structure describing push descriptor limits that can be supported by an implementation

Description

If the PhysicalDeviceDeviceGeneratedCommandsPropertiesEXT 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_device_generated_commands, Bool32, IndirectCommandsInputModeFlagsEXT, ShaderStageFlags, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkGeneratedCommandsPipelineInfoEXT - Structure specifying a pipeline for use with indirect command preprocessing

Structure Chaining

Extends the structures

See Also

VK_EXT_device_generated_commands, Pipeline, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkGeneratedCommandsShaderInfoEXT - Structure specifying shader objects for use with indirect command preprocessing

Structure Chaining

Extends the structures

See Also

VK_EXT_device_generated_commands, ShaderEXT, StructureType

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkGeneratedCommandsMemoryRequirementsInfoEXT - Structure specifying parameters for the reservation of preprocess buffer space

Description

If the action command token for the layout is not a COUNT-type multi-draw indirect token, maxDrawCount is ignored.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, IndirectCommandsLayoutEXT, IndirectExecutionSetEXT, StructureType, getGeneratedCommandsMemoryRequirementsEXT

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero

VkIndirectExecutionSetPipelineInfoEXT - Struct specifying parameters of a newly created indirect execution set containing only pipelines

Description

The characteristics of initialPipeline will be used to validate all pipelines added to the set even if they are removed from the set or destroyed.

When an Indirect Execution Set created with pipelines is used, initialPipeline constitutes the initial shader state.

Valid Usage

Valid Usage (Implicit)

  • initialPipeline must be a valid Pipeline handle

See Also

VK_EXT_device_generated_commands, IndirectExecutionSetInfoEXT, Pipeline, StructureType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkIndirectExecutionSetShaderLayoutInfoEXT - Struct specifying descriptor layout parameters of a newly created indirect execution set containing only shader objects

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, DescriptorSetLayout, IndirectExecutionSetShaderInfoEXT, StructureType

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkIndirectExecutionSetShaderInfoEXT - Struct specifying parameters of a newly created indirect execution set containing only shader objects

Description

The characteristics of pInitialShaders will be used to validate all shaders added to the set even if they are removed from the set or destroyed.

When an Indirect Execution Set created with shader objects is used, pInitialShaders constitutes the initial shader state.

If pSetLayoutInfos is NULL, the descriptor layout parameters are inherited from the shader object.

Valid Usage

Valid Usage (Implicit)

  • pInitialShaders must be a valid pointer to an array of shaderCount valid ShaderEXT handles

  • If pSetLayoutInfos is not NULL, pSetLayoutInfos must be a valid pointer to an array of shaderCount valid IndirectExecutionSetShaderLayoutInfoEXT structures

  • If pushConstantRangeCount is not 0, pPushConstantRanges must be a valid pointer to an array of pushConstantRangeCount valid PushConstantRange structures

  • shaderCount must be greater than 0

See Also

VK_EXT_device_generated_commands, IndirectExecutionSetInfoEXT, IndirectExecutionSetShaderLayoutInfoEXT, PushConstantRange, ShaderEXT, StructureType

Constructors

Instances4Show, FromCStruct, ToCStruct, Zero

VkIndirectExecutionSetCreateInfoEXT - Structure specifying parameters of a newly created indirect execution set

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, IndirectExecutionSetInfoEXT, IndirectExecutionSetInfoTypeEXT, StructureType, createIndirectExecutionSetEXT

Constructors

Instances3Show, ToCStruct, Zero
datadata GeneratedCommandsInfoEXT (es :: [Type])
#

VkGeneratedCommandsInfoEXT - Structure specifying parameters for the generation of commands

Description

If sequenceCountAddress is not NULL, then maxSequenceCount is the maximum number of sequences that can be executed. The actual number is min(maxSequenceCount, *sequenceCountAddress). If sequenceCountAddress is NULL, then maxSequenceCount is the exact number of sequences to execute.

If the action command token for the layout is not a COUNT-type multi-draw indirect token, maxDrawCount is ignored.

Valid Usage

Valid Usage (Implicit)

  • shaderStages must be a valid combination of ShaderStageFlagBits values

  • shaderStages must not be 0

  • If indirectExecutionSet is not NULL_HANDLE, indirectExecutionSet must be a valid IndirectExecutionSetEXT handle

  • indirectCommandsLayout must be a valid IndirectCommandsLayoutEXT handle

  • indirectAddress must be a valid DeviceAddress value

  • If preprocessAddress is not 0, preprocessAddress must be a valid DeviceAddress value

  • If sequenceCountAddress is not 0, sequenceCountAddress must be a valid DeviceAddress value

  • Both of indirectCommandsLayout, and indirectExecutionSet that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same Device

See Also

VK_EXT_device_generated_commands, DeviceAddress, DeviceSize, IndirectCommandsLayoutEXT, IndirectExecutionSetEXT, ShaderStageFlags, StructureType, cmdExecuteGeneratedCommandsEXT, cmdPreprocessGeneratedCommandsEXT

Constructors

Instances5Extensible, Show, FromCStruct, ToCStruct, Zero

VkWriteIndirectExecutionSetPipelineEXT - Struct specifying pipeline update information for an indirect execution set

Valid Usage

Valid Usage (Implicit)

  • pipeline must be a valid Pipeline handle

See Also

VK_EXT_device_generated_commands, Pipeline, StructureType, updateIndirectExecutionSetPipelineEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkWriteIndirectExecutionSetShaderEXT - Struct specifying shader object update information for an indirect execution set

Description

Shaders need not be stored in the Indirect Execution Set according to their stage. The only restriction for shader indices within a set is that the value of the index must be less than the maximum number of shaders in the set.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, VK_EXT_shader_object, ShaderEXT, StructureType, updateIndirectExecutionSetShaderEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkIndirectCommandsLayoutCreateInfoEXT - Structure specifying the parameters of a newly created indirect commands layout object

Description

The following code illustrates some of the flags:

void cmdProcessAllSequences(cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, sequencesCount)
{
  for (s = 0; s < sequencesCount; s++)
  {
    sUsed = s;

    if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_EXT) {
      sUsed = incoherent_implementation_dependent_permutation[ sUsed ];
    }

    cmdProcessSequence( cmd, indirectExecutionSet, indirectCommandsLayout, indirectAddress, sUsed );
  }
}

When tokens are consumed, an offset is computed based on token offset and stream stride. The resulting offset is required to be aligned. The alignment for a specific token is equal to the scalar alignment of the data type as defined in Alignment Requirements, or 4, whichever is lower.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, IndirectCommandsLayoutTokenEXT, IndirectCommandsLayoutUsageFlagsEXT, PipelineLayout, ShaderStageFlags, StructureType, createIndirectCommandsLayoutEXT

Constructors

Instances4Extensible, Show, ToCStruct, Zero
datadata IndirectCommandsLayoutTokenEXT (es :: [Type])
#

VkIndirectCommandsLayoutTokenEXT - Struct specifying the details of an indirect command layout token

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, IndirectCommandsLayoutCreateInfoEXT, IndirectCommandsTokenDataEXT, IndirectCommandsTokenTypeEXT, StructureType

Constructors

Instances4Extensible, Show, ToCStruct, Zero

VkDrawIndirectCountIndirectCommandEXT - Structure specifying input data for a single draw-type command token

Description

The corresponding indirect draw structure data will be read from the buffer address.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, DeviceAddress

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkIndirectCommandsVertexBufferTokenEXT - Structure specifying layout token info for a single index buffer command token

Valid Usage

See Also

VK_EXT_device_generated_commands, IndirectCommandsTokenDataEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkBindVertexBufferIndirectCommandEXT - Structure specifying input data for a single vertex buffer command token

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, DeviceAddress

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkIndirectCommandsIndexBufferTokenEXT - Structure specifying layout token info for a single index buffer command token

Description

This allows for easy layering of Vulkan atop other APIs. When INDIRECT_COMMANDS_INPUT_MODE_DXGI_INDEX_BUFFER_EXT is specified, the indirect buffer can contain a D3D12_INDEX_BUFFER_VIEW instead of BindIndexBufferIndirectCommandEXT as D3D’s DXGI format value is mapped to the IndexType. It works as both structs are otherwise binary compatible.

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, IndirectCommandsInputModeFlagBitsEXT, IndirectCommandsTokenDataEXT

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkBindIndexBufferIndirectCommandEXT - Structure specifying input data for a single index buffer command token

Valid Usage

  • The bufferAddress must be aligned to the IndexType of the indexType used

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, DeviceAddress, IndexType

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero

VkIndirectCommandsPushConstantTokenEXT - Structure specifying layout token info for a single push constant command token

Description

The stageFlags member of updateRange is ignored.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_device_generated_commands, IndirectCommandsTokenDataEXT, PushConstantRange

Constructors

Instances5Show, Storable, FromCStruct, ToCStruct, Zero

VkIndirectCommandsExecutionSetTokenEXT - Structure specifying input data for a single execution set command token

Valid Usage

Valid Usage (Implicit)

  • shaderStages must be a valid combination of ShaderStageFlagBits values

  • shaderStages must not be 0

See Also

VK_EXT_device_generated_commands, IndirectCommandsTokenDataEXT, IndirectExecutionSetInfoTypeEXT, ShaderStageFlags

Constructors

Instances6Eq, Show, Storable, FromCStruct, ToCStruct, Zero
Instances3Show, ToCStruct, Zero
Instances3Show, ToCStruct, Zero

VkIndirectCommandsLayoutUsageFlagBitsEXT - Bitmask specifying allowed usage of an indirect commands layout

Description

See Also

VK_EXT_device_generated_commands, IndirectCommandsLayoutUsageFlagsEXT

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …

VkIndirectExecutionSetInfoTypeEXT - Enum specifying allowed usage of an indirect execution set

Description

See Also

VK_EXT_device_generated_commands, IndirectCommandsExecutionSetTokenEXT, IndirectExecutionSetCreateInfoEXT

Instances6Eq, Ord, Read, Show, Storable, Zero

VkIndirectCommandsInputModeFlagBitsEXT - Bitmask specifying allowed usage of an indirect commands layout

Description

See Also

VK_EXT_device_generated_commands, IndirectCommandsIndexBufferTokenEXT, IndirectCommandsInputModeFlagsEXT

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …
newtypenewtype IndirectCommandsTokenTypeEXT
#

VkIndirectCommandsTokenTypeEXT - Enum specifying token commands

Description

'

Common Tokens

Command Data

INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT

u32[]

array of indices into the indirect execution set

INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT

u32[]

raw data

INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_EXT

u8[]

raw data

INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT

u32

placeholder data (not accessed by shader)

INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_DATA_SEQUENCE_INDEX_EXT

u32

placeholder data (not accessed by shader)

Compute Tokens

INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_EXT

DispatchIndirectCommand

Ray Tracing Tokens

INDIRECT_COMMANDS_TOKEN_TYPE_TRACE_RAYS2_EXT

TraceRaysIndirectCommand2KHR

Graphics State Tokens

INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_EXT

BindIndexBufferIndirectCommandEXT

INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT

BindVertexBufferIndirectCommandEXT

Graphics Draw Tokens

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT

DrawIndexedIndirectCommand

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT

DrawIndirectCommand

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT

DrawMeshTasksIndirectCommandEXT

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV_EXT

DrawMeshTasksIndirectCommandNV

Graphics Draw Count Tokens

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_COUNT_EXT

DrawIndirectCountIndirectCommandEXT

with VkDrawIndexedIndirectCommand

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_COUNT_EXT

DrawIndirectCountIndirectCommandEXT

with VkDrawIndirectCommand

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_EXT

DrawIndirectCountIndirectCommandEXT

with VkDrawMeshTasksIndirectCommandEXT

INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_COUNT_NV_EXT

DrawIndirectCountIndirectCommandEXT

with VkDrawMeshTasksIndirectCommandNV

Supported Indirect Command Tokens

See Also

VK_EXT_device_generated_commands, IndirectCommandsLayoutTokenEXT

Instances6Eq, Ord, Read, Show, Storable, Zero
newtypenewtype IndirectCommandsLayoutEXT
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype IndirectExecutionSetEXT
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype ShaderEXT
#
Instances7Eq, Ord, Show, Storable, HasObjectType, IsHandle, …
newtypenewtype ShaderCreateFlagBitsEXT
#

VkShaderCreateFlagBitsEXT - Bitmask controlling how a shader object is created

Description

See Also

VK_EXT_shader_object, ShaderCreateFlagsEXT

Instances8Eq, Ord, Read, Show, Bits, FiniteBits, …