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
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
On failure, this command returns

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

SPDX-License-Identifier: CC-BY-4.0