Function Prototype

vkWriteSamplerDescriptorsEXT

Write sampler descriptors to memory

To write sampler descriptors to memory, call:

VkResult vkWriteSamplerDescriptorsEXT(
    VkDevice                                            device,
    uint32_t                                            samplerCount,
    const VkSamplerCreateInfo*       pSamplers,
    const VkHostAddressRangeEXT*     pDescriptors);
  • 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.

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.

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

Valid Usage

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-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