VkImageStencilUsage2CreateInfoKHR(3)

# VkImageStencilUsage2CreateInfoKHR(3) Manual Page

## Name

VkImageStencilUsage2CreateInfoKHR - Specify separate 64-bit usage flags for the stencil aspect of a depth-stencil image

## C Specification

The `VkImageStencilUsage2CreateInfoKHR` structure is defined as:

    // Provided by VK_KHR_extended_flags with VK_VERSION_1_2 or VK_EXT_separate_stencil_usage
    typedef struct VkImageStencilUsage2CreateInfoKHR {
        VkStructureType          sType;
        void*                    pNext;
        VkImageUsageFlags2KHR    stencilUsage;
    } VkImageStencilUsage2CreateInfoKHR;

## Members

- `sType` is a VkStructureType value identifying this structure.

- `pNext` is `NULL` or a pointer to a structure extending this structure.

- `stencilUsage` is a bitmask of VkImageUsageFlagBits2KHR describing the intended usage of the stencil aspect of the image.

## Description

If the `pNext` chain of VkImageCreateInfo includes a `VkImageStencilUsage2CreateInfoKHR` structure, then that structure includes the usage flags specific to the stencil aspect of the image for an image with a depth-stencil format.

This structure specifies image usages which only apply to the stencil aspect of a depth/stencil format image. When this structure is included in the `pNext` chain of VkImageCreateInfo, the stencil aspect of the image must only be used as specified by `stencilUsage`. Use of other aspects of an image are unaffected by this structure.

This structure can also be included in the `pNext` chain of VkPhysicalDeviceImageFormatInfo2 to query additional capabilities specific to image creation parameter combinations including a separate set of usage flags for the stencil aspect of the image using vkGetPhysicalDeviceImageFormatProperties2. When this structure is not included in the `pNext` chain of `VkPhysicalDeviceImageFormatInfo2` then the implicit value of `stencilUsage` matches that of `VkPhysicalDeviceImageFormatInfo2`::`usage`.

Valid Usage

- VUID-VkImageStencilUsage2CreateInfoKHR-stencilUsage-12443
  If `stencilUsage` includes VK_IMAGE_USAGE_2_TRANSIENT_ATTACHMENT_BIT_KHR, it must not include bits other than VK_IMAGE_USAGE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR or VK_IMAGE_USAGE_2_INPUT_ATTACHMENT_BIT_KHR

Valid Usage (Implicit)

- VUID-VkImageStencilUsage2CreateInfoKHR-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_2_CREATE_INFO_KHR

- VUID-VkImageStencilUsage2CreateInfoKHR-stencilUsage-parameter
  `stencilUsage` must be a valid combination of VkImageUsageFlagBits2KHR values

- VUID-VkImageStencilUsage2CreateInfoKHR-stencilUsage-requiredbitmask
  `stencilUsage` must not be `0`

Structure Chaining

Extends the structures

  - VkImageCreateInfo

  - VkPhysicalDeviceImageFormatInfo2

## See Also

VK_EXT_separate_stencil_usage, VK_KHR_extended_flags, VK_VERSION_1_2, VkImageUsageFlags2KHR, VkStructureType

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