• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2021 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_EXT_depth_clip_control.txt[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2021-11-09
11*Contributors*::
12  - Spencer Fricke, Samsung Electronics
13  - Shahbaz Youssefi, Google
14  - Ralph Potter, Samsung Electronics
15
16=== Description
17
18This extension allows the application to use the OpenGL depth range in NDC,
19i.e. with depth in range [eq]#[-1, 1]#, as opposed to Vulkan's default of
20[eq]#[0, 1]#.
21The purpose of this extension is to allow efficient layering of OpenGL over
22Vulkan, by avoiding emulation in the pre-rasterization shader stages.
23This emulation, which effectively duplicates gl_Position but with a
24different depth value, costs ALU and consumes shader output components that
25the implementation may not have to spare to meet OpenGL minimum
26requirements.
27
28include::{generated}/interfaces/VK_EXT_depth_clip_control.txt[]
29
30=== Version History
31
32  * Revision 0, 2020-10-01 (Spencer Fricke)
33    - Internal revisions
34
35  * Revision 1, 2020-11-26 (Shahbaz Youssefi)
36    - Language fixes
37
38=== Issues
39
401) Should this extension include an origin control option to match
41GL_LOWER_LEFT found in ARB_clip_control?
42
43*RESOLVED*: Yes.
44The fix for porting over the origin is a simple y-axis flip.
45The depth clip control is a much harder problem to solve than what this
46extension is aimed to solve.
47Adding an equivalent to GL_LOWER_LEFT would require more testing.
48
492) Should this pipeline state be dynamic?
50
51*RESOLVED*: Yes.
52The purpose of this extension is to emulate the OpenGL depth range, which is
53expected to be globally fixed (in case of OpenGL ES) or very infrequently
54changed (with `glClipControl` in OpenGL).
55
563) Should the control provided in this extension be an enum that could be
57extended in the future?
58
59*RESOLVED*: Yes.
60It is highly unlikely that the depth range is changed to anything other than
61[eq]#[0, 1]# in the future.
62Should that happen a new extension will be required to extend such an enum,
63and that extension might as well add a new struct to chain to
64slink:VkPipelineViewportStateCreateInfo::pname:pNext instead.
65