VkIndirectCommandsLayoutCreateInfoNVX(3)

# VkIndirectCommandsLayoutCreateInfoNVX(3) Manual Page

## Name

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

## C Specification

The `VkIndirectCommandsLayoutCreateInfoNVX` structure is defined as:

    typedef struct VkIndirectCommandsLayoutCreateInfoNVX {
        VkStructureType                            sType;
        const void*                                pNext;
        VkPipelineBindPoint                        pipelineBindPoint;
        VkIndirectCommandsLayoutUsageFlagsNVX      flags;
        uint32_t                                   tokenCount;
        const VkIndirectCommandsLayoutTokenNVX*    pTokens;
    } VkIndirectCommandsLayoutCreateInfoNVX;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `pipelineBindPoint` is the VkPipelineBindPoint that this layout targets.

- `flags` is a bitmask of VkIndirectCommandsLayoutUsageFlagBitsNVX specifying usage hints of this layout.

- `tokenCount` is the length of the individual command sequnce.

- `pTokens` is an array describing each command token in detail. See VkIndirectCommandsTokenTypeNVX and VkIndirectCommandsLayoutTokenNVX below for details.

## Description

The following code illustrates some of the key flags:

    void cmdProcessAllSequences(cmd, objectTable, indirectCommandsLayout, pIndirectCommandsTokens, sequencesCount, indexbuffer, indexbufferoffset)
    {
      for (s = 0; s < sequencesCount; s++)
      {
        sequence = s;

        if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX) {
          sequence = incoherent_implementation_dependent_permutation[ sequence ];
        }
        if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX) {
          sequence = indexbuffer.load_uint32( sequence * sizeof(uint32_t) + indexbufferoffset);
        }

        cmdProcessSequence( cmd, objectTable, indirectCommandsLayout, pIndirectCommandsTokens, sequence );
      }
    }

Valid Usage

- `tokenCount` must be greater than `0` and below `VkDeviceGeneratedCommandsLimitsNVX`::`maxIndirectCommandsLayoutTokenCount`

- If the `VkDeviceGeneratedCommandsFeaturesNVX`::`computeBindingPointSupport` feature is not enabled, then `pipelineBindPoint` must not be `VK_PIPELINE_BIND_POINT_COMPUTE`

- If `pTokens` contains an entry of `VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX` it must be the first element of the array and there must be only a single element of such token type.

- All state binding tokens in `pTokens` must occur prior work provoking tokens (`VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX`, `VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX`, `VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX`).

- The content of `pTokens` must include one single work provoking token that is compatible with the `pipelineBindPoint`.

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX`

- `pNext` must be `NULL`

- `pipelineBindPoint` must be a valid VkPipelineBindPoint value

- `flags` must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNVX values

- `flags` must not be `0`

- `pTokens` must be a valid pointer to an array of `tokenCount` valid VkIndirectCommandsLayoutTokenNVX structures

- `tokenCount` must be greater than `0`

## See Also

VkIndirectCommandsLayoutTokenNVX, VkIndirectCommandsLayoutUsageFlagsNVX, VkPipelineBindPoint, VkStructureType, vkCreateIndirectCommandsLayoutNVX

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

Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.