C Specification
The VkWriteDescriptorSet
structure is defined as:
typedef struct VkWriteDescriptorSet {
VkStructureType sType;
const void* pNext;
VkDescriptorSet dstSet;
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
VkDescriptorType descriptorType;
const VkDescriptorImageInfo* pImageInfo;
const VkDescriptorBufferInfo* pBufferInfo;
const VkBufferView* pTexelBufferView;
} VkWriteDescriptorSet;
Members
-
sType
is the type of this structure. -
pNext
isNULL
or a pointer to an extension-specific structure. -
dstSet
is the destination descriptor set to update. -
dstBinding
is the descriptor binding within that set. -
dstArrayElement
is the starting element in that array. If the descriptor binding identified bydstSet
anddstBinding
has a descriptor type ofVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendstArrayElement
specifies the starting byte offset within the binding. -
descriptorCount
is the number of descriptors to update (the number of elements inpImageInfo
,pBufferInfo
, orpTexelBufferView
, or a value matching thedataSize
member of an instance of VkWriteDescriptorSetInlineUniformBlockEXT in thepNext
chain , or a value matching theaccelerationStructureCount
of an instance of VkWriteDescriptorSetAccelerationStructureNV in thepNext
chain ). If the descriptor binding identified bydstSet
anddstBinding
has a descriptor type ofVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
specifies the number of bytes to update. -
descriptorType
is a VkDescriptorType specifying the type of each descriptor inpImageInfo
,pBufferInfo
, orpTexelBufferView
, as described below. It must be the same type as that specified inVkDescriptorSetLayoutBinding
fordstSet
atdstBinding
. The type of the descriptor also controls which array the descriptors are taken from. -
pImageInfo
is a pointer to an array of VkDescriptorImageInfo structures or is ignored, as described below. -
pBufferInfo
is a pointer to an array of VkDescriptorBufferInfo structures or is ignored, as described below. -
pTexelBufferView
is a pointer to an array of VkBufferView handles as described in the Buffer Views section or is ignored, as described below.
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
VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
, in which case the source
data for the descriptor writes is taken from the instance of
VkWriteDescriptorSetInlineUniformBlockEXT in the pNext
chain of
VkWriteDescriptorSet
,
or if descriptorType
is
VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
, in which case the source
data for the descriptor writes is taken from the instance of
VkWriteDescriptorSetAccelerationStructureNV in the pNext
chain
of VkWriteDescriptorSet
,
as specified below.
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.
Note
The same behavior applies to bindings with a descriptor type of
|
See Also
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright (c) 2014-2019 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.