VkPipelineDepthStencilStateCreateInfo
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;
sTypeis a VkStructureType value identifying this structure.pNextisNULLor a pointer to a structure extending this structure.flagsis a bitmask of VkPipelineDepthStencilStateCreateFlagBits specifying additional depth/stencil state information.depthTestEnablecontrols whether depth testing is enabled.depthWriteEnablecontrols whether depth writes are enabled whendepthTestEnableisVK_TRUE. Depth writes are always disabled whendepthTestEnableisVK_FALSE.depthCompareOpis a VkCompareOp value specifying the comparison operator to use in the Depth Comparison step of the depth test.depthBoundsTestEnablecontrols whether depth bounds testing is enabled.stencilTestEnablecontrols whether stencil testing is enabled.frontandbackare VkStencilOpState values controlling the corresponding parameters of the stencil test.minDepthBoundsis the minimum depth bound used in the depth bounds test.maxDepthBoundsis the maximum depth bound used in the depth bounds test.
Valid Usage
VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598
If the depthBounds feature is not
enabled, depthBoundsTestEnable must be VK_FALSE
VUID-VkPipelineDepthStencilStateCreateInfo-separateStencilMaskRef-04453
If the VK_KHR_portability_subset extension is enabled, and
VkPhysicalDevicePortabilitySubsetFeaturesKHR::separateStencilMaskRef
is VK_FALSE, and the value of
VkPipelineDepthStencilStateCreateInfo::stencilTestEnable is
VK_TRUE, and the value of
VkPipelineRasterizationStateCreateInfo::cullMode is
VK_CULL_MODE_NONE, the value of reference in each of the
VkStencilOpState structs in front and back must be
the same
VUID-VkPipelineDepthStencilStateCreateInfo-rasterizationOrderDepthAttachmentAccess-06463
If the rasterizationOrderDepthAttachmentAccess feature is not enabled,
flags must not include
VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_DEPTH_ACCESS_BIT_EXT
VUID-VkPipelineDepthStencilStateCreateInfo-rasterizationOrderStencilAttachmentAccess-06464
If the rasterizationOrderStencilAttachmentAccess feature is not
enabled, flags must not include
VK_PIPELINE_DEPTH_STENCIL_STATE_CREATE_RASTERIZATION_ORDER_ATTACHMENT_STENCIL_ACCESS_BIT_EXT
Valid Usage (Implicit)
VUID-VkPipelineDepthStencilStateCreateInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
VUID-VkPipelineDepthStencilStateCreateInfo-pNext-pNext
pNext must be NULL
VUID-VkPipelineDepthStencilStateCreateInfo-flags-parameter
flags must be a valid combination of VkPipelineDepthStencilStateCreateFlagBits values
VUID-VkPipelineDepthStencilStateCreateInfo-depthCompareOp-parameter
depthCompareOp must be a valid VkCompareOp value
VUID-VkPipelineDepthStencilStateCreateInfo-front-parameter
front must be a valid VkStencilOpState structure
VUID-VkPipelineDepthStencilStateCreateInfo-back-parameter
back must be a valid VkStencilOpState structure