Package org.lwjgl.vulkan
Class VkGeneratedCommandsInfoEXT
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkGeneratedCommandsInfoEXT>
org.lwjgl.vulkan.VkGeneratedCommandsInfoEXT
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkGeneratedCommandsInfoEXT
extends org.lwjgl.system.Struct<VkGeneratedCommandsInfoEXT>
implements org.lwjgl.system.NativeResource
Structure specifying parameters for the generation of commands.
Description
If sequenceCountAddress is not NULL, then maxSequenceCount is the maximum number of sequences that can be executed. The actual number is min(maxSequenceCount, *sequenceCountAddress). If sequenceCountAddress is NULL, then maxSequenceCount is the exact number of sequences to execute.
If the action command token for the layout is not a COUNT-type multi-draw indirect token, maxDrawCount is ignored.
Valid Usage
- If
GetGeneratedCommandsMemoryRequirementsEXTreturns a non-zero size,preprocessAddressmust not beNULL VkDeviceMemoryobjects bound to the underlying buffer forpreprocessAddressmust have been allocated using one of the memory types allowed in thememoryTypeBitsmember of theVkMemoryRequirementsstructure returned byGetGeneratedCommandsMemoryRequirementsEXT- If the
indirectCommandsLayoutuses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_EXT, then theindirectExecutionSet’s push constant layout must contain theupdateRangespecified inVkIndirectCommandsPushConstantTokenEXT - If the
indirectCommandsLayoutuses a token ofINDIRECT_COMMANDS_TOKEN_TYPE_SEQUENCE_INDEX_EXT, then theindirectExecutionSet’s push constant layout must contain theupdateRangespecified inVkIndirectCommandsPushConstantTokenEXT maxSequenceCountmust be less or equal toVkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::maxIndirectSequenceCountandVkGeneratedCommandsMemoryRequirementsInfoEXT::maxSequencesCountthat was used to determine thepreprocessSize- If
sequenceCountAddressis notNULL, the value contained in the address must be less or equal toVkPhysicalDeviceDeviceGeneratedCommandsPropertiesEXT::maxIndirectSequenceCountandVkGeneratedCommandsMemoryRequirementsInfoEXT::maxSequencesCountthat was used to determine thepreprocessSize maxSequenceCountmust not be zero- The underlying buffer for
preprocessAddressmust have theBUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXTbit set in its usage flag - If the underlying buffer for
preprocessAddressis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject - If the
indirectCommandsLayoutcontains aINDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXTtoken, then the descriptor and push constant layout info provided either bypipelineLayoutor through aVkPipelineLayoutCreateInfoinpNextof theVkIndirectCommandsLayoutCreateInfoEXTused to createindirectCommandsLayoutmust be compatible with the descriptor and push constant layout info used byindirectExecutionSet - If
indirectCommandsLayoutwas created with a token sequence that contained theINDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXTtoken, the shader stages used to create the initial shader state ofindirectExecutionSetmust equal theVkIndirectCommandsExecutionSetTokenEXT::shaderStagesused to createindirectCommandsLayout preprocessSizemust be greater than or equal to the memory requirement’s size returned byGetGeneratedCommandsMemoryRequirementsEXTusing the matching inputs (indirectCommandsLayout, …) as within this structure- The underlying buffer for
sequenceCountAddressmust have theBUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHRbit set in its usage flag - If
sequenceCountAddressis notNULL,sequenceCountAddressmust be aligned to 4 indirectAddressmust be aligned to 4- If the underlying buffer for
sequenceCountAddressis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject indirectAddressmust not beNULLindirectAddressSizemust be greater than zero- When not ignored,
maxDrawCount × maxSequenceCountmust be less than2^24 - If
indirectCommandsLayoutwas created using aINDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_EXTtoken and shader objects are not bound then the bound graphics pipeline must have been created withDYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDEinpDynamicStates - If the token sequence of the passed
indirectCommandsLayoutcontains aINDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXTtoken, theindirectExecutionSetmust not beNULL_HANDLE - If the token sequence of the passed
indirectCommandsLayoutdoes not contains aINDIRECT_COMMANDS_TOKEN_TYPE_EXECUTION_SET_EXTtoken, theindirectExecutionSetmust beNULL_HANDLE - If
indirectExecutionSetisNULL_HANDLE, aVkGeneratedCommandsPipelineInfoEXTorVkGeneratedCommandsShaderInfoEXTmust be included in thepNextchain
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXTshaderStagesmust be a valid combination ofVkShaderStageFlagBitsvaluesshaderStagesmust not be 0- If
indirectExecutionSetis notNULL_HANDLE,indirectExecutionSetmust be a validVkIndirectExecutionSetEXThandle indirectCommandsLayoutmust be a validVkIndirectCommandsLayoutEXThandle- Both of
indirectCommandsLayout, andindirectExecutionSetthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
CmdExecuteGeneratedCommandsEXT, CmdPreprocessGeneratedCommandsEXT
Layout
struct VkGeneratedCommandsInfoEXT {
VkStructureType sType();
void const * pNext();
VkShaderStageFlags shaderStages();
VkIndirectExecutionSetEXT indirectExecutionSet();
VkIndirectCommandsLayoutEXT indirectCommandsLayout();
VkDeviceAddress indirectAddress();
VkDeviceSize indirectAddressSize();
VkDeviceAddress preprocessAddress();
VkDeviceSize preprocessSize();
uint32_t maxSequenceCount();
VkDeviceAddress sequenceCountAddress();
uint32_t maxDrawCount();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkGeneratedCommandsInfoEXT(ByteBuffer container) Creates aVkGeneratedCommandsInfoEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkGeneratedCommandsInfoEXTcalloc()Returns a newVkGeneratedCommandsInfoEXTinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkGeneratedCommandsInfoEXTcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkGeneratedCommandsInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkGeneratedCommandsInfoEXTcreate()Returns a newVkGeneratedCommandsInfoEXTinstance allocated withBufferUtils.create(int capacity) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated withBufferUtils.static VkGeneratedCommandsInfoEXTcreate(long address) Returns a newVkGeneratedCommandsInfoEXTinstance for the specified memory address.create(long address, int capacity) Create aVkGeneratedCommandsInfoEXT.Bufferinstance at the specified memory.static @Nullable VkGeneratedCommandsInfoEXTcreateSafe(long address) static @Nullable VkGeneratedCommandsInfoEXT.BuffercreateSafe(long address, int capacity) longan address that holds the indirect buffer data.indirectAddress(long value) Sets the specified value to theindirectAddress()field.longthe size in bytes of indirect buffer data starting atindirectAddress.indirectAddressSize(long value) Sets the specified value to theindirectAddressSize()field.longtheVkIndirectCommandsLayoutEXTthat specifies the command sequence data.indirectCommandsLayout(long value) Sets the specified value to theindirectCommandsLayout()field.longthe indirect execution set to be used for binding shaders.indirectExecutionSet(long value) Sets the specified value to theindirectExecutionSet()field.static VkGeneratedCommandsInfoEXTmalloc()Returns a newVkGeneratedCommandsInfoEXTinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkGeneratedCommandsInfoEXTmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkGeneratedCommandsInfoEXTinstance allocated on the specifiedMemoryStack.intthe maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens.maxDrawCount(int value) Sets the specified value to themaxDrawCount()field.intused to determine the number of sequences to execute.maxSequenceCount(int value) Sets the specified value to themaxSequenceCount()field.static longnindirectAddress(long struct) Unsafe version ofindirectAddress().static voidnindirectAddress(long struct, long value) Unsafe version ofindirectAddress.static longnindirectAddressSize(long struct) Unsafe version ofindirectAddressSize().static voidnindirectAddressSize(long struct, long value) Unsafe version ofindirectAddressSize.static longnindirectCommandsLayout(long struct) Unsafe version ofindirectCommandsLayout().static voidnindirectCommandsLayout(long struct, long value) Unsafe version ofindirectCommandsLayout.static longnindirectExecutionSet(long struct) Unsafe version ofindirectExecutionSet().static voidnindirectExecutionSet(long struct, long value) Unsafe version ofindirectExecutionSet.static intnmaxDrawCount(long struct) Unsafe version ofmaxDrawCount().static voidnmaxDrawCount(long struct, int value) Unsafe version ofmaxDrawCount.static intnmaxSequenceCount(long struct) Unsafe version ofmaxSequenceCount().static voidnmaxSequenceCount(long struct, int value) Unsafe version ofmaxSequenceCount.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static longnpreprocessAddress(long struct) Unsafe version ofpreprocessAddress().static voidnpreprocessAddress(long struct, long value) Unsafe version ofpreprocessAddress.static longnpreprocessSize(long struct) Unsafe version ofpreprocessSize().static voidnpreprocessSize(long struct, long value) Unsafe version ofpreprocessSize.static longnsequenceCountAddress(long struct) Unsafe version ofsequenceCountAddress().static voidnsequenceCountAddress(long struct, long value) Unsafe version ofsequenceCountAddress.static intnshaderStages(long struct) Unsafe version ofshaderStages().static voidnshaderStages(long struct, int value) Unsafe version ofshaderStages.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkGeneratedCommandsPipelineInfoEXTvalue to thepNextchain.Prepends the specifiedVkGeneratedCommandsShaderInfoEXTvalue to thepNextchain.longspecifies a physical address of theVkBufferused for preprocessing the input data for execution.preprocessAddress(long value) Sets the specified value to thepreprocessAddress()field.longthe maximum byte size withinpreprocessAddressthat is available for preprocessing.preprocessSize(long value) Sets the specified value to thepreprocessSize()field.longspecifies an optional physical address of a singleuint32_tvalue containing the requested number of sequences to execute.sequenceCountAddress(long value) Sets the specified value to thesequenceCountAddress()field.set(int sType, long pNext, int shaderStages, long indirectExecutionSet, long indirectCommandsLayout, long indirectAddress, long indirectAddressSize, long preprocessAddress, long preprocessSize, int maxSequenceCount, long sequenceCountAddress, int maxDrawCount) Initializes this struct with the specified values.Copies the specified struct data to this struct.intthe mask of shader stages used by the commands.shaderStages(int value) Sets the specified value to theshaderStages()field.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXTvalue to thesType()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
STYPE
public static final int STYPEThe struct member offsets. -
PNEXT
public static final int PNEXTThe struct member offsets. -
SHADERSTAGES
public static final int SHADERSTAGESThe struct member offsets. -
INDIRECTEXECUTIONSET
public static final int INDIRECTEXECUTIONSETThe struct member offsets. -
INDIRECTCOMMANDSLAYOUT
public static final int INDIRECTCOMMANDSLAYOUTThe struct member offsets. -
INDIRECTADDRESS
public static final int INDIRECTADDRESSThe struct member offsets. -
INDIRECTADDRESSSIZE
public static final int INDIRECTADDRESSSIZEThe struct member offsets. -
PREPROCESSADDRESS
public static final int PREPROCESSADDRESSThe struct member offsets. -
PREPROCESSSIZE
public static final int PREPROCESSSIZEThe struct member offsets. -
MAXSEQUENCECOUNT
public static final int MAXSEQUENCECOUNTThe struct member offsets. -
SEQUENCECOUNTADDRESS
public static final int SEQUENCECOUNTADDRESSThe struct member offsets. -
MAXDRAWCOUNT
public static final int MAXDRAWCOUNTThe struct member offsets.
-
-
Constructor Details
-
VkGeneratedCommandsInfoEXT
Creates aVkGeneratedCommandsInfoEXTinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkGeneratedCommandsInfoEXT>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
shaderStages
public int shaderStages()the mask of shader stages used by the commands. -
indirectExecutionSet
public long indirectExecutionSet()the indirect execution set to be used for binding shaders. -
indirectCommandsLayout
public long indirectCommandsLayout()theVkIndirectCommandsLayoutEXTthat specifies the command sequence data. -
indirectAddress
public long indirectAddress()an address that holds the indirect buffer data. -
indirectAddressSize
public long indirectAddressSize()the size in bytes of indirect buffer data starting atindirectAddress. -
preprocessAddress
public long preprocessAddress()specifies a physical address of theVkBufferused for preprocessing the input data for execution. If this structure is used withCmdExecuteGeneratedCommandsEXTwith itsisPreprocessedset toTRUE, then the preprocessing step is skipped but data in this address may still be modified. The contents and the layout of this address are opaque to applications and must not be modified outside functions related to device-generated commands or copied to another buffer for reuse. -
preprocessSize
public long preprocessSize()the maximum byte size withinpreprocessAddressthat is available for preprocessing. -
maxSequenceCount
public int maxSequenceCount()used to determine the number of sequences to execute. -
sequenceCountAddress
public long sequenceCountAddress()specifies an optional physical address of a singleuint32_tvalue containing the requested number of sequences to execute. -
maxDrawCount
public int maxDrawCount()the maximum number of indirect draws that can be executed by any COUNT-type multi-draw indirect tokens. The draw count in the indirect buffer is clamped to this value for these token types. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_GENERATED_COMMANDS_INFO_EXTvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkGeneratedCommandsPipelineInfoEXTvalue to thepNextchain. -
pNext
Prepends the specifiedVkGeneratedCommandsShaderInfoEXTvalue to thepNextchain. -
shaderStages
Sets the specified value to theshaderStages()field. -
indirectExecutionSet
Sets the specified value to theindirectExecutionSet()field. -
indirectCommandsLayout
Sets the specified value to theindirectCommandsLayout()field. -
indirectAddress
Sets the specified value to theindirectAddress()field. -
indirectAddressSize
Sets the specified value to theindirectAddressSize()field. -
preprocessAddress
Sets the specified value to thepreprocessAddress()field. -
preprocessSize
Sets the specified value to thepreprocessSize()field. -
maxSequenceCount
Sets the specified value to themaxSequenceCount()field. -
sequenceCountAddress
Sets the specified value to thesequenceCountAddress()field. -
maxDrawCount
Sets the specified value to themaxDrawCount()field. -
set
public VkGeneratedCommandsInfoEXT set(int sType, long pNext, int shaderStages, long indirectExecutionSet, long indirectCommandsLayout, long indirectAddress, long indirectAddressSize, long preprocessAddress, long preprocessSize, int maxSequenceCount, long sequenceCountAddress, int maxDrawCount) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkGeneratedCommandsInfoEXTinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkGeneratedCommandsInfoEXTinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkGeneratedCommandsInfoEXTinstance allocated withBufferUtils. -
create
Returns a newVkGeneratedCommandsInfoEXTinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkGeneratedCommandsInfoEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkGeneratedCommandsInfoEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkGeneratedCommandsInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkGeneratedCommandsInfoEXT.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkGeneratedCommandsInfoEXT.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkGeneratedCommandsInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsType
public static int nsType(long struct) Unsafe version ofsType(). -
npNext
public static long npNext(long struct) Unsafe version ofpNext(). -
nshaderStages
public static int nshaderStages(long struct) Unsafe version ofshaderStages(). -
nindirectExecutionSet
public static long nindirectExecutionSet(long struct) Unsafe version ofindirectExecutionSet(). -
nindirectCommandsLayout
public static long nindirectCommandsLayout(long struct) Unsafe version ofindirectCommandsLayout(). -
nindirectAddress
public static long nindirectAddress(long struct) Unsafe version ofindirectAddress(). -
nindirectAddressSize
public static long nindirectAddressSize(long struct) Unsafe version ofindirectAddressSize(). -
npreprocessAddress
public static long npreprocessAddress(long struct) Unsafe version ofpreprocessAddress(). -
npreprocessSize
public static long npreprocessSize(long struct) Unsafe version ofpreprocessSize(). -
nmaxSequenceCount
public static int nmaxSequenceCount(long struct) Unsafe version ofmaxSequenceCount(). -
nsequenceCountAddress
public static long nsequenceCountAddress(long struct) Unsafe version ofsequenceCountAddress(). -
nmaxDrawCount
public static int nmaxDrawCount(long struct) Unsafe version ofmaxDrawCount(). -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nshaderStages
public static void nshaderStages(long struct, int value) Unsafe version ofshaderStages. -
nindirectExecutionSet
public static void nindirectExecutionSet(long struct, long value) Unsafe version ofindirectExecutionSet. -
nindirectCommandsLayout
public static void nindirectCommandsLayout(long struct, long value) Unsafe version ofindirectCommandsLayout. -
nindirectAddress
public static void nindirectAddress(long struct, long value) Unsafe version ofindirectAddress. -
nindirectAddressSize
public static void nindirectAddressSize(long struct, long value) Unsafe version ofindirectAddressSize. -
npreprocessAddress
public static void npreprocessAddress(long struct, long value) Unsafe version ofpreprocessAddress. -
npreprocessSize
public static void npreprocessSize(long struct, long value) Unsafe version ofpreprocessSize. -
nmaxSequenceCount
public static void nmaxSequenceCount(long struct, int value) Unsafe version ofmaxSequenceCount. -
nsequenceCountAddress
public static void nsequenceCountAddress(long struct, long value) Unsafe version ofsequenceCountAddress. -
nmaxDrawCount
public static void nmaxDrawCount(long struct, int value) Unsafe version ofmaxDrawCount.
-