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

Description

Note

If format is a depth/stencil format, the aspect is determined by the value of VkSamplerCreateInfo::borderColor. If VkSamplerCreateInfo::borderColor is VK_BORDER_COLOR_FLOAT_CUSTOM_EXT, the depth aspect is considered. If VkSamplerCreateInfo::borderColor is VK_BORDER_COLOR_INT_CUSTOM_EXT, the stencil aspect is considered.

If format is VK_FORMAT_UNDEFINED, the VkSamplerCreateInfo::borderColor is VK_BORDER_COLOR_INT_CUSTOM_EXT, and the sampler is used with an image with a stencil format, then the implementation must source the custom border color from either the first or second components of VkSamplerCreateInfo::borderColor and should source it from the first component.

Valid Usage
Valid Usage (Implicit)

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