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.
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.
dstBinding must be less than or equal to the maximum value of binding of all VkDescriptorSetLayoutBinding structures specified when dstSet’s descriptor set layout was createddstBinding must be a binding with a non-zero descriptorCountVkWriteDescriptorSet structure, except those with a descriptorCount of zero, must have identical descriptorType and stageFlagsVkWriteDescriptorSet structure, except those with a descriptorCount of zero, must all either use immutable samplers or must all not use immutable samplersdescriptorType must match the type of dstBinding within dstSetdstSet must be a valid VkDescriptorSet handledstArrayElement and descriptorCount must be less than or equal to the number of array elements in the descriptor set binding specified by dstBinding, and all applicable consecutive bindings, as described by consecutive binding updatesdescriptorType is DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, dstArrayElement must be an integer multiple of 4descriptorType is DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, descriptorCount must be an integer multiple of 4descriptorType is DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, each element of pTexelBufferView must be either a valid VkBufferView handle or NULL_HANDLEdescriptorType is DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER or DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER and the nullDescriptor feature is not enabled, each element of pTexelBufferView must not be NULL_HANDLEdescriptorType is DESCRIPTOR_TYPE_UNIFORM_BUFFER, DESCRIPTOR_TYPE_STORAGE_BUFFER, DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, or DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, pBufferInfo must be a valid pointer to an array of descriptorCount valid VkDescriptorBufferInfo structuresdescriptorType is DESCRIPTOR_TYPE_SAMPLER or DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and dstSet was not allocated with a layout that included immutable samplers for dstBinding with descriptorType, the sampler member of each element of pImageInfo must be a valid VkSampler objectdescriptorType is DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, DESCRIPTOR_TYPE_SAMPLED_IMAGE, or DESCRIPTOR_TYPE_STORAGE_IMAGE, the imageView member of each element of pImageInfo must be either a valid VkImageView handle or NULL_HANDLEdescriptorType is DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, DESCRIPTOR_TYPE_SAMPLED_IMAGE, or DESCRIPTOR_TYPE_STORAGE_IMAGE, and the nullDescriptor feature is not enabled, the imageView member of each element of pImageInfo must not be NULL_HANDLEdescriptorType is DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each element of pImageInfo must not be NULL_HANDLEdescriptorType is DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK, the pNext chain must include a VkWriteDescriptorSetInlineUniformBlock structure whose dataSize member equals descriptorCountdescriptorType is DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, the pNext chain must include a VkWriteDescriptorSetAccelerationStructureKHR structure whose accelerationStructureCount member equals descriptorCountdescriptorType is DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV, the pNext chain must include a VkWriteDescriptorSetAccelerationStructureNV structure whose accelerationStructureCount member equals descriptorCountdescriptorType is DESCRIPTOR_TYPE_SAMPLED_IMAGE, then the imageView member of each pImageInfo element must have been created without a VkSamplerYcbcrConversionInfo structure in its pNext chaindescriptorType is DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and if any element of pImageInfo has a imageView member that was created with a VkSamplerYcbcrConversionInfo structure in its pNext chain, then dstSet must have been allocated with a layout that included immutable samplers for dstBinding, and the corresponding immutable sampler must have been created with an identically defined VkSamplerYcbcrConversionInfo objectdescriptorType is DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and dstSet was allocated with a layout that included immutable samplers for dstBinding, then the imageView member of each element of pImageInfo which corresponds to an immutable sampler that enables sampler Y′CBCR conversion must have been created with a VkSamplerYcbcrConversionInfo structure in its pNext chain with an identically defined VkSamplerYcbcrConversionInfo to the corresponding immutable samplerdescriptorType is DESCRIPTOR_TYPE_UNIFORM_BUFFER or DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the offset member of each element of pBufferInfo must be a multiple of VkPhysicalDeviceLimits::minUniformBufferOffsetAlignmentdescriptorType is DESCRIPTOR_TYPE_STORAGE_BUFFER or DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the offset member of each element of pBufferInfo must be a multiple of VkPhysicalDeviceLimits::minStorageBufferOffsetAlignmentdescriptorType is DESCRIPTOR_TYPE_UNIFORM_BUFFER, DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, DESCRIPTOR_TYPE_STORAGE_BUFFER, or DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, and the buffer member of any element of pBufferInfo is the handle of a non-sparse buffer, then that buffer must be bound completely and contiguously to a single VkDeviceMemory objectdescriptorType is DESCRIPTOR_TYPE_UNIFORM_BUFFER or DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the buffer member of each element of pBufferInfo must have been created with BUFFER_USAGE_UNIFORM_BUFFER_BIT setdescriptorType is DESCRIPTOR_TYPE_STORAGE_BUFFER or DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the buffer member of each element of pBufferInfo must have been created with BUFFER_USAGE_STORAGE_BUFFER_BIT setdescriptorType is DESCRIPTOR_TYPE_UNIFORM_BUFFER or DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, the range member of each element of pBufferInfo, or the effective range if range is WHOLE_SIZE, must be less than or equal to VkPhysicalDeviceLimits::maxUniformBufferRangedescriptorType is DESCRIPTOR_TYPE_STORAGE_BUFFER or DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, the range member of each element of pBufferInfo, or the effective range if range is WHOLE_SIZE, must be less than or equal to VkPhysicalDeviceLimits::maxStorageBufferRangedescriptorType is DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, the pTexelBufferView buffer view usage must include BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITdescriptorType is DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, the pTexelBufferView buffer view usage must include BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITdescriptorType is DESCRIPTOR_TYPE_STORAGE_IMAGE or DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each element of pImageInfo must have been created with the identity swizzledescriptorType is DESCRIPTOR_TYPE_SAMPLED_IMAGE or DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, the imageView member of each element of pImageInfo must have been created with IMAGE_USAGE_SAMPLED_BIT setdescriptorType is DESCRIPTOR_TYPE_SAMPLED_IMAGE the imageLayout member of each element of pImageInfo must be a member of the list given in Sampled ImagedescriptorType is DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER the imageLayout member of each element of pImageInfo must be a member of the list given in Combined Image SamplerdescriptorType is DESCRIPTOR_TYPE_INPUT_ATTACHMENT the imageLayout member of each element of pImageInfo must be a member of the list given in Input AttachmentdescriptorType is DESCRIPTOR_TYPE_STORAGE_IMAGE the imageLayout member of each element of pImageInfo must be a member of the list given in Storage ImagedescriptorType is DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each element of pImageInfo must have been created with IMAGE_USAGE_INPUT_ATTACHMENT_BIT setdescriptorType is DESCRIPTOR_TYPE_STORAGE_IMAGE, the imageView member of each element of pImageInfo must have been created with IMAGE_USAGE_STORAGE_BIT setdescriptorType is DESCRIPTOR_TYPE_SAMPLER, then dstSet must not have been allocated with a layout that included immutable samplers for dstBindingVkDescriptorSetLayoutBinding for dstSet at dstBinding is DESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor type descriptorType must exist in the corresponding pMutableDescriptorTypeLists list for dstBindingdescriptorType is DESCRIPTOR_TYPE_INPUT_ATTACHMENT, the imageView member of each element of pImageInfo must have either been created without a VkImageViewMinLodCreateInfoEXT included in the pNext chain or with a VkImageViewMinLodCreateInfoEXT::minLod of 0.0descriptorType is DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM, the imageView member of each element of pImageInfo must have been created with a view created with an image created with IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOMdescriptorType is DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM, the imageView member of each element of pImageInfo must have been created with a view created with an image created with IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOMsType must be STRUCTURE_TYPE_WRITE_DESCRIPTOR_SETpNext member of any structure (including this one) in the pNext chain must be either NULL or a pointer to a valid instance of VkWriteDescriptorSetAccelerationStructureKHR, VkWriteDescriptorSetAccelerationStructureNV, or VkWriteDescriptorSetInlineUniformBlocksType value of each struct in the pNext chain must be uniquedescriptorType must be a valid VkDescriptorType valuedescriptorCount must be greater than 0dstSet, and the elements of pTexelBufferView that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDeviceVkDescriptorBufferInfo, VkDescriptorImageInfo, CmdPushDescriptorSetKHR, UpdateDescriptorSets
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;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | VkWriteDescriptorSet.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | DESCRIPTORCOUNT
The struct member offsets. |
| public static final int | DESCRIPTORTYPE
The struct member offsets. |
| public static final int | DSTARRAYELEMENT
The struct member offsets. |
| public static final int | DSTBINDING
The struct member offsets. |
| public static final int | DSTSET
The struct member offsets. |
| public static final int | PBUFFERINFO
The struct member offsets. |
| public static final int | PIMAGEINFO
The struct member offsets. |
| public static final int | PNEXT
The struct member offsets. |
| public static final int | PTEXELBUFFERVIEW
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| public static final int | STYPE
The struct member offsets. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | VkWriteDescriptorSet(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet. | calloc(int
the buffer capacity capacity)Returns a new |
| public static VkWriteDescriptorSet | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkWriteDescriptorSet. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet. | |
| public static VkWriteDescriptorSet. | |
| protected VkWriteDescriptorSet | 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 VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet. | create(int
the buffer capacity capacity)Returns a new |
| public static VkWriteDescriptorSet. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet. | |
| public int | |
| public VkWriteDescriptorSet | |
| public int | descriptorType()
a |
| public VkWriteDescriptorSet | |
| public int | |
| public VkWriteDescriptorSet | |
| public int | |
| public VkWriteDescriptorSet | |
| public long | |
| public VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet. | malloc(int
the buffer capacity capacity)Returns a new |
| public static VkWriteDescriptorSet | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static VkWriteDescriptorSet. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet | |
| public static VkWriteDescriptorSet. | |
| public static VkWriteDescriptorSet. | |
| public static int | |
| public static void | ndescriptorCount(long struct, int value)
Sets the specified value to the |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static int | |
| public static void | |
| public static long | |
| public static void | |
| public static VkDescriptorBufferInfo. | |
| public static void | |
| public static VkDescriptorImageInfo. | |
| public static void | |
| public static long | |
| public static void | |
| public static LongBuffer | |
| public static void | |
| public static int | |
| public static void | |
| public VkDescriptorBufferInfo. | pBufferInfo()
a pointer to an array of |
| public VkWriteDescriptorSet | pBufferInfo(VkDescriptorBufferInfo.
Sets the address of the specified |
| public VkDescriptorImageInfo. | pImageInfo()
a pointer to an array of |
| public VkWriteDescriptorSet | pImageInfo(VkDescriptorImageInfo.
Sets the address of the specified |
| public long | |
| public VkWriteDescriptorSet | |
| public VkWriteDescriptorSet | pNext(VkWriteDescriptorSetAccelerationStructureKHR value)
Prepends the specified |
| public VkWriteDescriptorSet | pNext(VkWriteDescriptorSetAccelerationStructureNV value)
Prepends the specified |
| public VkWriteDescriptorSet | pNext(VkWriteDescriptorSetInlineUniformBlock value)
Prepends the specified |
| public VkWriteDescriptorSet | pNext(VkWriteDescriptorSetInlineUniformBlockEXT value)
Prepends the specified |
| public LongBuffer | pTexelBufferView()
a pointer to an array of |
| public VkWriteDescriptorSet | pTexelBufferView(LongBuffer value)
Sets the address of the specified |
| public VkWriteDescriptorSet | set(int sType, long pNext, long dstSet, int dstBinding, int dstArrayElement, int descriptorCount, int descriptorType, VkDescriptorImageInfo.
Initializes this struct with the specified values. |
| public VkWriteDescriptorSet | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public int | |
| public VkWriteDescriptorSet | |
| public VkWriteDescriptorSet |