C Specification

To get descriptor data to place in a buffer, call:

// Provided by VK_EXT_descriptor_buffer
void vkGetDescriptorEXT(
    VkDevice                                    device,
    const VkDescriptorGetInfoEXT*               pDescriptorInfo,
    size_t                                      dataSize,
    void*                                       pDescriptor);


  • device is the logical device that gets the descriptor.

  • pDescriptorInfo is a pointer to a VkDescriptorGetInfoEXT structure specifying the parameters of the descriptor to get.

  • dataSize is the amount of the descriptor data to get in bytes.

  • pDescriptor is a pointer to a user-allocated buffer where the descriptor will be written.


The size of the data for each descriptor type is determined by the value in VkPhysicalDeviceDescriptorBufferPropertiesEXT. This value also defines the stride in bytes for arrays of that descriptor type.

If the VkPhysicalDeviceDescriptorBufferPropertiesEXT::combinedImageSamplerDescriptorSingleArray property is VK_FALSE the implementation requires an array of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors to be written into a descriptor buffer as an array of image descriptors, immediately followed by an array of sampler descriptors. Applications must write the first VkPhysicalDeviceDescriptorBufferPropertiesEXT::sampledImageDescriptorSize bytes of the data returned through pDescriptor to the first array, and the remaining VkPhysicalDeviceDescriptorBufferPropertiesEXT::samplerDescriptorSize bytes of the data to the second array. For variable-sized descriptor bindings of VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER descriptors, the two arrays each have a size equal to the upper bound descriptorCount of that binding.

A descriptor obtained by this command references the underlying VkImageView or VkSampler, and these objects must not be destroyed before the last time a descriptor is dynamically accessed. For descriptor types which consume an address instead of an object, the underlying VkBuffer is referenced instead.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkGetDescriptorEXT-device-parameter
    device must be a valid VkDevice handle

  • VUID-vkGetDescriptorEXT-pDescriptorInfo-parameter
    pDescriptorInfo must be a valid pointer to a valid VkDescriptorGetInfoEXT structure

  • VUID-vkGetDescriptorEXT-pDescriptor-parameter
    pDescriptor must be a valid pointer to an array of dataSize bytes

  • VUID-vkGetDescriptorEXT-dataSize-arraylength
    dataSize must be greater than 0

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0