# VkPipelineDepthStencilStateCreateInfo(3) Manual Page

## Name

VkPipelineDepthStencilStateCreateInfo - Structure specifying parameters of a newly created pipeline depth stencil state

## C Specification

The `VkPipelineDepthStencilStateCreateInfo` structure is defined as:

    typedef struct VkPipelineDepthStencilStateCreateInfo {
        VkStructureType                           sType;
        const void*                               pNext;
        VkPipelineDepthStencilStateCreateFlags    flags;
        VkBool32                                  depthTestEnable;
        VkBool32                                  depthWriteEnable;
        VkCompareOp                               depthCompareOp;
        VkBool32                                  depthBoundsTestEnable;
        VkBool32                                  stencilTestEnable;
        VkStencilOpState                          front;
        VkStencilOpState                          back;
        float                                     minDepthBounds;
        float                                     maxDepthBounds;
    } VkPipelineDepthStencilStateCreateInfo;

## Members

- `sType` is the type of this structure.

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

- `flags` is reserved for future use.

- `depthTestEnable` controls whether depth testing is enabled.

- `depthWriteEnable` controls whether depth writes are enabled when `depthTestEnable` is `VK_TRUE`. Depth writes are always disabled when `depthTestEnable` is `VK_FALSE`.

- `depthCompareOp` is the comparison operator used in the depth test.

- `depthBoundsTestEnable` controls whether depth bounds testing is enabled.

- `stencilTestEnable` controls whether stencil testing is enabled.

- `front` and `back` control the parameters of the stencil test.

- `minDepthBounds` and `maxDepthBounds` define the range of values used in the depth bounds test.

## Description

Valid Usage

- If the depth bounds testing feature is not enabled, `depthBoundsTestEnable` must be `VK_FALSE`

Valid Usage (Implicit)

- `sType` must be `VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO`

- `pNext` must be `NULL`

- `flags` must be `0`

- `depthCompareOp` must be a valid VkCompareOp value

- `front` must be a valid VkStencilOpState structure

- `back` must be a valid VkStencilOpState structure

## See Also

`VkBool32`, VkCompareOp, VkGraphicsPipelineCreateInfo, VkPipelineDepthStencilStateCreateFlags, VkStencilOpState, 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.