VKFREEDESCRIPTORSETS(3)

NAME
vkFreeDescriptorSets - Free one or more descriptor sets

C SPECIFICATION

    VkResult vkFreeDescriptorSets(
        VkDevice                                    device,
        VkDescriptorPool                            descriptorPool,
        uint32_t                                    descriptorSetCount,
        const VkDescriptorSet*                      pDescriptorSets);

PARAMETERS

device
    The device that owns the descriptor sets.

descriptorPool
    The descriptor pool that the descriptor sets were allocated from.

descriptorSetCount
    The number of descriptor sets to free.

pDescriptorSets
    An array of descriptorSetCount variables containing the descriptor set handles to free.

DESCRIPTION

vkFreeDescriptorSets frees descriptor sets. device is a handle to the device that owns the descriptor pool specified in descriptorPool, which must be the pool from which the sets were allocated. Freeing a descriptor set returns its descriptors to the pool from which it was allocated but does not necessarily free resources associated with the set. pDescriptorSets is a pointer to an array of descriptor set handles returned from previous calls to vkAllocateDescriptorSets. descriptorSetCount specifies the number of descriptor set handles in the pDescriptorSets array.

To actually free resources associated with descriptor pools, call vkDestroyDescriptorPool.

VALID USAGE

    • device must be a valid VkDevice handle

    • descriptorPool must be a valid VkDescriptorPool handle

    • descriptorSetCount must be greater than 0

    • descriptorPool must have been created, allocated or retrieved from device

    • Each element of pDescriptorSets that is a valid handle must have been created, allocated or retrieved from descriptorPool

    • Each of device, descriptorPool and the elements of pDescriptorSets that are valid handles must have been created, allocated or retrieved from the same VkPhysicalDevice

    • All submitted commands that refer to any element of pDescriptorSets must have completed execution

    • pDescriptorSets must be a pointer to an array of descriptorSetCount VkDescriptorSet handles, each element of which must either be a valid handle or VK_NULL_HANDLE

    • descriptorPool must have been created with the VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT flag

HOST SYNCHRONIZATION

    • Host access to descriptorPool must be externally synchronized

    • Host access to each member of pDescriptorSets must be externally synchronized

RETURN CODES

On success, this command returns

        • VK_SUCCESS

On failure, this command returns

        • VK_ERROR_OUT_OF_HOST_MEMORY

        • VK_ERROR_OUT_OF_DEVICE_MEMORY

SEE ALSO

vkAllocateDescriptorSets, vkCreateDescriptorPool, vkDestroyDescriptorPool.

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.