• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    EXT_multiview_tessellation_geometry_shader
4
5Name Strings
6
7    GL_EXT_multiview_tessellation_geometry_shader
8
9Contact
10
11    Robert Menzel, NVIDIA Corporation (rmenzel 'at' nvidia.com)
12
13Contributors
14
15    Pat Brown, NVIDIA Corporation
16    Jan-Harald Fredriksen, Arm Limited
17    James Helferty, NVIDIA Corporation
18    Kedarnath Thangudu, NVIDIA Corporation
19
20Status
21
22    Complete.
23
24Version
25
26    Last Modified Date:  May 13, 2019
27    Author Revision: 1
28
29Number
30
31    OpenGL Extension #538
32    OpenGL ES Extension #319
33
34Dependencies
35
36    OpenGL 4.0 or OpenGL ES 3.2 are required.
37
38    This extension is written against the OpenGL 4.6 specification
39    (Core Profile) (February 2, 2019) and OpenGL ES 3.2 specification
40    (February 2, 2019).
41
42    This extension is written against the OpenGL ES Shading Language 3.20.05
43    specification and OpenGL Shading Language 4.60.6 specification.
44
45    This extension interacts with OVR_multiview2.
46
47    OVR_multiview is required.
48
49Overview
50
51    OVR_multiview introduced multiview rendering to OpenGL and OpenGL ES.
52
53    This extension removes one of the limitations of the OVR_multiview
54    extension by allowing the use of tessellation control, tessellation
55    evaluation, and geometry shaders during multiview rendering.
56    OVR_multiview by itself forbids the use of any of these shader types.
57
58    When using tessellation control, tessellation evaluation, and geometry
59    shaders during multiview rendering, any such shader must use the
60    "num_views" layout qualifier provided by the matching shading language
61    extension to specify a view count. The view count specified in these
62    shaders must match the count specified in the vertex shader. Additionally,
63    the shading language extension allows these shaders to use the
64    gl_ViewID_OVR built-in to handle tessellation or geometry shader processing
65    differently for each view.
66
67    OVR_multiview2 extends OVR_multiview by allowing view-dependent values
68    for any vertex attributes instead of just the position. This new extension
69    does not imply the availability of OVR_multiview2, but if both are available,
70    view-dependent values for any vertex attributes are also allowed in
71    tessellation control, tessellation evaluation, and geometry shaders.
72
73
74New Tokens
75
76    None.
77
78
79New Procedures and Functions
80
81    None.
82
83
84Modifications to Chapter 9 of the OpenGL ES 3.2 Specification as well as
85Chapter 9 of the OpenGL 4.6 Specification (Framebuffers and Framebuffer
86Objects)
87
88    Modify the subsection 9.2.2.2 (Multiview Images) which has been added by
89    OVR_multiview:
90
91    Remove from the list of restrictions ("In this mode there are several
92    restrictions:") the following items:
93
94    "- no tessellation control or evaluation shaders (section 11.1.3.11)
95    - no geometry shader (section 11.1.3.11)"
96
97    effectively allowing the usage of multiview rendering with tessellation and
98    geometry shaders.
99
100    In the same list replace
101        "- in fragment shader the contents of gl_Layer are undefined"
102    with
103        "- reads and writes of gl_Layer by any shaders are undefined".
104
105
106Modifications to Chapter 11 of the OpenGL ES 3.2 Specification as well
107as Chapter 11 of the OpenGL 4.6 Specification (Programmable Vertex Processing)
108
109    Modify section 11.1.3.11 (Validation) by removing the following condition
110    from the list of reasons that may result in an INVALID_OPERATION error
111    being generated by any command that transfers vertices to the GL
112    (added by OVR_multiview) after
113    "Any attachment of the draw framebuffer is multiview (section 9.2.8)
114      and any of the following conditions are true:":
115
116    "- There is an active program for tessellation control, tessellation
117      evaluation, or geometry stages, or".
118
119
120    Modify section 11.1.3.11 (Validation) by adding the following
121    item to the bullet point list of conditions generating an INVALID_OPERATION:
122        "The active program for the vertex, tessellation control, tessellation
123        evaluation, or geometry shader stages contains an executable that declared
124        a multiview view count using the "num_views" layout qualifier, but the
125        active program for another one of these stages includes an executable that
126        declared a different view count or failed to declare any view count."
127
128
129Modifications to The OpenGL ES Shading Language Specification, Version 3.20.05
130and The OpenGL Shading Language Specification, Version 4.60.6:
131
132    Including the following line in a tessellation control, tessellation evaluation,
133    or geometry shader can be used to control the language features described in
134    this extension:
135
136      #extension GL_EXT_multiview_tessellation_geometry_shader : <behavior>
137
138    where <behavior> is as specified in section 3.5.
139
140    A new preprocessor #define is added to the OpenGL ES Shading Language
141    as well as the OpenGL Shading Language for those shaders:
142
143      #define GL_EXT_multiview_tessellation_geometry_shader 1
144
145    In section "Input Layout Qualifiers" a new paragraph was added by OVR_multiview
146    (section 4.3.8.1 in the OpenGL ES Shading Language Specification, version 3.00.04,
147    which moved to section 4.4.1 in version 3.20.05 of the OpenGL ES Shading Language
148    Specification and version 4.60.6 of the OpenGL Shading Language Specification).
149
150    In this new paragraph replace
151        "Vertex shaders also allow the following layout qualifier on 'in' only"
152    with
153        "Vertex, tessellation control, tessellation evaluation and geometry shaders
154        also allow the following layout qualifier on 'in' only".
155
156    In the following paragraph of the same addition by OVR_multiview replace
157        "If multiple vertex shaders attached to a
158        single program object declare num_views, the declarations must be
159        identical; otherwise a link-time error results."
160    with
161        "If multiple shaders of the same type attached to a
162        single program object declare num_views, the declarations must be
163        identical; otherwise a link-time error results.
164
165        If any vertex, tessellation control, tessellation evaluation, or
166        geometry shader in a single program object declares a view count using
167        'num_views', at least one shader of each type present in the program must
168        declare a view count and all such declarations must match. If there is a
169        missing or mismatched view count declaration, a link-time error results."
170
171
172Modifications to Section 7.1 "Built-in Language Variables"
173
174    Replace the following paragraph added by OVR_multiview
175        "Add the following to the list of built-in variables that are intrinsically
176        declared in the vertex and fragment shading languages:
177
178            in mediump uint gl_ViewID_OVR;"
179    with
180        "Add the following to the list of built-in variables that are intrinsically
181        declared in the vertex, tessellation control, tessellation evaluation
182        geometry and fragment shading languages:
183
184            [[ If implemented in the OpenGL ES Shading Language ]]
185            in mediump uint gl_ViewID_OVR;
186
187            [[ If implemented in the OpenGL Shading Language ]]
188            in uint gl_ViewID_OVR;"
189
190
191Interactions with OVR_multiview2:
192
193    If OVR_multiview2 is supported the restriction from OVR_multiview that only
194    gl_Position is allowed to depend on gl_ViewID_OVR is also lifted from the
195    tessellation control, tessellation evaluation, and geometry
196    shaders.
197
198
199Issues
200
201    (1) This extension is based on an OVR extension, why call it EXT?
202
203    While started as a single vendor extension, OVR_multiview and OVR_multiview2
204    are already supported by multiple vendors. This new extension also has the
205    support from multiple vendors to be specified as EXT.
206
207    (2) Should the functions and tokens introduced by OVR_multiview be renamed
208    to have EXT suffixes?
209
210    No. While it is unusual to mix a vendor suffix with EXT in this "family" of
211    extensions, the main goal of this extension is to remove restrictions of
212    OVR_multiview while keeping source code compatibiliy where possible. It is
213    up to a successor of OVR_multiview to change the names (e.g. to revisit
214    the unusual second underscore in gl_ViewID_OVR). The intent of this extension
215    is to change the functionality while "inheriting" the names of the base
216    multiview extension.
217
218    (3) Are separable program objects with multiview allowed?
219
220    Yes. Note that when using separable program objects, each program object
221    can have its own multiview view count declared with the "num_views" layout
222    qualfiier. When using separable programs, a draw-time error will occur if
223    the view count for the programs used by the vertex, tessellation control,
224    tessellation evaluation, and geometry stages don't match.
225
226Revision History
227
228      Rev.    Date    Author    Changes
229      ----  --------  --------  -----------------------------------------
230        1   05/13/19  rmenzel   Initial version.
231