VkAttachmentDescriptionStencilLayout(3)

# VkAttachmentDescriptionStencilLayout(3) Manual Page

## Name

VkAttachmentDescriptionStencilLayout - Structure specifying an attachment description

## C Specification

The `VkAttachmentDescriptionStencilLayout` structure is defined as:

Warning | This functionality is superseded by Vulkan Version 1.4. See Legacy Functionality for more information.

    // Provided by VK_VERSION_1_2
    typedef struct VkAttachmentDescriptionStencilLayout {
        VkStructureType    sType;
        void*              pNext;
        VkImageLayout      stencilInitialLayout;
        VkImageLayout      stencilFinalLayout;
    } VkAttachmentDescriptionStencilLayout;

    // Provided by VK_KHR_separate_depth_stencil_layouts
    // Equivalent to VkAttachmentDescriptionStencilLayout
    typedef VkAttachmentDescriptionStencilLayout VkAttachmentDescriptionStencilLayoutKHR;

## Members

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

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

- `stencilInitialLayout` is the layout the stencil aspect of the attachment image subresource will be in when a render pass instance begins.

- `stencilFinalLayout` is the layout the stencil aspect of the attachment image subresource will be transitioned to when a render pass instance ends.

## Description

Valid Usage

- VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-03308
  `stencilInitialLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-03309
  `stencilFinalLayout` must not be VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, or VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL

- VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-03310
  `stencilFinalLayout` must not be VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT or VK_IMAGE_LAYOUT_PREINITIALIZED

Valid Usage (Implicit)

- VUID-VkAttachmentDescriptionStencilLayout-sType-sType
  `sType` must be VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT

- VUID-VkAttachmentDescriptionStencilLayout-stencilInitialLayout-parameter
  `stencilInitialLayout` must be a valid VkImageLayout value

- VUID-VkAttachmentDescriptionStencilLayout-stencilFinalLayout-parameter
  `stencilFinalLayout` must be a valid VkImageLayout value

Structure Chaining

Extends the structure

  - VkAttachmentDescription2

## See Also

VK_KHR_separate_depth_stencil_layouts, VK_VERSION_1_2, VkImageLayout, 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