vkUpdateDescriptorSets(3)

# vkUpdateDescriptorSets(3) Manual Page

## Name

vkUpdateDescriptorSets - Update the contents of a descriptor set object

## C Specification

Once allocated, descriptor sets can be updated with a combination of write and copy operations. To update descriptor sets, call:

    void vkUpdateDescriptorSets(
        VkDevice                                    device,
        uint32_t                                    descriptorWriteCount,
        const VkWriteDescriptorSet*                 pDescriptorWrites,
        uint32_t                                    descriptorCopyCount,
        const VkCopyDescriptorSet*                  pDescriptorCopies);

## Parameters

- `device` is the logical device that updates the descriptor sets.

- `descriptorWriteCount` is the number of elements in the `pDescriptorWrites` array.

- `pDescriptorWrites` is a pointer to an array of VkWriteDescriptorSet structures describing the descriptor sets to write to.

- `descriptorCopyCount` is the number of elements in the `pDescriptorCopies` array.

- `pDescriptorCopies` is a pointer to an array of VkCopyDescriptorSet structures describing the descriptor sets to copy between.

## Description

The operations described by `pDescriptorWrites` are performed first, followed by the operations described by `pDescriptorCopies`. Within each array, the operations are performed in the order they appear in the array.

Each element in the `pDescriptorWrites` array describes an operation updating the descriptor set using descriptors for resources specified in the structure.

Each element in the `pDescriptorCopies` array is a VkCopyDescriptorSet structure describing an operation copying descriptors between sets.

If the `dstSet` member of any element of `pDescriptorWrites` or `pDescriptorCopies` is bound, accessed, or modified by any command that was recorded to a command buffer which is currently in the recording or executable state, and any of the descriptor bindings that are updated were not created with the `VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT` or `VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT` bits set, that command buffer becomes invalid.

Valid Usage

- Descriptor bindings updated by this command which were created without the `VK_DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT` or `VK_DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT` bits set must not be used by any command that was recorded to a command buffer which is in the pending state.

Valid Usage (Implicit)

- `device` must be a valid VkDevice handle

- If `descriptorWriteCount` is not `0`, `pDescriptorWrites` must be a valid pointer to an array of `descriptorWriteCount` valid VkWriteDescriptorSet structures

- If `descriptorCopyCount` is not `0`, `pDescriptorCopies` must be a valid pointer to an array of `descriptorCopyCount` valid VkCopyDescriptorSet structures

Host Synchronization

- Host access to `pDescriptorWrites`[].dstSet must be externally synchronized

- Host access to `pDescriptorCopies`[].dstSet must be externally synchronized

## See Also

VkCopyDescriptorSet, VkDevice, VkWriteDescriptorSet

## 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-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.