Class VkWriteDescriptorSet
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
Description
Only one of pImageInfo, pBufferInfo, or pTexelBufferView members is used according to the descriptor type specified in the descriptorType member of the containing VkWriteDescriptorSet structure, or none of them in case descriptorType is DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, in which case the source data for the descriptor writes is taken from the VkWriteDescriptorSetInlineUniformBlock structure included in the pNext chain of VkWriteDescriptorSet, or if descriptorType is DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, in which case the source data for the descriptor writes is taken from the VkWriteDescriptorSetAccelerationStructureKHR structure in the pNext chain of VkWriteDescriptorSet, or if descriptorType is DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, in which case the source data for the descriptor writes is taken from the VkWriteDescriptorSetAccelerationStructureNV structure in the pNext chain of VkWriteDescriptorSet, as specified below.
If the nullDescriptor feature is enabled, the buffer, acceleration structure, imageView, or bufferView can be NULL_HANDLE. Loads from a null descriptor return zero values and stores and atomics to a null descriptor are discarded. A null acceleration structure descriptor results in the miss shader being invoked.
If the destination descriptor is a mutable descriptor, the active descriptor type for the destination descriptor becomes descriptorType.
If the dstBinding has fewer than descriptorCount array elements remaining starting from dstArrayElement, then the remainder will be used to update the subsequent binding - dstBinding+1 starting at array element zero. If a binding has a descriptorCount of zero, it is skipped. This behavior applies recursively, with the update affecting consecutive bindings as needed to update all descriptorCount descriptors. Consecutive bindings must have identical VkDescriptorType, VkShaderStageFlags, VkDescriptorBindingFlagBits, and immutable samplers references. In addition, if the VkDescriptorType is DESCRIPTOR_TYPE_MUTABLE_EXT, the supported descriptor types in VkMutableDescriptorTypeCreateInfoEXT must be equally defined.
Note
The same behavior applies to bindings with a descriptor type of DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK where descriptorCount specifies the number of bytes to update while dstArrayElement specifies the starting byte offset, thus in this case if the dstBinding has a smaller byte size than the sum of dstArrayElement and descriptorCount, then the remainder will be used to update the subsequent binding - dstBinding+1 starting at offset zero. This falls out as a special case of the above rule.
Valid Usage
dstBindingmust be less than or equal to the maximum value ofbindingof allVkDescriptorSetLayoutBindingstructures specified whendstSet’s descriptor set layout was createddstBindingmust be a binding with a non-zerodescriptorCountdstBindingmust be a binding with a non-zeroVkDescriptorSetLayoutCreateInfo::bindingCount- All consecutive bindings updated via a single
VkWriteDescriptorSetstructure, except those with adescriptorCountof zero, must have identicaldescriptorTypeandstageFlags - All consecutive bindings updated via a single
VkWriteDescriptorSetstructure, except those with adescriptorCountof zero, must all either use immutable samplers or must all not use immutable samplers descriptorTypemust match the type ofdstBindingwithindstSetdstSetmust be a validVkDescriptorSethandle- The sum of
dstArrayElementanddescriptorCountmust be less than or equal to the number of array elements in the descriptor set binding specified bydstBinding, and all applicable consecutive bindings - If
descriptorTypeisDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,dstArrayElementmust be an integer multiple of 4 - If
descriptorTypeisDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,descriptorCountmust be an integer multiple of 4 - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFERorDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, each element ofpTexelBufferViewmust be either a validVkBufferViewhandle orNULL_HANDLE - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFERorDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERand thenullDescriptorfeature is not enabled, each element ofpTexelBufferViewmust not beNULL_HANDLE - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFER,DESCRIPTOR_TYPE_STORAGE_BUFFER,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC,pBufferInfomust be a valid pointer to an array ofdescriptorCountvalidVkDescriptorBufferInfostructures - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLERorDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, anddstSetwas not allocated with a layout that included immutable samplers fordstBindingwithdescriptorType, thesamplermember of each element ofpImageInfomust be a validVkSamplerobject - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,DESCRIPTOR_TYPE_SAMPLED_IMAGE, orDESCRIPTOR_TYPE_STORAGE_IMAGE, theimageViewmember of each element ofpImageInfomust be either a validVkImageViewhandle orNULL_HANDLE - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,DESCRIPTOR_TYPE_SAMPLED_IMAGE, orDESCRIPTOR_TYPE_STORAGE_IMAGE, and thenullDescriptorfeature is not enabled, theimageViewmember of each element ofpImageInfomust not beNULL_HANDLE - If
descriptorTypeisDESCRIPTOR_TYPE_INPUT_ATTACHMENT, theimageViewmember of each element ofpImageInfomust not beNULL_HANDLE - If
descriptorTypeisDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, thepNextchain must include aVkWriteDescriptorSetInlineUniformBlockstructure whosedataSizemember equalsdescriptorCount - If
descriptorTypeisDESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, thepNextchain must include aVkWriteDescriptorSetAccelerationStructureKHRstructure whoseaccelerationStructureCountmember equalsdescriptorCount - If
descriptorTypeisDESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, thepNextchain must include aVkWriteDescriptorSetAccelerationStructureNVstructure whoseaccelerationStructureCountmember equalsdescriptorCount - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLED_IMAGE, then theimageViewmember of eachpImageInfoelement must have been created without aVkSamplerYcbcrConversionInfostructure in itspNextchain - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and if any element ofpImageInfohas animageViewmember that was created with aVkSamplerYcbcrConversionInfostructure in itspNextchain, thendstSetmust have been allocated with a layout that included immutable samplers fordstBinding, and the corresponding immutable sampler must have been created with an identically definedVkSamplerYcbcrConversionInfoobject - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, anddstSetwas allocated with a layout that included immutable samplers fordstBinding, then theimageViewmember of each element ofpImageInfowhich corresponds to an immutable sampler that enables sampler Y′CBCR conversion must have been created with aVkSamplerYcbcrConversionInfostructure in itspNextchain with an identically definedVkSamplerYcbcrConversionInfoto the corresponding immutable sampler - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,dstSetwas allocated with a layout that included immutable samplers fordstBinding, and those samplers enable sampler Y′CBCR conversion, thenimageViewmust not beNULL_HANDLE - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFERorDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, theoffsetmember of each element ofpBufferInfomust be a multiple ofVkPhysicalDeviceLimits::minUniformBufferOffsetAlignment - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_BUFFERorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, theoffsetmember of each element ofpBufferInfomust be a multiple ofVkPhysicalDeviceLimits::minStorageBufferOffsetAlignment - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFER,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,DESCRIPTOR_TYPE_STORAGE_BUFFER, orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, and thebuffermember of any element ofpBufferInfois the handle of a non-sparse buffer, then that buffer must be bound completely and contiguously to a singleVkDeviceMemoryobject - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFERorDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, thebuffermember of each element ofpBufferInfomust have been created withBUFFER_USAGE_UNIFORM_BUFFER_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_BUFFERorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, thebuffermember of each element ofpBufferInfomust have been created withBUFFER_USAGE_STORAGE_BUFFER_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_BUFFERorDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, therangemember of each element ofpBufferInfo, or the effective range ifrangeisWHOLE_SIZE, must be less than or equal toVkPhysicalDeviceLimits::maxUniformBufferRange - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_BUFFERorDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, therangemember of each element ofpBufferInfo, or the effective range ifrangeisWHOLE_SIZE, must be less than or equal toVkPhysicalDeviceLimits::maxStorageBufferRange - If
descriptorTypeisDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, thepTexelBufferViewbuffer view usage must includeBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, thepTexelBufferViewbuffer view usage must includeBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_IMAGEorDESCRIPTOR_TYPE_INPUT_ATTACHMENT, theimageViewmember of each element ofpImageInfomust have been created with the identity swizzle - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLED_IMAGEorDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, theimageViewmember of each element ofpImageInfomust have been created withIMAGE_USAGE_SAMPLED_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLED_IMAGEtheimageLayoutmember of each element ofpImageInfomust be a member of the list given in Sampled Image - If
descriptorTypeisDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERtheimageLayoutmember of each element ofpImageInfomust be a member of the list given in Combined Image Sampler - If
descriptorTypeisDESCRIPTOR_TYPE_INPUT_ATTACHMENTtheimageLayoutmember of each element ofpImageInfomust be a member of the list given in Input Attachment - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_IMAGEtheimageLayoutmember of each element ofpImageInfomust be a member of the list given in Storage Image - If
descriptorTypeisDESCRIPTOR_TYPE_INPUT_ATTACHMENT, theimageViewmember of each element ofpImageInfomust have been created withIMAGE_USAGE_INPUT_ATTACHMENT_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_STORAGE_IMAGE, theimageViewmember of each element ofpImageInfomust have been created withIMAGE_USAGE_STORAGE_BITset - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLER, thendstSetmust not have been allocated with a layout that included immutable samplers fordstBinding - If the
VkDescriptorSetLayoutBindingfordstSetatdstBindingisDESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor typedescriptorTypemust exist in the correspondingpMutableDescriptorTypeListslist fordstBinding - If
descriptorTypeisDESCRIPTOR_TYPE_INPUT_ATTACHMENT, theimageViewmember of each element ofpImageInfomust have either been created without aVkImageViewMinLodCreateInfoEXTincluded in thepNextchain or with aVkImageViewMinLodCreateInfoEXT::minLodof0.0 - If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, theimageViewmember of each element ofpImageInfomust have been created with a view created with animagecreated withIMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM - If
descriptorTypeisDESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, theimageViewmember of each element ofpImageInfomust have been created with a view created with animagecreated withIMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkWriteDescriptorSetAccelerationStructureKHR,VkWriteDescriptorSetAccelerationStructureNV, orVkWriteDescriptorSetInlineUniformBlock - The
sTypevalue of each struct in thepNextchain must be unique descriptorTypemust be a validVkDescriptorTypevaluedescriptorCountmust be greater than 0- Both of
dstSet, and the elements ofpTexelBufferViewthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkDescriptorBufferInfo, VkDescriptorImageInfo, VkPushDescriptorSetInfo, CmdPushDescriptorSet, CmdPushDescriptorSetKHR, UpdateDescriptorSets
Layout
struct VkWriteDescriptorSet {
VkStructureType sType();
void const * pNext();
VkDescriptorSet dstSet();
uint32_t dstBinding();
uint32_t dstArrayElement();
uint32_t descriptorCount();
VkDescriptorType descriptorType();
VkDescriptorImageInfo const * pImageInfo();
VkDescriptorBufferInfo const * pBufferInfo();
VkBufferView const * pTexelBufferView();
}-
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 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
ConstructorsConstructorDescriptionVkWriteDescriptorSet(ByteBuffer container) Creates aVkWriteDescriptorSetinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkWriteDescriptorSetcalloc()Returns a newVkWriteDescriptorSetinstance allocated withmemCalloc.static VkWriteDescriptorSet.Buffercalloc(int capacity) Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemCalloc.static VkWriteDescriptorSet.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkWriteDescriptorSetcalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkWriteDescriptorSetDeprecated.static VkWriteDescriptorSet.BuffercallocStack(int capacity) Deprecated.static VkWriteDescriptorSet.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkWriteDescriptorSetcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkWriteDescriptorSetcreate()Returns a newVkWriteDescriptorSetinstance allocated withBufferUtils.static VkWriteDescriptorSet.Buffercreate(int capacity) Returns a newVkWriteDescriptorSet.Bufferinstance allocated withBufferUtils.static VkWriteDescriptorSetcreate(long address) Returns a newVkWriteDescriptorSetinstance for the specified memory address.static VkWriteDescriptorSet.Buffercreate(long address, int capacity) Create aVkWriteDescriptorSet.Bufferinstance at the specified memory.static @Nullable VkWriteDescriptorSetcreateSafe(long address) static @Nullable VkWriteDescriptorSet.BuffercreateSafe(long address, int capacity) intthe number of descriptors to update.descriptorCount(int value) Sets the specified value to thedescriptorCount()field.intaVkDescriptorTypespecifying the type of each descriptor inpImageInfo,pBufferInfo, orpTexelBufferView, as described below.descriptorType(int value) Sets the specified value to thedescriptorType()field.intthe starting element in that array.dstArrayElement(int value) Sets the specified value to thedstArrayElement()field.intthe descriptor binding within that set.dstBinding(int value) Sets the specified value to thedstBinding()field.longdstSet()the destination descriptor set to update.dstSet(long value) Sets the specified value to thedstSet()field.static VkWriteDescriptorSetmalloc()Returns a newVkWriteDescriptorSetinstance allocated withmemAlloc.static VkWriteDescriptorSet.Buffermalloc(int capacity) Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemAlloc.static VkWriteDescriptorSet.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStack.static VkWriteDescriptorSetmalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStack.static VkWriteDescriptorSetDeprecated.static VkWriteDescriptorSet.BuffermallocStack(int capacity) Deprecated.static VkWriteDescriptorSet.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkWriteDescriptorSetmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intndescriptorCount(long struct) Unsafe version ofdescriptorCount().static voidndescriptorCount(long struct, int value) Sets the specified value to thedescriptorCountfield of the specifiedstruct.static intndescriptorType(long struct) Unsafe version ofdescriptorType().static voidndescriptorType(long struct, int value) Unsafe version ofdescriptorType.static intndstArrayElement(long struct) Unsafe version ofdstArrayElement().static voidndstArrayElement(long struct, int value) Unsafe version ofdstArrayElement.static intndstBinding(long struct) Unsafe version ofdstBinding().static voidndstBinding(long struct, int value) Unsafe version ofdstBinding.static longndstSet(long struct) Unsafe version ofdstSet().static voidndstSet(long struct, long value) Unsafe version ofdstSet.static @Nullable VkDescriptorBufferInfo.BuffernpBufferInfo(long struct) Unsafe version ofpBufferInfo().static voidnpBufferInfo(long struct, @Nullable VkDescriptorBufferInfo.Buffer value) Unsafe version ofpBufferInfo.static @Nullable VkDescriptorImageInfo.BuffernpImageInfo(long struct) Unsafe version ofpImageInfo().static voidnpImageInfo(long struct, @Nullable VkDescriptorImageInfo.Buffer value) Unsafe version ofpImageInfo.static longnpNext(long struct) Unsafe version ofpNext().static voidnpNext(long struct, long value) Unsafe version ofpNext.static @Nullable LongBuffernpTexelBufferView(long struct) Unsafe version ofpTexelBufferView.static voidnpTexelBufferView(long struct, @Nullable LongBuffer value) Unsafe version ofpTexelBufferView.static intnsType(long struct) Unsafe version ofsType().static voidnsType(long struct, int value) Unsafe version ofsType.@Nullable VkDescriptorBufferInfo.Buffera pointer to an array ofVkDescriptorBufferInfostructures or is ignored, as described below.pBufferInfo(@Nullable VkDescriptorBufferInfo.Buffer value) Sets the address of the specifiedVkDescriptorBufferInfo.Bufferto thepBufferInfo()field.@Nullable VkDescriptorImageInfo.Buffera pointer to an array ofVkDescriptorImageInfostructures or is ignored, as described below.pImageInfo(@Nullable VkDescriptorImageInfo.Buffer value) Sets the address of the specifiedVkDescriptorImageInfo.Bufferto thepImageInfo()field.longpNext()NULLor a pointer to a structure extending this structure.pNext(long value) Sets the specified value to thepNext()field.Prepends the specifiedVkWriteDescriptorSetAccelerationStructureKHRvalue to thepNextchain.Prepends the specifiedVkWriteDescriptorSetAccelerationStructureNVvalue to thepNextchain.Prepends the specifiedVkWriteDescriptorSetInlineUniformBlockvalue to thepNextchain.Prepends the specifiedVkWriteDescriptorSetInlineUniformBlockEXTvalue to thepNextchain.@Nullable LongBuffera pointer to an array ofVkBufferViewhandles as described in the Buffer Views section or is ignored, as described below.pTexelBufferView(@Nullable LongBuffer value) Sets the address of the specifiedLongBufferto thepTexelBufferView()field.set(int sType, long pNext, long dstSet, int dstBinding, int dstArrayElement, int descriptorCount, int descriptorType, @Nullable VkDescriptorImageInfo.Buffer pImageInfo, @Nullable VkDescriptorBufferInfo.Buffer pBufferInfo, @Nullable LongBuffer pTexelBufferView) Initializes this struct with the specified values.set(VkWriteDescriptorSet src) Copies the specified struct data to this struct.intsizeof()intsType()aVkStructureTypevalue identifying this structure.sType(int value) Sets the specified value to thesType()field.Sets theSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SETvalue 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. -
DSTSET
public static final int DSTSETThe struct member offsets. -
DSTBINDING
public static final int DSTBINDINGThe struct member offsets. -
DSTARRAYELEMENT
public static final int DSTARRAYELEMENTThe struct member offsets. -
DESCRIPTORCOUNT
public static final int DESCRIPTORCOUNTThe struct member offsets. -
DESCRIPTORTYPE
public static final int DESCRIPTORTYPEThe struct member offsets. -
PIMAGEINFO
public static final int PIMAGEINFOThe struct member offsets. -
PBUFFERINFO
public static final int PBUFFERINFOThe struct member offsets. -
PTEXELBUFFERVIEW
public static final int PTEXELBUFFERVIEWThe struct member offsets.
-
-
Constructor Details
-
VkWriteDescriptorSet
Creates aVkWriteDescriptorSetinstance 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<VkWriteDescriptorSet>
-
sType
public int sType()aVkStructureTypevalue identifying this structure. -
pNext
public long pNext()NULLor a pointer to a structure extending this structure. -
dstSet
public long dstSet()the destination descriptor set to update. -
dstBinding
public int dstBinding()the descriptor binding within that set. -
dstArrayElement
public int dstArrayElement()the starting element in that array. If the descriptor binding identified bydstSetanddstBindinghas a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCKthendstArrayElementspecifies the starting byte offset within the binding. -
descriptorCount
public int descriptorCount()the number of descriptors to update. If the descriptor binding identified bydstSetanddstBindinghas a descriptor type ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, thendescriptorCountspecifies the number of bytes to update. Otherwise,descriptorCountis one of- the number of elements in
pImageInfo - the number of elements in
pBufferInfo - the number of elements in
pTexelBufferView - a value matching the
dataSizemember of aVkWriteDescriptorSetInlineUniformBlockstructure in thepNextchain - a value matching the
accelerationStructureCountof aVkWriteDescriptorSetAccelerationStructureKHRorVkWriteDescriptorSetAccelerationStructureNVstructure in thepNextchain
- the number of elements in
-
descriptorType
public int descriptorType()aVkDescriptorTypespecifying the type of each descriptor inpImageInfo,pBufferInfo, orpTexelBufferView, as described below. IfVkDescriptorSetLayoutBindingfordstSetatdstBindingis not equal toDESCRIPTOR_TYPE_MUTABLE_EXT,descriptorTypemust be the same type as thedescriptorTypespecified inVkDescriptorSetLayoutBindingfordstSetatdstBinding. The type of the descriptor also controls which array the descriptors are taken from. -
pImageInfo
a pointer to an array ofVkDescriptorImageInfostructures or is ignored, as described below. -
pBufferInfo
a pointer to an array ofVkDescriptorBufferInfostructures or is ignored, as described below. -
pTexelBufferView
a pointer to an array ofVkBufferViewhandles as described in the Buffer Views section or is ignored, as described below. -
sType
Sets the specified value to thesType()field. -
sType$Default
Sets theSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SETvalue to thesType()field. -
pNext
Sets the specified value to thepNext()field. -
pNext
Prepends the specifiedVkWriteDescriptorSetAccelerationStructureKHRvalue to thepNextchain. -
pNext
Prepends the specifiedVkWriteDescriptorSetAccelerationStructureNVvalue to thepNextchain. -
pNext
Prepends the specifiedVkWriteDescriptorSetInlineUniformBlockvalue to thepNextchain. -
pNext
Prepends the specifiedVkWriteDescriptorSetInlineUniformBlockEXTvalue to thepNextchain. -
dstSet
Sets the specified value to thedstSet()field. -
dstBinding
Sets the specified value to thedstBinding()field. -
dstArrayElement
Sets the specified value to thedstArrayElement()field. -
descriptorCount
Sets the specified value to thedescriptorCount()field. -
descriptorType
Sets the specified value to thedescriptorType()field. -
pImageInfo
Sets the address of the specifiedVkDescriptorImageInfo.Bufferto thepImageInfo()field. -
pBufferInfo
Sets the address of the specifiedVkDescriptorBufferInfo.Bufferto thepBufferInfo()field. -
pTexelBufferView
Sets the address of the specifiedLongBufferto thepTexelBufferView()field. -
set
public VkWriteDescriptorSet set(int sType, long pNext, long dstSet, int dstBinding, int dstArrayElement, int descriptorCount, int descriptorType, @Nullable VkDescriptorImageInfo.Buffer pImageInfo, @Nullable VkDescriptorBufferInfo.Buffer pBufferInfo, @Nullable LongBuffer pTexelBufferView) 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 newVkWriteDescriptorSetinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkWriteDescriptorSetinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkWriteDescriptorSetinstance allocated withBufferUtils. -
create
Returns a newVkWriteDescriptorSetinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkWriteDescriptorSet.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkWriteDescriptorSet.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkWriteDescriptorSet.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkWriteDescriptorSet.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkWriteDescriptorSet.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkWriteDescriptorSetinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkWriteDescriptorSet.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkWriteDescriptorSet.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(). -
ndstSet
public static long ndstSet(long struct) Unsafe version ofdstSet(). -
ndstBinding
public static int ndstBinding(long struct) Unsafe version ofdstBinding(). -
ndstArrayElement
public static int ndstArrayElement(long struct) Unsafe version ofdstArrayElement(). -
ndescriptorCount
public static int ndescriptorCount(long struct) Unsafe version ofdescriptorCount(). -
ndescriptorType
public static int ndescriptorType(long struct) Unsafe version ofdescriptorType(). -
npImageInfo
Unsafe version ofpImageInfo(). -
npBufferInfo
Unsafe version ofpBufferInfo(). -
npTexelBufferView
Unsafe version ofpTexelBufferView. -
nsType
public static void nsType(long struct, int value) Unsafe version ofsType. -
npNext
public static void npNext(long struct, long value) Unsafe version ofpNext. -
ndstSet
public static void ndstSet(long struct, long value) Unsafe version ofdstSet. -
ndstBinding
public static void ndstBinding(long struct, int value) Unsafe version ofdstBinding. -
ndstArrayElement
public static void ndstArrayElement(long struct, int value) Unsafe version ofdstArrayElement. -
ndescriptorCount
public static void ndescriptorCount(long struct, int value) Sets the specified value to thedescriptorCountfield of the specifiedstruct. -
ndescriptorType
public static void ndescriptorType(long struct, int value) Unsafe version ofdescriptorType. -
npImageInfo
Unsafe version ofpImageInfo. -
npBufferInfo
Unsafe version ofpBufferInfo. -
npTexelBufferView
Unsafe version ofpTexelBufferView.
-