Package org.lwjgl.vulkan
Class VkBindDescriptorSetsInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkBindDescriptorSetsInfo>
org.lwjgl.vulkan.VkBindDescriptorSetsInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkBindDescriptorSetsInfoKHR
public class VkBindDescriptorSetsInfo
extends org.lwjgl.system.Struct<VkBindDescriptorSetsInfo>
implements org.lwjgl.system.NativeResource
Structure specifying a descriptor set binding operation.
Description
If stageFlags specifies a subset of all stages corresponding to one or more pipeline bind points, the binding operation still affects all stages corresponding to the given pipeline bind point(s) as if the equivalent original version of this command had been called with the same parameters. For example, specifying a stageFlags value of SHADER_STAGE_VERTEX_BIT | SHADER_STAGE_FRAGMENT_BIT | SHADER_STAGE_COMPUTE_BIT is equivalent to calling the original version of this command once with PIPELINE_BIND_POINT_GRAPHICS and once with PIPELINE_BIND_POINT_COMPUTE.
Valid Usage
- Each element of
pDescriptorSetsmust have been allocated with aVkDescriptorSetLayoutthat matches (is the same as, or identically defined as) theVkDescriptorSetLayoutat set n inlayout, where n is the sum offirstSetand the index intopDescriptorSets dynamicOffsetCountmust be equal to the total number of dynamic descriptors inpDescriptorSets- The sum of
firstSetanddescriptorSetCountmust be less than or equal toVkPipelineLayoutCreateInfo::setLayoutCountprovided whenlayoutwas created - Each element of
pDynamicOffsetswhich corresponds to a descriptor binding with typeDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMICmust be a multiple ofVkPhysicalDeviceLimits::minUniformBufferOffsetAlignment - Each element of
pDynamicOffsetswhich corresponds to a descriptor binding with typeDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMICmust be a multiple ofVkPhysicalDeviceLimits::minStorageBufferOffsetAlignment - For each dynamic uniform or storage buffer binding in
pDescriptorSets, the sum of the effective offset and the range of the binding must be less than or equal to the size of the buffer - For each dynamic uniform or storage buffer binding in
pDescriptorSets, if the range was set withWHOLE_SIZEthenpDynamicOffsetswhich corresponds to the descriptor binding must be 0 - Each element of
pDescriptorSetsmust not have been allocated from aVkDescriptorPoolwith theDESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXTflag set - If the
graphicsPipelineLibraryfeature is not enabled, each element ofpDescriptorSetsmust be a validVkDescriptorSet - Each element of
pDescriptorSetsmust have been allocated with aVkDescriptorSetLayoutwhich was not created withDESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT
- If the
dynamicPipelineLayoutfeature is not enabled,layoutmust be a validVkPipelineLayouthandle - If
layoutisNULL_HANDLE, thepNextchain must include a validVkPipelineLayoutCreateInfostructure
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFOpNextmust beNULLor a pointer to a valid instance ofVkPipelineLayoutCreateInfo- The
sTypevalue of each struct in thepNextchain must be unique stageFlagsmust be a valid combination ofVkShaderStageFlagBitsvaluesstageFlagsmust not be 0- If
layoutis notNULL_HANDLE,layoutmust be a validVkPipelineLayouthandle pDescriptorSetsmust be a valid pointer to an array ofdescriptorSetCountvalidVkDescriptorSethandles- If
dynamicOffsetCountis not 0, andpDynamicOffsetsis notNULL,pDynamicOffsetsmust be a valid pointer to an array ofdynamicOffsetCountorNULL_HANDLEuint32_tvalues descriptorSetCountmust be greater than 0- Both of
layout, and the elements ofpDescriptorSetsthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
CmdBindDescriptorSets2, CmdBindDescriptorSets2KHR
Layout
struct VkBindDescriptorSetsInfo {
VkStructureType sType();
void const * pNext();
VkShaderStageFlags stageFlags();
VkPipelineLayout layout();
uint32_t firstSet();
uint32_t descriptorSetCount();
VkDescriptorSet const * pDescriptorSets();
uint32_t dynamicOffsetCount();
uint32_t const * pDynamicOffsets();
}-
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 size in bytes.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionVkBindDescriptorSetsInfo(ByteBuffer container) Creates aVkBindDescriptorSetsInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkBindDescriptorSetsInfocalloc()Returns a newVkBindDescriptorSetsInfoinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBindDescriptorSetsInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkBindDescriptorSetsInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBindDescriptorSetsInfocreate()Returns a newVkBindDescriptorSetsInfoinstance allocated withBufferUtils.create(int capacity) Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated withBufferUtils.static VkBindDescriptorSetsInfocreate(long address) Returns a newVkBindDescriptorSetsInfoinstance for the specified memory address.create(long address, int capacity) Create aVkBindDescriptorSetsInfo.Bufferinstance at the specified memory.static @Nullable VkBindDescriptorSetsInfocreateSafe(long address) static @Nullable VkBindDescriptorSetsInfo.BuffercreateSafe(long address, int capacity) intthe number of elements in thepDescriptorSetsarray.intthe number of dynamic offsets in thepDynamicOffsetsarray.dynamicOffsetCount(int value) Sets the specified value to thedynamicOffsetCount()field.intfirstSet()the set number of the first descriptor set to be bound.firstSet(int value) Sets the specified value to thefirstSet()field.longlayout()aVkPipelineLayoutobject used to program the bindings.layout(long value) Sets the specified value to thelayout()field.static VkBindDescriptorSetsInfomalloc()Returns a newVkBindDescriptorSetsInfoinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkBindDescriptorSetsInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkBindDescriptorSetsInfoinstance allocated on the specifiedMemoryStack.static intndescriptorSetCount(long struct) Unsafe version ofdescriptorSetCount().static voidndescriptorSetCount(long struct, int value) Sets the specified value to thedescriptorSetCountfield of the specifiedstruct.static intndynamicOffsetCount(long struct) Unsafe version ofdynamicOffsetCount().static voidndynamicOffsetCount(long struct, int value) Sets the specified value to thedynamicOffsetCountfield of the specifiedstruct.static intnfirstSet(long struct) Unsafe version offirstSet().static voidnfirstSet(long struct, int value) Unsafe version offirstSet.static longnlayout(long struct) Unsafe version oflayout().static voidnlayout(long struct, long value) Unsafe version oflayout.static LongBuffernpDescriptorSets(long struct) Unsafe version ofpDescriptorSets.static voidnpDescriptorSets(long struct, LongBuffer value) Unsafe version ofpDescriptorSets.static @Nullable IntBuffernpDynamicOffsets(long struct) Unsafe version ofpDynamicOffsets.static voidnpDynamicOffsets(long struct, @Nullable IntBuffer value) Unsafe version ofpDynamicOffsets.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static intnstageFlags(long struct) Unsafe version ofstageFlags().static voidnstageFlags(long struct, int value) Unsafe version ofstageFlags.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.a pointer to an array of handles toVkDescriptorSetobjects describing the descriptor sets to bind to.pDescriptorSets(LongBuffer value) Sets the address of the specifiedLongBufferto thepDescriptorSets()field.@Nullable IntBuffera pointer to an array ofuint32_tvalues specifying dynamic offsets.pDynamicOffsets(@Nullable IntBuffer value) Sets the address of the specifiedIntBufferto thepDynamicOffsets()field.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.pNext(VkPipelineLayoutCreateInfo value) Prepends the specifiedVkPipelineLayoutCreateInfovalue to thepNextchain.set(int sType, long pNext, int stageFlags, long layout, int firstSet, LongBuffer pDescriptorSets, int dynamicOffsetCount, @Nullable IntBuffer pDynamicOffsets) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()inta bitmask ofVkShaderStageFlagBitsspecifying the shader stages the descriptor sets will be bound to.stageFlags(int value) Sets the specified value to thestageFlags()field.intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFOvalue to thesType()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
STAGEFLAGS
public static final int STAGEFLAGSThe struct member offsets. -
LAYOUT
public static final int LAYOUTThe struct member offsets. -
FIRSTSET
public static final int FIRSTSETThe struct member offsets. -
DESCRIPTORSETCOUNT
public static final int DESCRIPTORSETCOUNTThe struct member offsets. -
PDESCRIPTORSETS
public static final int PDESCRIPTORSETSThe struct member offsets. -
DYNAMICOFFSETCOUNT
public static final int DYNAMICOFFSETCOUNTThe struct member offsets. -
PDYNAMICOFFSETS
public static final int PDYNAMICOFFSETSThe struct member offsets.
-
-
Constructor Details
-
VkBindDescriptorSetsInfo
Creates aVkBindDescriptorSetsInfoinstance 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<VkBindDescriptorSetsInfo>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
stageFlags
public int stageFlags()a bitmask ofVkShaderStageFlagBitsspecifying the shader stages the descriptor sets will be bound to. -
layout
public long layout()aVkPipelineLayoutobject used to program the bindings. If thedynamicPipelineLayoutfeature is enabled,layoutcan beNULL_HANDLEand the layout must be specified by chaining theVkPipelineLayoutCreateInfostructure off thepNext -
firstSet
public int firstSet()the set number of the first descriptor set to be bound. -
descriptorSetCount
public int descriptorSetCount()the number of elements in thepDescriptorSetsarray. -
pDescriptorSets
a pointer to an array of handles toVkDescriptorSetobjects describing the descriptor sets to bind to. -
dynamicOffsetCount
public int dynamicOffsetCount()the number of dynamic offsets in thepDynamicOffsetsarray. -
pDynamicOffsets
a pointer to an array ofuint32_tvalues specifying dynamic offsets. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFOvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkPipelineLayoutCreateInfovalue to thepNextchain. -
stageFlags
Sets the specified value to thestageFlags()field. -
layout
Sets the specified value to thelayout()field. -
firstSet
Sets the specified value to thefirstSet()field. -
pDescriptorSets
Sets the address of the specifiedLongBufferto thepDescriptorSets()field. -
dynamicOffsetCount
Sets the specified value to thedynamicOffsetCount()field. -
pDynamicOffsets
Sets the address of the specifiedIntBufferto thepDynamicOffsets()field. -
set
public VkBindDescriptorSetsInfo set(int sType, long pNext, int stageFlags, long layout, int firstSet, LongBuffer pDescriptorSets, int dynamicOffsetCount, @Nullable IntBuffer pDynamicOffsets) 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 newVkBindDescriptorSetsInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkBindDescriptorSetsInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkBindDescriptorSetsInfoinstance allocated withBufferUtils. -
create
Returns a newVkBindDescriptorSetsInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkBindDescriptorSetsInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newVkBindDescriptorSetsInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkBindDescriptorSetsInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkBindDescriptorSetsInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkBindDescriptorSetsInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
public static VkBindDescriptorSetsInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkBindDescriptorSetsInfo.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(). -
nstageFlags
public static int nstageFlags(long struct) Unsafe version ofstageFlags(). -
nlayout
public static long nlayout(long struct) Unsafe version oflayout(). -
nfirstSet
public static int nfirstSet(long struct) Unsafe version offirstSet(). -
ndescriptorSetCount
public static int ndescriptorSetCount(long struct) Unsafe version ofdescriptorSetCount(). -
npDescriptorSets
Unsafe version ofpDescriptorSets. -
ndynamicOffsetCount
public static int ndynamicOffsetCount(long struct) Unsafe version ofdynamicOffsetCount(). -
npDynamicOffsets
Unsafe version ofpDynamicOffsets. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
nstageFlags
public static void nstageFlags(long struct, int value) Unsafe version ofstageFlags. -
nlayout
public static void nlayout(long struct, long value) Unsafe version oflayout. -
nfirstSet
public static void nfirstSet(long struct, int value) Unsafe version offirstSet. -
ndescriptorSetCount
public static void ndescriptorSetCount(long struct, int value) Sets the specified value to thedescriptorSetCountfield of the specifiedstruct. -
npDescriptorSets
Unsafe version ofpDescriptorSets. -
ndynamicOffsetCount
public static void ndynamicOffsetCount(long struct, int value) Sets the specified value to thedynamicOffsetCountfield of the specifiedstruct. -
npDynamicOffsets
Unsafe version ofpDynamicOffsets. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-