VKCMDSETDEPTHBOUNDS(3)

NAME
vkCmdSetDepthBounds - Set the depth bounds test values for a command buffer.

C SPECIFICATION

    void vkCmdSetDepthBounds(
        VkCommandBuffer                             commandBuffer,
        float                                       minDepthBounds,
        float                                       maxDepthBounds);

PARAMETERS

commandBuffer
    The command buffer into which to insert the command.

minDepthBounds
    The minimum value for the depth bounds test range.

maxDepthBounds
    The maximum value for the depth bounds test range.

DESCRIPTION

vkCmdSetDepthBounds sets the minimum and maximum values for the depth bounds test for the command buffer specified in commandBuffer. minDepthBounds and maxDepthBounds specify the minimum and maximum values for the depth bounds test respectively. A the value stored in the current depth attachment at a fragment’s location lies between minDepthBounds and maxDepthBounds, then the depth bounds test passes, otherwise the test fails and the fragment’s coverage bit is cleared.

The graphics pipeline bound to commandBuffer must have the VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled. When a pipeline that does not have VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled is first bound, the values of the depth bias parameters are taken from the pipeline and attempts to change them using vkCmdSetBlendConstants results in undefined behavior. When a pipeline does have VK_DYNAMIC_STATE_DEPTH_BOUNDS dynamic state enabled is first bound, the current values of the depth bias parameters become undefined and must be set using a call to vkCmdSetDepthBias.

If the depth bounds test for the current pipeline is not enabled, then it is as if the depth bounds test always passes and the values of minDepthBounds and maxDepthBounds are ignored.

The value of maxDepthBounds must be greater than or equal to the value of minDepthBounds.

VALID USAGE

    • commandBuffer must be a valid VkCommandBuffer handle

    • commandBuffer must be in the recording state

    • The VkCommandPool that commandBuffer was allocated from must support graphics operations

    • minDepthBounds must be between 0.0 and 1.0, inclusive

    • maxDepthBounds must be between 0.0 and 1.0, inclusive

HOST SYNCHRONIZATION

    • Host access to commandBuffer must be externally synchronized

COMMAND PROPERTIES
Command Buffer Levels | Render Pass Scope | Supported Queue Types
Primary Secondary | Both | GRAPHICS

SEE ALSO

vkCmdSetDepthBias, vkCreateGraphicsPipelines, VkPipelineDynamicStateCreateInfo

COPYRIGHT

Copyright © 2014-2016 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

AUTHOR

Khronos Group
    Author.