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.
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.
pipelineBindPoint must be PIPELINE_BIND_POINT_GRAPHICS or PIPELINE_BIND_POINT_COMPUTEtokenCount must be greater than 0 and less than or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::maxIndirectCommandsTokenCountpTokens contains an entry of INDIRECT_COMMANDS_TOKEN_TYPE_SHADER_GROUP_NV it must be the first element of the array and there must be only a single element of such token typepTokens contains an entry of INDIRECT_COMMANDS_TOKEN_TYPE_STATE_FLAGS_NV there must be only a single element of such token typepTokens must occur before any work provoking tokens (INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NV, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NV, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_TASKS_NV, INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_NV , INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV )pTokens must include one single work provoking token that is compatible with the pipelineBindPointstreamCount must be greater than 0 and less or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::maxIndirectCommandsStreamCountpStreamStrides must be greater than 0 and less than or equal to VkPhysicalDeviceDeviceGeneratedCommandsPropertiesNV::maxIndirectCommandsStreamStride. Furthermore the alignment of each token input must be ensuredpipelineBindPoint is PIPELINE_BIND_POINT_COMPUTE then the VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::deviceGeneratedCompute feature must be enabledpipelineBindPoint is PIPELINE_BIND_POINT_COMPUTE then the state tokens in pTokens must only include INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NV, INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV, or INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVpipelineBindPoint is PIPELINE_BIND_POINT_COMPUTE and pTokens includes INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NV, then the VkPhysicalDeviceDeviceGeneratedCommandsComputeFeaturesNV::deviceGeneratedComputePipelines feature must be enabledsType must be STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVpNext must be NULLflags must be a valid combination of VkIndirectCommandsLayoutUsageFlagBitsNV valuespipelineBindPoint must be a valid VkPipelineBindPoint valuepTokens must be a valid pointer to an array of tokenCount valid VkIndirectCommandsLayoutTokenNV structurespStreamStrides must be a valid pointer to an array of streamCount uint32_t valuestokenCount must be greater than 0streamCount must be greater than 0VkIndirectCommandsLayoutTokenNV, CreateIndirectCommandsLayoutNV
struct VkIndirectCommandsLayoutCreateInfoNV {
VkStructureType sType;
void const * pNext;
VkIndirectCommandsLayoutUsageFlagsNV flags;
VkPipelineBindPoint pipelineBindPoint;
uint32_t tokenCount;
VkIndirectCommandsLayoutTokenNV const * pTokens;
uint32_t streamCount;
uint32_t const * pStreamStrides;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkIndirectCommandsLayoutCreateInfoNV.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | FLAGS
The struct member offsets. |
| public static final int | PIPELINEBINDPOINT
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | PSTREAMSTRIDES
The struct member offsets. |
| public static final int | PTOKENS
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STREAMCOUNT
The struct member offsets. |
| public static final int | STYPE
The struct member offsets. |
| public static final int | TOKENCOUNT
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkIndirectCommandsLayoutCreateInfoNV(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV | |
| public static VkIndirectCommandsLayoutCreateInfoNV. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkIndirectCommandsLayoutCreateInfoNV | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkIndirectCommandsLayoutCreateInfoNV. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected VkIndirectCommandsLayoutCreateInfoNV | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static VkIndirectCommandsLayoutCreateInfoNV | |
| public static VkIndirectCommandsLayoutCreateInfoNV | create(long address)
Returns a new |
| public static VkIndirectCommandsLayoutCreateInfoNV. | create(int
the buffer capacity capacity)Returns a new |
| public static VkIndirectCommandsLayoutCreateInfoNV. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkIndirectCommandsLayoutCreateInfoNV | |
| public static VkIndirectCommandsLayoutCreateInfoNV. | |
| public int | |
| public VkIndirectCommandsLayoutCreateInfoNV | |
| public static VkIndirectCommandsLayoutCreateInfoNV | |
| public static VkIndirectCommandsLayoutCreateInfoNV. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkIndirectCommandsLayoutCreateInfoNV | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkIndirectCommandsLayoutCreateInfoNV. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static IntBuffer | |
| public static void | |
| public static VkIndirectCommandsLayoutTokenNV. | |
| public static void | |
| public static int | |
| public static void | nstreamCount(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | |
| public static int | |
| public static void | ntokenCount(long struct, int value)
Sets the specified value to the |
| public int | |
| public VkIndirectCommandsLayoutCreateInfoNV | |
| public long | |
| public VkIndirectCommandsLayoutCreateInfoNV | |
| public IntBuffer | |
| public VkIndirectCommandsLayoutCreateInfoNV | pStreamStrides(IntBuffer value)
Sets the address of the specified |
| public VkIndirectCommandsLayoutTokenNV. | |
| public VkIndirectCommandsLayoutCreateInfoNV | pTokens(VkIndirectCommandsLayoutTokenNV.
Sets the address of the specified |
| public VkIndirectCommandsLayoutCreateInfoNV | set(int sType, long pNext, int flags, int pipelineBindPoint, VkIndirectCommandsLayoutTokenNV.
Initializes this struct with the specified values. |
| public VkIndirectCommandsLayoutCreateInfoNV | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public int | |
| public VkIndirectCommandsLayoutCreateInfoNV | |
| public VkIndirectCommandsLayoutCreateInfoNV | sType$Default()
Sets the |
| public int | |
| public static void |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| FLAGS | back to summary |
|---|---|
| public static final int FLAGS The struct member offsets. | |
| PIPELINEBINDPOINT | back to summary |
|---|---|
| public static final int PIPELINEBINDPOINT The struct member offsets. | |
| PNEXT | back to summary |
|---|---|
| public static final int PNEXT The struct member offsets. | |
| PSTREAMSTRIDES | back to summary |
|---|---|
| public static final int PSTREAMSTRIDES The struct member offsets. | |
| PTOKENS | back to summary |
|---|---|
| public static final int PTOKENS The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| STREAMCOUNT | back to summary |
|---|---|
| public static final int STREAMCOUNT The struct member offsets. | |
| STYPE | back to summary |
|---|---|
| public static final int STYPE The struct member offsets. | |
| TOKENCOUNT | back to summary |
|---|---|
| public static final int TOKENCOUNT The struct member offsets. | |
| VkIndirectCommandsLayoutCreateInfoNV | back to summary |
|---|---|
| protected VkIndirectCommandsLayoutCreateInfoNV(long address, ByteBuffer container) | |
| VkIndirectCommandsLayoutCreateInfoNV | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Returns a new
| |
| create | back to summary |
|---|---|
| protected VkIndirectCommandsLayoutCreateInfoNV create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV create() Returns a new | |
| create | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Returns a new
| |
| create | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Create a
| |
| createSafe | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Like
| |
| flags | back to summary |
|---|---|
| public int flags() a bitmask of
| |
| flags | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV flags(int value) Sets the specified value to the | |
| malloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutCreateInfoNV. Returns a new
| |
| nflags | back to summary |
|---|---|
| public static int nflags(long struct) Unsafe version of | |
| nflags | back to summary |
|---|---|
| public static void nflags(long struct, int value) Unsafe version of | |
| npipelineBindPoint | back to summary |
|---|---|
| public static int npipelineBindPoint(long struct) Unsafe version of | |
| npipelineBindPoint | back to summary |
|---|---|
| public static void npipelineBindPoint(long struct, int value) Unsafe version of | |
| npNext | back to summary |
|---|---|
| public static long npNext(long struct) Unsafe version of | |
| npNext | back to summary |
|---|---|
| public static void npNext(long struct, long value) Unsafe version of | |
| npStreamStrides | back to summary |
|---|---|
| public static IntBuffer npStreamStrides(long struct) Unsafe version of | |
| npStreamStrides | back to summary |
|---|---|
| public static void npStreamStrides(long struct, IntBuffer value) Unsafe version of | |
| npTokens | back to summary |
|---|---|
| public static VkIndirectCommandsLayoutTokenNV. Unsafe version of | |
| npTokens | back to summary |
|---|---|
| public static void npTokens(long struct, VkIndirectCommandsLayoutTokenNV. Unsafe version of | |
| nstreamCount | back to summary |
|---|---|
| public static int nstreamCount(long struct) Unsafe version of | |
| nstreamCount | back to summary |
|---|---|
| public static void nstreamCount(long struct, int value) Sets the specified value to the | |
| nsType | back to summary |
|---|---|
| public static int nsType(long struct) Unsafe version of | |
| nsType | back to summary |
|---|---|
| public static void nsType(long struct, int value) Unsafe version of | |
| ntokenCount | back to summary |
|---|---|
| public static int ntokenCount(long struct) Unsafe version of | |
| ntokenCount | back to summary |
|---|---|
| public static void ntokenCount(long struct, int value) Sets the specified value to the | |
| pipelineBindPoint | back to summary |
|---|---|
| public int pipelineBindPoint() the
| |
| pipelineBindPoint | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV pipelineBindPoint(int value) Sets the specified value to the | |
| pNext | back to summary |
|---|---|
| public long pNext()
| |
| pNext | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV pNext(long value) Sets the specified value to the | |
| pStreamStrides | back to summary |
|---|---|
| public IntBuffer pStreamStrides() an array defining the byte stride for each input stream.
| |
| pStreamStrides | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV pStreamStrides(IntBuffer value) Sets the address of the specified | |
| pTokens | back to summary |
|---|---|
| public VkIndirectCommandsLayoutTokenNV. an array describing each command token in detail. See
| |
| pTokens | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV pTokens(VkIndirectCommandsLayoutTokenNV. Sets the address of the specified | |
| set | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV set(int sType, long pNext, int flags, int pipelineBindPoint, VkIndirectCommandsLayoutTokenNV. Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV set(VkIndirectCommandsLayoutCreateInfoNV src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| streamCount | back to summary |
|---|---|
| public int streamCount() the number of streams used to provide the token inputs.
| |
| sType | back to summary |
|---|---|
| public int sType() a
| |
| sType | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV sType(int value) Sets the specified value to the | |
| sType$Default | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV sType$Default() Sets the | |
| tokenCount | back to summary |
|---|---|
| public int tokenCount() the length of the individual command sequence.
| |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |
VkIndirectCommandsLayoutCreateInfoNV structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final VkIndirectCommandsLayoutCreateInfoNV |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final VkIndirectCommandsLayoutCreateInfoNV ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| flags | back to summary |
|---|---|
public int flags()
| |
| flags | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the specified value to the | |
| getElementFactory | back to summary |
|---|---|
| protected VkIndirectCommandsLayoutCreateInfoNV getElementFactory() Implements abstract org.
| |
| pipelineBindPoint | back to summary |
|---|---|
public int pipelineBindPoint()
| |
| pipelineBindPoint | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the specified value to the | |
| pNext | back to summary |
|---|---|
public long pNext()
| |
| pNext | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the specified value to the | |
| pStreamStrides | back to summary |
|---|---|
public IntBuffer pStreamStrides()
| |
| pStreamStrides | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the address of the specified | |
| pTokens | back to summary |
|---|---|
public VkIndirectCommandsLayoutTokenNV.
| |
| pTokens | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the address of the specified | |
| self | back to summary |
|---|---|
| protected VkIndirectCommandsLayoutCreateInfoNV. Implements abstract org.
| |
| streamCount | back to summary |
|---|---|
public int streamCount()
| |
| sType | back to summary |
|---|---|
public int sType()
| |
| sType | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the specified value to the | |
| sType$Default | back to summary |
|---|---|
| public VkIndirectCommandsLayoutCreateInfoNV. Sets the | |
| tokenCount | back to summary |
|---|---|
public int tokenCount()
| |