Name | |
EXT_multiview_tessellation_geometry_shader | |
Name Strings | |
GL_EXT_multiview_tessellation_geometry_shader | |
Contact | |
Robert Menzel, NVIDIA Corporation (rmenzel 'at' nvidia.com) | |
Contributors | |
Pat Brown, NVIDIA Corporation | |
Jan-Harald Fredriksen, Arm Limited | |
James Helferty, NVIDIA Corporation | |
Kedarnath Thangudu, NVIDIA Corporation | |
Status | |
Complete. | |
Version | |
Last Modified Date: May 13, 2019 | |
Author Revision: 1 | |
Number | |
OpenGL Extension #538 | |
OpenGL ES Extension #319 | |
Dependencies | |
OpenGL 4.0 or OpenGL ES 3.2 are required. | |
This extension is written against the OpenGL 4.6 specification | |
(Core Profile) (February 2, 2019) and OpenGL ES 3.2 specification | |
(February 2, 2019). | |
This extension is written against the OpenGL ES Shading Language 3.20.05 | |
specification and OpenGL Shading Language 4.60.6 specification. | |
This extension interacts with OVR_multiview2. | |
OVR_multiview is required. | |
Overview | |
OVR_multiview introduced multiview rendering to OpenGL and OpenGL ES. | |
This extension removes one of the limitations of the OVR_multiview | |
extension by allowing the use of tessellation control, tessellation | |
evaluation, and geometry shaders during multiview rendering. | |
OVR_multiview by itself forbids the use of any of these shader types. | |
When using tessellation control, tessellation evaluation, and geometry | |
shaders during multiview rendering, any such shader must use the | |
"num_views" layout qualifier provided by the matching shading language | |
extension to specify a view count. The view count specified in these | |
shaders must match the count specified in the vertex shader. Additionally, | |
the shading language extension allows these shaders to use the | |
gl_ViewID_OVR built-in to handle tessellation or geometry shader processing | |
differently for each view. | |
OVR_multiview2 extends OVR_multiview by allowing view-dependent values | |
for any vertex attributes instead of just the position. This new extension | |
does not imply the availability of OVR_multiview2, but if both are available, | |
view-dependent values for any vertex attributes are also allowed in | |
tessellation control, tessellation evaluation, and geometry shaders. | |
New Tokens | |
None. | |
New Procedures and Functions | |
None. | |
Modifications to Chapter 9 of the OpenGL ES 3.2 Specification as well as | |
Chapter 9 of the OpenGL 4.6 Specification (Framebuffers and Framebuffer | |
Objects) | |
Modify the subsection 9.2.2.2 (Multiview Images) which has been added by | |
OVR_multiview: | |
Remove from the list of restrictions ("In this mode there are several | |
restrictions:") the following items: | |
"- no tessellation control or evaluation shaders (section 11.1.3.11) | |
- no geometry shader (section 11.1.3.11)" | |
effectively allowing the usage of multiview rendering with tessellation and | |
geometry shaders. | |
In the same list replace | |
"- in fragment shader the contents of gl_Layer are undefined" | |
with | |
"- reads and writes of gl_Layer by any shaders are undefined". | |
Modifications to Chapter 11 of the OpenGL ES 3.2 Specification as well | |
as Chapter 11 of the OpenGL 4.6 Specification (Programmable Vertex Processing) | |
Modify section 11.1.3.11 (Validation) by removing the following condition | |
from the list of reasons that may result in an INVALID_OPERATION error | |
being generated by any command that transfers vertices to the GL | |
(added by OVR_multiview) after | |
"Any attachment of the draw framebuffer is multiview (section 9.2.8) | |
and any of the following conditions are true:": | |
"- There is an active program for tessellation control, tessellation | |
evaluation, or geometry stages, or". | |
Modify section 11.1.3.11 (Validation) by adding the following | |
item to the bullet point list of conditions generating an INVALID_OPERATION: | |
"The active program for the vertex, tessellation control, tessellation | |
evaluation, or geometry shader stages contains an executable that declared | |
a multiview view count using the "num_views" layout qualifier, but the | |
active program for another one of these stages includes an executable that | |
declared a different view count or failed to declare any view count." | |
Modifications to The OpenGL ES Shading Language Specification, Version 3.20.05 | |
and The OpenGL Shading Language Specification, Version 4.60.6: | |
Including the following line in a tessellation control, tessellation evaluation, | |
or geometry shader can be used to control the language features described in | |
this extension: | |
#extension GL_EXT_multiview_tessellation_geometry_shader : <behavior> | |
where <behavior> is as specified in section 3.5. | |
A new preprocessor #define is added to the OpenGL ES Shading Language | |
as well as the OpenGL Shading Language for those shaders: | |
#define GL_EXT_multiview_tessellation_geometry_shader 1 | |
In section "Input Layout Qualifiers" a new paragraph was added by OVR_multiview | |
(section 4.3.8.1 in the OpenGL ES Shading Language Specification, version 3.00.04, | |
which moved to section 4.4.1 in version 3.20.05 of the OpenGL ES Shading Language | |
Specification and version 4.60.6 of the OpenGL Shading Language Specification). | |
In this new paragraph replace | |
"Vertex shaders also allow the following layout qualifier on 'in' only" | |
with | |
"Vertex, tessellation control, tessellation evaluation and geometry shaders | |
also allow the following layout qualifier on 'in' only". | |
In the following paragraph of the same addition by OVR_multiview replace | |
"If multiple vertex shaders attached to a | |
single program object declare num_views, the declarations must be | |
identical; otherwise a link-time error results." | |
with | |
"If multiple shaders of the same type attached to a | |
single program object declare num_views, the declarations must be | |
identical; otherwise a link-time error results. | |
If any vertex, tessellation control, tessellation evaluation, or | |
geometry shader in a single program object declares a view count using | |
'num_views', at least one shader of each type present in the program must | |
declare a view count and all such declarations must match. If there is a | |
missing or mismatched view count declaration, a link-time error results." | |
Modifications to Section 7.1 "Built-in Language Variables" | |
Replace the following paragraph added by OVR_multiview | |
"Add the following to the list of built-in variables that are intrinsically | |
declared in the vertex and fragment shading languages: | |
in mediump uint gl_ViewID_OVR;" | |
with | |
"Add the following to the list of built-in variables that are intrinsically | |
declared in the vertex, tessellation control, tessellation evaluation | |
geometry and fragment shading languages: | |
[[ If implemented in the OpenGL ES Shading Language ]] | |
in mediump uint gl_ViewID_OVR; | |
[[ If implemented in the OpenGL Shading Language ]] | |
in uint gl_ViewID_OVR;" | |
Interactions with OVR_multiview2: | |
If OVR_multiview2 is supported the restriction from OVR_multiview that only | |
gl_Position is allowed to depend on gl_ViewID_OVR is also lifted from the | |
tessellation control, tessellation evaluation, and geometry | |
shaders. | |
Issues | |
(1) This extension is based on an OVR extension, why call it EXT? | |
While started as a single vendor extension, OVR_multiview and OVR_multiview2 | |
are already supported by multiple vendors. This new extension also has the | |
support from multiple vendors to be specified as EXT. | |
(2) Should the functions and tokens introduced by OVR_multiview be renamed | |
to have EXT suffixes? | |
No. While it is unusual to mix a vendor suffix with EXT in this "family" of | |
extensions, the main goal of this extension is to remove restrictions of | |
OVR_multiview while keeping source code compatibiliy where possible. It is | |
up to a successor of OVR_multiview to change the names (e.g. to revisit | |
the unusual second underscore in gl_ViewID_OVR). The intent of this extension | |
is to change the functionality while "inheriting" the names of the base | |
multiview extension. | |
(3) Are separable program objects with multiview allowed? | |
Yes. Note that when using separable program objects, each program object | |
can have its own multiview view count declared with the "num_views" layout | |
qualfiier. When using separable programs, a draw-time error will occur if | |
the view count for the programs used by the vertex, tessellation control, | |
tessellation evaluation, and geometry stages don't match. | |
Revision History | |
Rev. Date Author Changes | |
---- -------- -------- ----------------------------------------- | |
1 05/13/19 rmenzel Initial version. |