Structures

VkGeneratedCommandsInfoEXT

Structure specifying parameters for the generation of commands

The VkGeneratedCommandsInfoEXT is defined as:

typedef struct VkGeneratedCommandsInfoEXT {
    VkStructureType sType;
    const void* pNext;
    VkShaderStageFlags shaderStages;
    VkIndirectExecutionSetEXT indirectExecutionSet;
    VkIndirectCommandsLayoutEXT indirectCommandsLayout;
    VkDeviceAddress indirectAddress;
    VkDeviceSize indirectAddressSize;
    VkDeviceAddress preprocessAddress;
    VkDeviceSize preprocessSize;
    uint32_t maxSequenceCount;
    VkDeviceAddress sequenceCountAddress;
    uint32_t maxDrawCount;
} VkGeneratedCommandsInfoEXT;
  • sType is a VkStructureType value identifying this structure.
  • pNext is NULL or a pointer to a structure extending this structure.
  • shaderStages is the mask of shader stages used by the commands.
  • indirectExecutionSet is the indirect execution set to be used for binding shaders.
  • indirectCommandsLayout is the VkIndirectCommandsLayoutEXT that specifies the command sequence data.
  • indirectAddress is an address that holds the indirect buffer data.
  • indirectAddressSize is the size in bytes of indirect buffer data starting at indirectAddress.
  • preprocessAddress specifies a physical address of the VkBuffer used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsEXT with its isPreprocessed set to VK_TRUE, then the preprocessing step is skipped but data in this address may still be modified. The contents and the layout of this address are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse.
  • preprocessSize is the maximum byte size within preprocessAddress that is available for preprocessing.
  • maxSequenceCount is used to determine the number of sequences to execute.
  • sequenceCountAddress specifies an optional physical address of a single uint32_t value containing the requested number of sequences to execute.
  • maxDrawCount is the maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens. The draw count in the indirect buffer is clamped to this value for these token types.

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

VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-11064

VkDeviceMemory objects bound to the underlying buffer for preprocessAddress must have been allocated using one of the memory types allowed in the memoryTypeBits member of the VkMemoryRequirements structure returned by vkGetGeneratedCommandsMemoryRequirementsEXT

VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11065

If the indirectCommandsLayout uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, then the indirectExecutionSet’s push constant layout must contain the updateRange specified in VkIndirectCommandsPushConstantTokenEXT

VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11066

If the indirectCommandsLayout uses a token of VK_INDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, then the indirectExecutionSet’s push constant layout must contain the updateRange specified in VkIndirectCommandsPushConstantTokenEXT

VUID-VkGeneratedCommandsInfoEXT-maxSequenceCount-11067

maxSequenceCount must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::maxIndirectSequenceCount and VkGeneratedCommandsMemoryRequirementsInfoEXT::maxSequencesCount that was used to determine the preprocessSize

VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11068

If sequenceCountAddress is not NULL, the value contained in the address must be less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::maxIndirectSequenceCount and VkGeneratedCommandsMemoryRequirementsInfoEXT::maxSequencesCount that was used to determine the preprocessSize

VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-11069

The underlying buffer for preprocessAddress must have the VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT bit set in its usage flag

VUID-VkGeneratedCommandsInfoEXT-preprocessAddress-11070

If the underlying buffer for preprocessAddress is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11144

If the indirectCommandsLayout contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, then the descriptor and push constant layout info provided either by pipelineLayout or through a VkPipelineLayoutCreateInfo in pNext of the VkIndirectCommandsLayoutCreateInfoEXT used to create indirectCommandsLayout must be compatible with the descriptor and push constant layout info used by indirectExecutionSet

VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11002

If indirectCommandsLayout was created with a token sequence that contained the VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the shader stages used to create the initial shader state of indirectExecutionSet must equal the VkIndirectCommandsExecutionSetTokenEXT::shaderStages used to create indirectCommandsLayout

VUID-VkGeneratedCommandsInfoEXT-preprocessSize-11071

preprocessSize must be greater than or equal to the memory requirement’s size returned by vkGetGeneratedCommandsMemoryRequirementsEXT using the matching inputs (indirectCommandsLayout, …​) as within this structure

VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11072

The underlying buffer for sequenceCountAddress must have the VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT bit set in its usage flag

VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11073

If sequenceCountAddress is not NULL, sequenceCountAddressmust be aligned to 4

VUID-VkGeneratedCommandsInfoEXT-indirectAddress-11074

indirectAddress must be aligned to 4

VUID-VkGeneratedCommandsInfoEXT-sequenceCountAddress-11075

If the underlying buffer for sequenceCountAddress is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

VUID-VkGeneratedCommandsInfoEXT-indirectAddressSize-11077

indirectAddressSize must be greater than zero

VUID-VkGeneratedCommandsInfoEXT-maxDrawCount-11078

When not ignored, maxDrawCount × maxSequenceCount must be less than 2^24

VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11079

If `indirectCommandsLayout` was created using a
`VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXT` token

and shader objects are not bound then the currently bound graphics pipeline must have been created with VK_DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE in pDynamicStates

VUID-VkGeneratedCommandsInfoEXT-indirectCommandsLayout-11083

If the token sequence of the passed indirectCommandsLayout contains a VK_INDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXT token, the indirectExecutionSet must not be VK_NULL_HANDLE

VUID-VkGeneratedCommandsInfoEXT-indirectExecutionSet-11080

If `indirectExecutionSet` is [VK_NULL_HANDLE](/man/VK_NULL_HANDLE), a
[VkGeneratedCommandsPipelineInfoEXT](/man/VkGeneratedCommandsPipelineInfoEXT)

or VkGeneratedCommandsShaderInfoEXTmust be included in the pNext chain

Valid Usage (Implicit)

VUID-VkGeneratedCommandsInfoEXT-sType-sType

sType must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXT

VUID-VkGeneratedCommandsInfoEXT-shaderStages-parameter

shaderStages must be a valid combination of VkShaderStageFlagBits values

VUID-VkGeneratedCommandsInfoEXT-indirectExecutionSet-parameter

If indirectExecutionSet is not VK_NULL_HANDLE, indirectExecutionSet must be a valid VkIndirectExecutionSetEXT handle

VUID-VkGeneratedCommandsInfoEXT-commonparent

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