VkCopyDescriptorSet(3)
C Specification
TheVkCopyDescriptorSet structure is defined as:
// Provided by VK_VERSION_1_0typedef struct VkCopyDescriptorSet { VkStructureType sType; const void* pNext; VkDescriptorSet srcSet; uint32_t srcBinding; uint32_t srcArrayElement; VkDescriptorSet dstSet; uint32_t dstBinding; uint32_t dstArrayElement; uint32_t descriptorCount;} VkCopyDescriptorSet;Members
sTypeis aVkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending thisstructure.srcSet,srcBinding, andsrcArrayElementare the sourceset, binding, and array element, respectively.If the descriptor binding identified bysrcSetandsrcBindinghas a descriptor type ofVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK thensrcArrayElementspecifies the starting byte offset within the binding to copy from.dstSet,dstBinding, anddstArrayElementare thedestination set, binding, and array element, respectively.If the descriptor binding identified bydstSetanddstBindinghas a descriptor type ofVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK thendstArrayElementspecifies the starting byte offset within the binding to copy to.descriptorCountis the number of descriptors to copy from thesource to destination.IfdescriptorCountis greater than the number of remaining arrayelements in the source or destination binding, those affect consecutivebindings in a manner similar toVkWriteDescriptorSet above.If the descriptor binding identified bysrcSetandsrcBindinghas a descriptor type ofVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK thendescriptorCountspecifies the number of bytes to copy and the remaining array elementsin the source or destination binding refer to the remaining number ofbytes in those.
Description
If theVkDescriptorSetLayoutBinding fordstBinding isVK_DESCRIPTOR_TYPE_MUTABLE_EXT andsrcBinding is notVK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new active descriptor type becomesthe descriptor type ofsrcBinding.If bothVkDescriptorSetLayoutBinding forsrcBinding anddstBinding areVK_DESCRIPTOR_TYPE_MUTABLE_EXT, the activedescriptor type in each source descriptor is copied into the correspondingdestination descriptor.The active descriptor typecan be different for each source descriptor.
The intention is that copies to and from mutable descriptors is a simplememcpy.Copies between non-mutable and mutable descriptors are expected to requireone memcpy per descriptor to handle the difference in size, but this usecase with more than one |
VUID-VkCopyDescriptorSet-srcBinding-00345
srcBindingmust be a valid binding withinsrcSetVUID-VkCopyDescriptorSet-srcArrayElement-00346
The sum ofsrcArrayElementanddescriptorCountmust be lessthan or equal to the number of array elements in the descriptor setbinding specified bysrcBinding, and all applicableconsecutive bindingsVUID-VkCopyDescriptorSet-dstBinding-00347
dstBindingmust be a valid binding withindstSetVUID-VkCopyDescriptorSet-dstArrayElement-00348
The sum ofdstArrayElementanddescriptorCountmust be lessthan or equal to the number of array elements in the descriptor setbinding specified bydstBinding, and all applicableconsecutive bindingsVUID-VkCopyDescriptorSet-dstBinding-02632
The type ofdstBindingwithindstSetmust be equal to thetype ofsrcBindingwithinsrcSetVUID-VkCopyDescriptorSet-srcSet-00349
IfsrcSetis equal todstSet, then the source anddestination ranges of descriptorsmust not overlap, where the rangesmay include array elements from consecutive bindingsVUID-VkCopyDescriptorSet-srcBinding-02223
If the descriptor type of the descriptor set binding specified bysrcBindingisVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,srcArrayElementmust be an integer multiple of4VUID-VkCopyDescriptorSet-dstBinding-02224
If the descriptor type of the descriptor set binding specified bydstBindingisVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,dstArrayElementmust be an integer multiple of4VUID-VkCopyDescriptorSet-srcBinding-02225
If the descriptor type of the descriptor set binding specified by eithersrcBindingordstBindingisVK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK,descriptorCountmust be an integer multiple of4VUID-VkCopyDescriptorSet-srcSet-01918
IfsrcSet’s layout was created with theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flagset, thendstSet’s layoutmust also have been created with theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flagsetVUID-VkCopyDescriptorSet-srcSet-04885
IfsrcSet’s layout was created withouteither theVK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXTflag ortheVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITflag set, thendstSet’s layoutmust have been created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT flagsetVUID-VkCopyDescriptorSet-srcSet-01920
If the descriptor pool from whichsrcSetwas allocated was createdwith theVK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set,then the descriptor pool from whichdstSetwas allocatedmustalso have been created with theVK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag setVUID-VkCopyDescriptorSet-srcSet-04887
If the descriptor pool from whichsrcSetwas allocated was createdwithouteither theVK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_EXT flag ortheVK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag set, thenthe descriptor pool from whichdstSetwas allocatedmust havebeen created without theVK_DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT flag setVUID-VkCopyDescriptorSet-dstBinding-02753
If the descriptor type of the descriptor set binding specified bydstBindingisVK_DESCRIPTOR_TYPE_SAMPLER, thendstSetmust not have been allocated with a layout that included immutablesamplers fordstBindingVUID-VkCopyDescriptorSet-dstSet-04612
IfVkDescriptorSetLayoutBindingfordstSetatdstBindingisVK_DESCRIPTOR_TYPE_MUTABLE_EXT, the new activedescriptor typemust exist in the correspondingpMutableDescriptorTypeListslist fordstBindingif the newactive descriptor type is notVK_DESCRIPTOR_TYPE_MUTABLE_EXTVUID-VkCopyDescriptorSet-srcSet-04613
IfVkDescriptorSetLayoutBindingforsrcSetatsrcBindingisVK_DESCRIPTOR_TYPE_MUTABLE_EXT and theVkDescriptorSetLayoutBindingfordstSetatdstBindingis notVK_DESCRIPTOR_TYPE_MUTABLE_EXT, the active descriptor typefor the source descriptormust match the descriptor type ofdstBindingVUID-VkCopyDescriptorSet-dstSet-04614
IfVkDescriptorSetLayoutBindingfordstSetatdstBindingisVK_DESCRIPTOR_TYPE_MUTABLE_EXT, and the newactive descriptor type isVK_DESCRIPTOR_TYPE_MUTABLE_EXT, thepMutableDescriptorTypeListsforsrcBindinganddstBindingmust match exactly
VUID-VkCopyDescriptorSet-sType-sType
sTypemust beVK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SETVUID-VkCopyDescriptorSet-srcSet-parameter
srcSetmust be a validVkDescriptorSet handleVUID-VkCopyDescriptorSet-dstSet-parameter
dstSetmust be a validVkDescriptorSet handleVUID-VkCopyDescriptorSet-commonparent
Both ofdstSet, andsrcSetmust have been created, allocated, or retrieved from the sameVkDevice
Document Notes
For more information, see theVulkan Specification.
This page is extracted from the Vulkan Specification.Fixes and changes should be made to the Specification, not directly.