// Copyright 2017-2021 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_EXT_depth_range_unrestricted.txt[]

=== Other Extension Metadata

*Last Modified Date*::
    2017-06-22
*Contributors*::
    - Daniel Koch, NVIDIA
    - Jeff Bolz, NVIDIA

=== Description

This extension removes the slink:VkViewport pname:minDepth and
pname:maxDepth restrictions that the values must be between `0.0` and `1.0`,
inclusive.
It also removes the same restriction on
slink:VkPipelineDepthStencilStateCreateInfo pname:minDepthBounds and
pname:maxDepthBounds.
Finally it removes the restriction on the pname:depth value in
slink:VkClearDepthStencilValue.

include::{generated}/interfaces/VK_EXT_depth_range_unrestricted.txt[]

=== Issues

1) How do slink:VkViewport pname:minDepth and pname:maxDepth values outside
of the `0.0` to `1.0` range interact with
<<vertexpostproc-clipping,Primitive Clipping>>?

*RESOLVED*: The behavior described in <<vertexpostproc-clipping,Primitive
Clipping>> still applies.
If depth clamping is disabled the depth values are still clipped to [eq]#0
{leq} z~c~ {leq} w~c~# before the viewport transform.
If depth clamping is enabled the above equation is ignored and the depth
values are instead clamped to the slink:VkViewport pname:minDepth and
pname:maxDepth values, which in the case of this extension can be outside of
the `0.0` to `1.0` range.

2) What happens if a resulting depth fragment is outside of the `0.0` to
`1.0` range and the depth buffer is fixed-point rather than floating-point?

*RESOLVED*: The supported range of a fixed-point depth buffer is `0.0` to
`1.0` and depth fragments are clamped to this range.

=== Version History

  * Revision 1, 2017-06-22 (Piers Daniell)
    - Internal revisions
