Class VkIndirectCommandsLayoutCreateInfoNV

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkIndirectCommandsLayoutCreateInfoNV>
org.lwjgl.vulkan.VkIndirectCommandsLayoutCreateInfoNV
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class VkIndirectCommandsLayoutCreateInfoNV extends org.lwjgl.system.Struct<VkIndirectCommandsLayoutCreateInfoNV> implements org.lwjgl.system.NativeResource
Structure specifying the parameters of a newly created indirect commands layout object.
Description

The following code illustrates some of the flags:


 void cmdProcessAllSequences(cmd, pipeline, indirectCommandsLayout, pIndirectCommandsTokens, sequencesCount, indexbuffer, indexbufferOffset)
 {
   for (s = 0; s < sequencesCount; s++)
   {
     sUsed = s;
 
     if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NV) {
       sUsed = indexbuffer.load_uint32( sUsed * sizeof(uint32_t) + indexbufferOffset);
     }
 
     if (indirectCommandsLayout.flags & VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NV) {
       sUsed = incoherent_implementation_dependent_permutation[ sUsed ];
     }
 
     cmdProcessSequence( cmd, pipeline, indirectCommandsLayout, pIndirectCommandsTokens, sUsed );
   }
 }

When tokens are consumed, an offset is computed based on token offset and stream stride. The resulting offset is required to be aligned. The alignment for a specific token is equal to the scalar alignment of the data type as defined in Alignment Requirements, or VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::minIndirectCommandsBufferOffsetAlignment, whichever is lower.

Note

A minIndirectCommandsBufferOffsetAlignment of 4 allows VkDeviceAddress to be packed as uvec2 with scalar layout instead of uint64_t with 8 byte alignment. This enables direct compatibility with D3D12 command signature layouts.

Valid Usage
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NV
  • pNext must be NULL
  • flags must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNV values
  • pipelineBindPoint must be a valid VkPipelineBindPoint value
  • pTokens must be a valid pointer to an array of tokenCount valid VkIndirectCommandsLayoutTokenNV structures
  • pStreamStrides must be a valid pointer to an array of streamCount uint32_t values
  • tokenCount must be greater than 0
  • streamCount must be greater than 0
See Also

VkIndirectCommandsLayoutTokenNV, CreateIndirectCommandsLayoutNV

Layout


 struct VkIndirectCommandsLayoutCreateInfoNV {
     VkStructureType sType();
     void const * pNext();
     VkIndirectCommandsLayoutUsageFlagsNV flags();
     VkPipelineBindPoint pipelineBindPoint();
     uint32_t tokenCount();
     VkIndirectCommandsLayoutTokenNV const * pTokens();
     uint32_t streamCount();
     uint32_t const * pStreamStrides();
 }