VkGeneratedCommandsInfoNV
The VkGeneratedCommandsInfoNV is defined as:
typedef struct VkGeneratedCommandsInfoNV {
VkStructureType sType;
const void* pNext;
VkPipelineBindPoint pipelineBindPoint;
VkPipeline pipeline;
VkIndirectCommandsLayoutNV indirectCommandsLayout;
uint32_t streamCount;
const VkIndirectCommandsStreamNV* pStreams;
uint32_t sequencesCount;
VkBuffer preprocessBuffer;
VkDeviceSize preprocessOffset;
VkDeviceSize preprocessSize;
VkBuffer sequencesCountBuffer;
VkDeviceSize sequencesCountOffset;
VkBuffer sequencesIndexBuffer;
VkDeviceSize sequencesIndexOffset;
} VkGeneratedCommandsInfoNV;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.pipelineBindPointis the VkPipelineBindPoint used for thepipeline.pipelineis the VkPipeline used in the generation and execution process.indirectCommandsLayoutis the VkIndirectCommandsLayoutNV that provides the command sequence to generate.streamCountdefines the number of input streamspStreamsis a pointer to an array ofstreamCount
VkIndirectCommandsStreamNV structures providing the input data for the tokens used inindirectCommandsLayout.sequencesCountis the maximum number of sequences to reserve. IfsequencesCountBufferis VK_NULL_HANDLE, this is also the actual number of sequences generated.preprocessBufferis the VkBuffer that is used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsNV with itsisPreprocessedset toVK_TRUE, then the preprocessing step is skipped and data in this buffer will not be modified. The contents and the layout of this buffer are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse.preprocessOffsetis the byte offset intopreprocessBufferwhere the preprocessed data is stored.preprocessSizeis the maximum byte size within thepreprocessBufferafter thepreprocessOffsetthat is available for preprocessing.sequencesCountBufferis aVkBufferin which the actual number of sequences is provided as singleuint32_tvalue.sequencesCountOffsetis the byte offset intosequencesCountBufferwhere the count value is stored.sequencesIndexBufferis aVkBufferthat encodes the used sequence indices asuint32_tarray.sequencesIndexOffsetis the byte offset intosequencesIndexBufferwhere the index values start.
Valid Usage
VUID-VkGeneratedCommandsInfoNV-pipeline-02912
The provided pipeline must match the pipeline bound at execution
time
VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-02913
If the indirectCommandsLayout uses a token of
VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV, then the
pipeline must have been created with multiple shader groups
VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-02914
If the indirectCommandsLayout uses a token of
VK_INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV, then the
pipeline must have been created with
VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV set in
VkGraphicsPipelineCreateInfo::flags
VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-02915
If the indirectCommandsLayout uses a token of
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NV, then the
pipeline’s VkPipelineLayout must match the
VkIndirectCommandsLayoutTokenNV::pushconstantPipelineLayout
VUID-VkGeneratedCommandsInfoNV-streamCount-02916
streamCount must match the indirectCommandsLayout’s
streamCount
VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09084
If pipelineBindPoint is of type
VK_PIPELINE_BIND_POINT_COMPUTE, then the pipeline must have
been created with the flag
VK_PIPELINE_CREATE_INDIRECT_BINDABLE_BIT_NV
VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09085
If pipelineBindPoint is of type
VK_PIPELINE_BIND_POINT_COMPUTE, then the pipeline must have
been created with a VkComputePipelineIndirectBufferInfoNV
structure specifying a valid address where its metadata will be saved
VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09086
If pipelineBindPoint is of type
VK_PIPELINE_BIND_POINT_COMPUTE, then
vkCmdUpdatePipelineIndirectBufferNV must have been called on that
pipeline to save its metadata to a device address
VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-09087
If pipelineBindPoint is of type
VK_PIPELINE_BIND_POINT_COMPUTE, and if
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV is used, then
pipeline must be VK_NULL_HANDLE
VUID-VkGeneratedCommandsInfoNV-sequencesCount-02917
sequencesCount must be less or equal to
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::maxIndirectSequenceCount
and
VkGeneratedCommandsMemoryRequirementsInfoNV::maxSequencesCount
that was used to determine the preprocessSize
VUID-VkGeneratedCommandsInfoNV-preprocessBuffer-02918
preprocessBuffer must have the
VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set in its usage flag
VUID-VkGeneratedCommandsInfoNV-preprocessOffset-02919
preprocessOffset must be aligned to
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::minIndirectCommandsBufferOffsetAlignment
VUID-VkGeneratedCommandsInfoNV-preprocessBuffer-02971
If preprocessBuffer is non-sparse then it must be bound
completely and contiguously to a single VkDeviceMemory object
VUID-VkGeneratedCommandsInfoNV-preprocessSize-02920
preprocessSize must be at least equal to the memory requirements size returned by [vkGetGeneratedCommandsMemoryRequirementsNV](/man/vkGetGeneratedCommandsMemoryRequirementsNV) using the matching inputs (indirectCommandsLayout`, …) as within this
structure
VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02921
sequencesCountBuffer can be set if the actual used count of
sequences is sourced from the provided buffer.
In that case the sequencesCount serves as upper bound
VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02922
If sequencesCountBuffer is not VK_NULL_HANDLE, its usage
flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set
VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02923
If sequencesCountBuffer is not VK_NULL_HANDLE,
sequencesCountOffset must be aligned to
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::minSequencesCountBufferOffsetAlignment
VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-02972
If sequencesCountBuffer is not VK_NULL_HANDLE and is
non-sparse then it must be bound completely and contiguously to a
single VkDeviceMemory object
VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02924
If indirectCommandsLayout’s
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV is set,
sequencesIndexBuffer must be set otherwise it must be
VK_NULL_HANDLE
VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02925
If sequencesIndexBuffer is not VK_NULL_HANDLE, its usage
flag must have the VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set
VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02926
If sequencesIndexBuffer is not VK_NULL_HANDLE,
sequencesIndexOffset must be aligned to
VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::minSequencesIndexBufferOffsetAlignment
VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-02973
If sequencesIndexBuffer is not VK_NULL_HANDLE and is
non-sparse then it must be bound completely and contiguously to a
single VkDeviceMemory object
VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-07078
If the indirectCommandsLayout uses a token of
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV, then the
pipeline must contain a shader stage using the MeshNV
Execution Model
VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-07079
If the indirectCommandsLayout uses a token of
VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV, then the
pipeline must contain a shader stage using the MeshEXT
Execution Model
Valid Usage (Implicit)
VUID-VkGeneratedCommandsInfoNV-sType-sType
sType must be VK_STRUCTURE_TYPE_GENERATED_COMMANDS_INFO_NV
VUID-VkGeneratedCommandsInfoNV-pNext-pNext
pNext must be NULL
VUID-VkGeneratedCommandsInfoNV-pipelineBindPoint-parameter
pipelineBindPoint must be a valid VkPipelineBindPoint value
VUID-VkGeneratedCommandsInfoNV-pipeline-parameter
If pipeline is not VK_NULL_HANDLE, pipeline must be a valid VkPipeline handle
VUID-VkGeneratedCommandsInfoNV-indirectCommandsLayout-parameter
indirectCommandsLayout must be a valid VkIndirectCommandsLayoutNV handle
VUID-VkGeneratedCommandsInfoNV-pStreams-parameter
pStreams must be a valid pointer to an array of streamCount valid VkIndirectCommandsStreamNV structures
VUID-VkGeneratedCommandsInfoNV-preprocessBuffer-parameter
preprocessBuffer must be a valid VkBuffer handle
VUID-VkGeneratedCommandsInfoNV-sequencesCountBuffer-parameter
If sequencesCountBuffer is not VK_NULL_HANDLE, sequencesCountBuffer must be a valid VkBuffer handle
VUID-VkGeneratedCommandsInfoNV-sequencesIndexBuffer-parameter
If sequencesIndexBuffer is not VK_NULL_HANDLE, sequencesIndexBuffer must be a valid VkBuffer handle
VUID-VkGeneratedCommandsInfoNV-streamCount-arraylength
streamCount must be greater than 0
VUID-VkGeneratedCommandsInfoNV-commonparent
Each of indirectCommandsLayout, pipeline, preprocessBuffer, sequencesCountBuffer, and sequencesIndexBuffer that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevice