vkCmdSetDepthTestEnable(3)
C Specification
Todynamically enable or disable the depthtest, call:
// Provided by VK_VERSION_1_3void vkCmdSetDepthTestEnable( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable);// Provided by VK_EXT_extended_dynamic_state, VK_EXT_shader_object// Equivalent to vkCmdSetDepthTestEnablevoid vkCmdSetDepthTestEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthTestEnable);Parameters
commandBufferis the command buffer into which the command will berecorded.depthTestEnablespecifies if the depth test is enabled.
Description
This command sets the depth test enable for subsequent drawing commandswhen drawing usingshader objects, orwhen the graphics pipeline is created withVK_DYNAMIC_STATE_DEPTH_TEST_ENABLE set inVkPipelineDynamicStateCreateInfo::pDynamicStates.Otherwise, this state is specified by theVkPipelineDepthStencilStateCreateInfo::depthTestEnable valueused to create the currently active pipeline.
VUID-vkCmdSetDepthTestEnable-None-08971
At least one of the followingmust be true:the
extendedDynamicStatefeature is enabledthe
shaderObjectfeature is enabledthe value ofVkApplicationInfo::
apiVersionused to createtheVkInstance parent ofcommandBufferis greater than orequal to Version 1.3
VUID-vkCmdSetDepthTestEnable-commandBuffer-parameter
commandBuffermust be a validVkCommandBuffer handleVUID-vkCmdSetDepthTestEnable-commandBuffer-recording
commandBuffermust be in therecording stateVUID-vkCmdSetDepthTestEnable-commandBuffer-cmdpool
TheVkCommandPoolthatcommandBufferwas allocated frommust supportVK_QUEUE_GRAPHICS_BIT operationsVUID-vkCmdSetDepthTestEnable-videocoding
This commandmust only be called outside of a video coding scope
Host access to
commandBuffermust be externally synchronizedHost access to the
VkCommandPoolthatcommandBufferwas allocated frommust be externally synchronized
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
Primary | Both | Outside | VK_QUEUE_GRAPHICS_BIT | State |
vkCmdSetDepthTestEnable is not affected byconditional rendering
Document Notes
For more information, see theVulkan Specification.
This page is extracted from the Vulkan Specification.Fixes and changes should be made to the Specification, not directly.