Movatterモバイル変換


[0]ホーム

URL:


Vulkan API Reference Pageslatest

vkCmdSetDepthTestEnable(3)

Name

vkCmdSetDepthTestEnable - Set depth test enable dynamically for a command buffer

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

  • commandBuffer is the command buffer into which the command will berecorded.

  • depthTestEnable specifies 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.

Valid Usage
Valid Usage (Implicit)
  • VUID-vkCmdSetDepthTestEnable-commandBuffer-parameter
    commandBuffermust be a validVkCommandBuffer handle

  • VUID-vkCmdSetDepthTestEnable-commandBuffer-recording
    commandBuffermust be in therecording state

  • VUID-vkCmdSetDepthTestEnable-commandBuffer-cmdpool
    TheVkCommandPool thatcommandBuffer was allocated frommust supportVK_QUEUE_GRAPHICS_BIT operations

  • VUID-vkCmdSetDepthTestEnable-videocoding
    This commandmust only be called outside of a video coding scope

Host Synchronization
  • Host access tocommandBuffermust be externally synchronized

  • Host access to theVkCommandPool thatcommandBuffer was allocated frommust be externally synchronized

Command Properties
Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type

Primary
Secondary

Both

Outside

VK_QUEUE_GRAPHICS_BIT

State

Conditional Rendering

vkCmdSetDepthTestEnable is not affected byconditional rendering

See Also

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.


[8]ページ先頭

©2009-2026 Movatter.jp