vkWriteSamplerDescriptorsEXT(3)

# vkWriteSamplerDescriptorsEXT(3) Manual Page

## Name

vkWriteSamplerDescriptorsEXT - Write sampler descriptors to memory

## C Specification

To write sampler descriptors to memory, call:

    // Provided by VK_EXT_descriptor_heap
    VkResult vkWriteSamplerDescriptorsEXT(
        VkDevice                                    device,
        uint32_t                                    samplerCount,
        const VkSamplerCreateInfo*                  pSamplers,
        const VkHostAddressRangeEXT*                pDescriptors);

## Parameters

- `device` is the logical device that the descriptors are for.

- `samplerCount` is the number of elements in `pSamplers` and `pDescriptors`.

- `pSamplers` is a pointer to an array of VkSamplerCreateInfo structures defining properties of the sampler descriptors that will be written.

- `pDescriptors` is a pointer to an array of VkHostAddressRangeEXT structures defining the host address ranges that will be written to for each descriptor.

## Description

Each descriptor will be written to `pDescriptors`[i].`address` where i is the index of its create info in `pSamplers`.

Descriptors written using a fully identical VkSamplerCreateInfo structure on the same VkDevice will always return the same bit pattern. If the descriptorHeapCaptureReplay feature is enabled, descriptors written using a fully identical VkSamplerCreateInfo structure on a VkDevice created from the same VkPhysicalDevice with identical parameters will always return the same bit pattern.

Note | YCBCR samplers must be embedded in a shader by using VkShaderDescriptorSetAndBindingMappingInfoEXT, they cannot be specified here.

Valid Usage

- VUID-vkWriteSamplerDescriptorsEXT-descriptorHeap-11202
  The `descriptorHeap` feature must be enabled

- VUID-vkWriteSamplerDescriptorsEXT-size-11203
  The `size` member of each element of `pDescriptors` must be greater than or equal to the value returned by vkGetPhysicalDeviceDescriptorSizeEXT with a `descriptorType` equal to VK_DESCRIPTOR_TYPE_SAMPLER

- VUID-vkWriteSamplerDescriptorsEXT-pSamplers-11204
  Elements of `pSamplers` must not include VkSamplerYcbcrConversionInfo structures in their `pNext` chains

- VUID-vkWriteSamplerDescriptorsEXT-borderColor-11444
  If the `borderColor` of any element of `pSamplers` is VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT, VkSamplerCustomBorderColorIndexCreateInfoEXT must be included in the `pNext` chain of that element

- VUID-vkWriteSamplerDescriptorsEXT-borderColor-11205
  If the `borderColor` of any element of `pSamplers` is VK_BORDER_COLOR_FLOAT_CUSTOM_EXT or VK_BORDER_COLOR_INT_CUSTOM_EXT, VkSamplerCustomBorderColorIndexCreateInfoEXT::`index` must be a value less than `maxCustomBorderColorSamplers`

- VUID-vkWriteSamplerDescriptorsEXT-pNext-11400
  If there is a VkDebugUtilsObjectNameInfoEXT structure in the `pNext` chain of any element of `pSamplers`, its `objectType` must be VK_OBJECT_TYPE_UNKNOWN

Valid Usage (Implicit)

- VUID-vkWriteSamplerDescriptorsEXT-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkWriteSamplerDescriptorsEXT-pSamplers-parameter
  `pSamplers` must be a valid pointer to an array of `samplerCount` valid VkSamplerCreateInfo structures

- VUID-vkWriteSamplerDescriptorsEXT-pDescriptors-parameter
  `pDescriptors` must be a valid pointer to an array of `samplerCount` valid VkHostAddressRangeEXT structures

- VUID-vkWriteSamplerDescriptorsEXT-samplerCount-arraylength
  `samplerCount` must be greater than `0`

Return Codes

On success, this command returns

  - VK_SUCCESS

On failure, this command returns

  - VK_ERROR_OUT_OF_DEVICE_MEMORY

  - VK_ERROR_OUT_OF_HOST_MEMORY

  - VK_ERROR_UNKNOWN

  - VK_ERROR_VALIDATION_FAILED

## See Also

VK_EXT_descriptor_heap, VkDevice, VkHostAddressRangeEXT, VkSamplerCreateInfo

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

SPDX-License-Identifier: CC-BY-4.0