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;
sType
is a VkStructureType value identifying this structure.pNext
isNULL
or a pointer to a structure extending this structure.flags
is a bitmask of VkPipelineDepthStencilStateCreateFlagBits specifying additional depth/stencil state information.depthTestEnable
controls whether depth testing is enabled.depthWriteEnable
controls whether depth writes are enabled whendepthTestEnable
isVK_TRUE
. Depth writes are always disabled whendepthTestEnable
isVK_FALSE
.depthCompareOp
is a VkCompareOp value specifying the comparison operator to use in the Depth Comparison step of the depth test.depthBoundsTestEnable
controls whether depth bounds testing is enabled.stencilTestEnable
controls whether stencil testing is enabled.front
andback
are VkStencilOpState values controlling the corresponding parameters of the stencil test.minDepthBounds
is the minimum depth bound used in the depth bounds test.maxDepthBounds
is 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