C Specification

// Provided by VK_NV_device_generated_commands
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;

Members

  • sType is the type of this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • pipelineBindPoint is the VkPipelineBindPoint used for the pipeline.

  • 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 streams

  • pStreams is a pointer to an array of streamCount VkIndirectCommandsStreamNV structures providing the input data for the tokens used in indirectCommandsLayout.

  • sequencesCount is the maximum number of sequences to reserve. If sequencesCountBuffer 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 its isPreprocessed set to VK_TRUE, then the preprocessing step is skipped and data is only read from this buffer.

  • preprocessOffset is the byte offset into preprocessBuffer where the preprocessed data is stored.

  • preprocessSize is the maximum byte size within the preprocessBuffer after the preprocessOffset that is available for preprocessing.

  • sequencesCountBuffer is a VkBuffer in which the actual number of sequences is provided as single uint32_t value.

  • sequencesCountOffset is the byte offset into sequencesCountBuffer where the count value is stored.

  • sequencesIndexBuffer is a VkBuffer that encodes the used sequence indices as uint32_t array.

  • sequencesIndexOffset is the byte offset into sequencesIndexBuffer where the index values start.

Description

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-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 requirement`s size returned by 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

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

See Also

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2021 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0