# VkSubpassDescriptionDepthStencilResolve(3) Manual Page

## Name

VkSubpassDescriptionDepthStencilResolve - Structure specifying depth/stencil resolve operations for a subpass

## C Specification

If the `pNext` list of `VkSubpassDescription2` includes a `VkSubpassDescriptionDepthStencilResolve` structure, then that structure describes multisample resolve operations for the depth/stencil attachment in a subpass.

The `VkSubpassDescriptionDepthStencilResolve` structure is defined as:

    typedef struct VkSubpassDescriptionDepthStencilResolve {
        VkStructureType                  sType;
        const void*                      pNext;
        VkResolveModeFlagBits            depthResolveMode;
        VkResolveModeFlagBits            stencilResolveMode;
        const VkAttachmentReference2*    pDepthStencilResolveAttachment;
    } VkSubpassDescriptionDepthStencilResolve;

or the equivalent

    typedef VkSubpassDescriptionDepthStencilResolve VkSubpassDescriptionDepthStencilResolveKHR;

## Members

- `sType` is the type of this structure.

- `pNext` is `NULL` or a pointer to an extension-specific structure.

- `depthResolveMode` is a bitmask of VkResolveModeFlagBits describing the depth resolve mode.

- `stencilResolveMode` is a bitmask of VkResolveModeFlagBits describing the stencil resolve mode.

- `pDepthStencilResolveAttachment` is an optional VkAttachmentReference structure defining the depth/stencil resolve attachment for this subpass and its layout.

## Description

Valid Usage

- If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value `VK_ATTACHMENT_UNUSED`, `pDepthStencilAttachment` must not have the value `VK_ATTACHMENT_UNUSED`

- If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value `VK_ATTACHMENT_UNUSED`, `depthResolveMode` and `stencilResolveMode` must not both be `VK_RESOLVE_MODE_NONE`

- If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value `VK_ATTACHMENT_UNUSED`, `pDepthStencilAttachment` must not have a sample count of `VK_SAMPLE_COUNT_1_BIT`

- If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value `VK_ATTACHMENT_UNUSED`, `pDepthStencilResolveAttachment` must have a sample count of `VK_SAMPLE_COUNT_1_BIT`

- If `pDepthStencilResolveAttachment` is not `NULL` and does not have the value `VK_ATTACHMENT_UNUSED` then it must have a format whose features contain `VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT`

- If the VkFormat of `pDepthStencilResolveAttachment` has a depth component, then the VkFormat of `pDepthStencilAttachment` must have a depth component with the same number of bits and numerical type

- If the VkFormat of `pDepthStencilResolveAttachment` has a stencil component, then the VkFormat of `pDepthStencilAttachment` must have a stencil component with the same number of bits and numerical type

- The value of `depthResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedDepthResolveModes` or `VK_RESOLVE_MODE_NONE`

- The value of `stencilResolveMode` must be one of the bits set in VkPhysicalDeviceDepthStencilResolveProperties::`supportedStencilResolveModes` or `VK_RESOLVE_MODE_NONE`

- If the VkFormat of `pDepthStencilResolveAttachment` has both depth and stencil components, VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` is `VK_FALSE`, and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` is `VK_FALSE`, then the values of `depthResolveMode` and `stencilResolveMode` must be identical

- If the VkFormat of `pDepthStencilResolveAttachment` has both depth and stencil components, VkPhysicalDeviceDepthStencilResolveProperties::`independentResolve` is `VK_FALSE` and VkPhysicalDeviceDepthStencilResolveProperties::`independentResolveNone` is `VK_TRUE`, then the values of `depthResolveMode` and `stencilResolveMode` must be identical or one of them must be `VK_RESOLVE_MODE_NONE`

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE`

- `depthResolveMode` must be a valid VkResolveModeFlagBits value

- `stencilResolveMode` must be a valid VkResolveModeFlagBits value

- If `pDepthStencilResolveAttachment` is not `NULL`, `pDepthStencilResolveAttachment` must be a valid pointer to a valid VkAttachmentReference2 structure

## See Also

VkAttachmentReference2, VkResolveModeFlagBits, 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 (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.