# vkGetDescriptorEXT(3) Manual Page

## Name

vkGetDescriptorEXT - To get a descriptor to place in a buffer

Loading… please wait.

## 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);

## Parameters

- `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 an application-allocated buffer where the descriptor will be written.

## Description

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

- VUID-vkGetDescriptorEXT-None-08015
  The `descriptorBuffer` feature must be enabled

- VUID-vkGetDescriptorEXT-dataSize-08125
  If `pDescriptorInfo->type` is not `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER` or `pDescriptorInfo->data.pCombinedImageSampler` has an `imageView` member that was not created with a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain, `dataSize` must equal the size of a descriptor of type VkDescriptorGetInfoEXT::`type` determined by the value in VkPhysicalDeviceDescriptorBufferPropertiesEXT , or determined by VkPhysicalDeviceDescriptorBufferDensityMapPropertiesEXT::`combinedImageSamplerDensityMapDescriptorSize` if `pDescriptorInfo` specifies a `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER` whose VkSampler was created with `VK_SAMPLER_CREATE_SUBSAMPLED_BIT_EXT` set

- VUID-vkGetDescriptorEXT-descriptorType-09469
  If `pDescriptorInfo->type` is `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER` and `pDescriptorInfo->data.pCombinedImageSampler` has an `imageView` member that was created with a `VkSamplerYcbcrConversionInfo` structure in its `pNext` chain, `dataSize` must equal the size of VkPhysicalDeviceDescriptorBufferPropertiesEXT::`combinedImageSamplerDescriptorSize` times VkSamplerYcbcrConversionImageFormatProperties::`combinedImageSamplerDescriptorCount`

- VUID-vkGetDescriptorEXT-pDescriptorInfo-09507
  If `pDescriptorInfo->type` is `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER` and it has a `imageView` that is VK_NULL_HANDLE then `dataSize` must be equal to the size of VkPhysicalDeviceDescriptorBufferPropertiesEXT::`combinedImageSamplerDescriptorSize`

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

VK_EXT_descriptor_buffer, VkDescriptorGetInfoEXT, VkDevice

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

SPDX-License-Identifier: CC-BY-4.0