C Specification

In addition to the predefined border color values, applications can provide a custom border color value by including the VkSamplerCustomBorderColorCreateInfoEXT structure in the VkSamplerCreateInfo::pNext chain.

The VkSamplerCustomBorderColorCreateInfoEXT structure is defined as:

// Provided by VK_EXT_custom_border_color
typedef struct VkSamplerCustomBorderColorCreateInfoEXT {
    VkStructureType      sType;
    const void*          pNext;
    VkClearColorValue    customBorderColor;
    VkFormat             format;
} VkSamplerCustomBorderColorCreateInfoEXT;

Members

  • sType is the type of this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • customBorderColor is a VkClearColorValue representing the desired custom sampler border color.

  • format is a VkFormat representing the format of the sampled image view(s). This field may be VK_FORMAT_UNDEFINED if the customBorderColorWithoutFormat feature is enabled.

Description

Valid Usage
  • VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-04013
    If provided format is not VK_FORMAT_UNDEFINED then the VkSamplerCreateInfo::borderColor type must match the sampled type of the provided format, as shown in the SPIR-V Sampled Type column of the https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#formats-numericformat table

  • VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-04014
    If the customBorderColorWithoutFormat feature is not enabled then format must not be VK_FORMAT_UNDEFINED

  • VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-04015
    If the sampler is used to sample an image view of VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_B5G6R5_UNORM_PACK16, or VK_FORMAT_B5G5R5A1_UNORM_PACK16 format then format must not be VK_FORMAT_UNDEFINED

Valid Usage (Implicit)
  • VUID-VkSamplerCustomBorderColorCreateInfoEXT-sType-sType
    sType must be VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT

  • VUID-VkSamplerCustomBorderColorCreateInfoEXT-format-parameter
    format must be a valid VkFormat value

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 (c) 2014-2020 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0