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;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.pipelineBindPoint
is the VkPipelineBindPoint used for thepipeline
.pipeline
is the VkPipeline used in the generation and execution process.indirectCommandsLayout
is the VkIndirectCommandsLayoutNV that provides the command sequence to generate.streamCount
defines the number of input streamspStreams
is a pointer to an array ofstreamCount
VkIndirectCommandsStreamNV structures providing the input data for the tokens used inindirectCommandsLayout
.sequencesCount
is the maximum number of sequences to reserve. IfsequencesCountBuffer
is VK_NULL_HANDLE, this is also the actual number of sequences generated.preprocessBuffer
is the VkBuffer that is used for preprocessing the input data for execution. If this structure is used with vkCmdExecuteGeneratedCommandsNV with itsisPreprocessed
set 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.preprocessOffset
is the byte offset intopreprocessBuffer
where the preprocessed data is stored.preprocessSize
is the maximum byte size within thepreprocessBuffer
after thepreprocessOffset
that is available for preprocessing.sequencesCountBuffer
is aVkBuffer
in which the actual number of sequences is provided as singleuint32_t
value.sequencesCountOffset
is the byte offset intosequencesCountBuffer
where the count value is stored.sequencesIndexBuffer
is aVkBuffer
that encodes the used sequence indices asuint32_t
array.sequencesIndexOffset
is the byte offset intosequencesIndexBuffer
where 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