15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_gpu_shader5
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_gpu_shader5
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Barthold Lichtenbelt, NVIDIA
165bd8deadSopenharmony_ci    Chris Dodd, NVIDIA
175bd8deadSopenharmony_ci    Eric Werness, NVIDIA
185bd8deadSopenharmony_ci    Greg Roth, NVIDIA
195bd8deadSopenharmony_ci    Jeff Bolz, NVIDIA
205bd8deadSopenharmony_ci    Piers Daniell, NVIDIA
215bd8deadSopenharmony_ci    Daniel Rakos, AMD
225bd8deadSopenharmony_ci    Mathias Heyer, NVIDIA
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ciStatus
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ci    Shipping.
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ciVersion
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    Last Modified Date:         03/07/2017
315bd8deadSopenharmony_ci    NVIDIA Revision:            11
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciNumber
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    OpenGL Extension #389
365bd8deadSopenharmony_ci    OpenGL ES Extension #260
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ciDependencies
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    This extension is written against the OpenGL 3.2 (Compatibility Profile)
415bd8deadSopenharmony_ci    Specification.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    This extension is written against version 1.50 (revision 09) of the OpenGL
445bd8deadSopenharmony_ci    Shading Language Specification.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    If implemented in OpenGL, OpenGL 3.2 and GLSL 1.50 are required.
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    If implemented in OpenGL, ARB_gpu_shader5 is required.
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    This extension interacts with ARB_gpu_shader5.
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ci    This extension interacts with ARB_gpu_shader_fp64.
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    This extension interacts with ARB_tessellation_shader.
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    This extension interacts with NV_shader_buffer_load.
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci    This extension interacts with EXT_direct_state_access.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    This extension interacts with EXT_vertex_attrib_64bit and
615bd8deadSopenharmony_ci    NV_vertex_attrib_integer_64bit.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    This extension interacts with OpenGL ES 3.1 (dated October 29th 2014).
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    This extension interacts with OpenGL ES Shading Language 3.1 (revision 3).
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    If implemented in OpenGL ES, OpenGL ES 3.1 and GLSL ES 3.10 are required.
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci    If implemented in OpenGL ES, OES/EXT_gpu_shader5 and EXT_shader_implicit-
705bd8deadSopenharmony_ci    _conversions are required.
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci    This extension interacts with OES/EXT_tessellation_shader
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ci    This extension interacts with OES/EXT_geometry_shader
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ciOverview
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ci    This extension provides a set of new features to the OpenGL Shading
795bd8deadSopenharmony_ci    Language and related APIs to support capabilities of new GPUs.  Shaders
805bd8deadSopenharmony_ci    using the new functionality provided by this extension should enable this
815bd8deadSopenharmony_ci    functionality via the construct
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci      #extension GL_NV_gpu_shader5 : require     (or enable)
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    This extension was developed concurrently with the ARB_gpu_shader5
865bd8deadSopenharmony_ci    extension, and provides a superset of the features provided there.  The
875bd8deadSopenharmony_ci    features common to both extensions are documented in the ARB_gpu_shader5
885bd8deadSopenharmony_ci    specification; this document describes only the addition language features
895bd8deadSopenharmony_ci    not available via ARB_gpu_shader5.  A shader that enables this extension
905bd8deadSopenharmony_ci    via an #extension directive also implicitly enables the common
915bd8deadSopenharmony_ci    capabilities provided by ARB_gpu_shader5.
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    In addition to the capabilities of ARB_gpu_shader5, this extension
945bd8deadSopenharmony_ci    provides a variety of new features for all shader types, including:
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci      * support for a full set of 8-, 16-, 32-, and 64-bit scalar and vector
975bd8deadSopenharmony_ci        data types, including uniform API, uniform buffer object, and shader
985bd8deadSopenharmony_ci        input and output support;
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci      * the ability to aggregate samplers into arrays, index these arrays with
1015bd8deadSopenharmony_ci        arbitrary expressions, and not require that non-constant indices be
1025bd8deadSopenharmony_ci        uniform across all shader invocations;
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci      * new built-in functions to pack and unpack 64-bit integer types into a
1055bd8deadSopenharmony_ci        two-component 32-bit integer vector;
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci      * new built-in functions to pack and unpack 32-bit unsigned integer
1085bd8deadSopenharmony_ci        types into a two-component 16-bit floating-point vector;
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci      * new built-in functions to convert double-precision floating-point
1115bd8deadSopenharmony_ci        values to or from their 64-bit integer bit encodings;
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci      * new built-in functions to compute the composite of a set of boolean
1145bd8deadSopenharmony_ci        conditions a group of shader threads;
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci      * vector relational functions supporting comparisons of vectors of 8-,
1175bd8deadSopenharmony_ci        16-, and 64-bit integer types or 16-bit floating-point types; and
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci      * extending texel offset support to allow loading texel offsets from
1205bd8deadSopenharmony_ci        regular integer operands computed at run-time, except for lookups with
1215bd8deadSopenharmony_ci        gradients (textureGrad*).
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    This extension also provides additional support for processing patch
1245bd8deadSopenharmony_ci    primitives (introduced by ARB_tessellation_shader).
1255bd8deadSopenharmony_ci    ARB_tessellation_shader requires the use of a tessellation evaluation
1265bd8deadSopenharmony_ci    shader when processing patches, which means that patches will never
1275bd8deadSopenharmony_ci    survive past the tessellation pipeline stage.  This extension lifts that
1285bd8deadSopenharmony_ci    restriction, and allows patches to proceed further in the pipeline and be
1295bd8deadSopenharmony_ci    used
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci      * as input to a geometry shader, using a new "patches" layout qualifier;
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci      * as input to transform feedback;
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci      * by fixed-function rasterization stages, in which case the patches are
1365bd8deadSopenharmony_ci        drawn as independent points.
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    Additionally, it allows geometry shaders to read per-patch attributes
1395bd8deadSopenharmony_ci    written by a tessellation control shader using input variables declared
1405bd8deadSopenharmony_ci    with "patch in".
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ciNew Procedures and Functions
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    void Uniform1i64NV(int location, int64EXT x);
1465bd8deadSopenharmony_ci    void Uniform2i64NV(int location, int64EXT x, int64EXT y);
1475bd8deadSopenharmony_ci    void Uniform3i64NV(int location, int64EXT x, int64EXT y, int64EXT z);
1485bd8deadSopenharmony_ci    void Uniform4i64NV(int location, int64EXT x, int64EXT y, int64EXT z,
1495bd8deadSopenharmony_ci                       int64EXT w);
1505bd8deadSopenharmony_ci    void Uniform1i64vNV(int location, sizei count, const int64EXT *value);
1515bd8deadSopenharmony_ci    void Uniform2i64vNV(int location, sizei count, const int64EXT *value);
1525bd8deadSopenharmony_ci    void Uniform3i64vNV(int location, sizei count, const int64EXT *value);
1535bd8deadSopenharmony_ci    void Uniform4i64vNV(int location, sizei count, const int64EXT *value);
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci    void Uniform1ui64NV(int location, uint64EXT x);
1565bd8deadSopenharmony_ci    void Uniform2ui64NV(int location, uint64EXT x, uint64EXT y);
1575bd8deadSopenharmony_ci    void Uniform3ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z);
1585bd8deadSopenharmony_ci    void Uniform4ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z,
1595bd8deadSopenharmony_ci                       uint64EXT w);
1605bd8deadSopenharmony_ci    void Uniform1ui64vNV(int location, sizei count, const uint64EXT *value);
1615bd8deadSopenharmony_ci    void Uniform2ui64vNV(int location, sizei count, const uint64EXT *value);
1625bd8deadSopenharmony_ci    void Uniform3ui64vNV(int location, sizei count, const uint64EXT *value);
1635bd8deadSopenharmony_ci    void Uniform4ui64vNV(int location, sizei count, const uint64EXT *value);
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci    void GetUniformi64vNV(uint program, int location, int64EXT *params);
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci
1685bd8deadSopenharmony_ci    (The following function is also provided by NV_shader_buffer_load.)
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci    void GetUniformui64vNV(uint program, int location, uint64EXT *params);
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci    (All of the following ProgramUniform* functions are supported if and only
1745bd8deadSopenharmony_ci     if implemented in OpenGL ES or EXT_direct_state_access is supported.)
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci    void ProgramUniform1i64NV(uint program, int location, int64EXT x);
1775bd8deadSopenharmony_ci    void ProgramUniform2i64NV(uint program, int location, int64EXT x,
1785bd8deadSopenharmony_ci                              int64EXT y);
1795bd8deadSopenharmony_ci    void ProgramUniform3i64NV(uint program, int location, int64EXT x,
1805bd8deadSopenharmony_ci                              int64EXT y, int64EXT z);
1815bd8deadSopenharmony_ci    void ProgramUniform4i64NV(uint program, int location, int64EXT x,
1825bd8deadSopenharmony_ci                              int64EXT y, int64EXT z, int64EXT w);
1835bd8deadSopenharmony_ci    void ProgramUniform1i64vNV(uint program, int location, sizei count,
1845bd8deadSopenharmony_ci                               const int64EXT *value);
1855bd8deadSopenharmony_ci    void ProgramUniform2i64vNV(uint program, int location, sizei count,
1865bd8deadSopenharmony_ci                               const int64EXT *value);
1875bd8deadSopenharmony_ci    void ProgramUniform3i64vNV(uint program, int location, sizei count,
1885bd8deadSopenharmony_ci                               const int64EXT *value);
1895bd8deadSopenharmony_ci    void ProgramUniform4i64vNV(uint program, int location, sizei count,
1905bd8deadSopenharmony_ci                               const int64EXT *value);
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci    void ProgramUniform1ui64NV(uint program, int location, uint64EXT x);
1935bd8deadSopenharmony_ci    void ProgramUniform2ui64NV(uint program, int location, uint64EXT x,
1945bd8deadSopenharmony_ci                               uint64EXT y);
1955bd8deadSopenharmony_ci    void ProgramUniform3ui64NV(uint program, int location, uint64EXT x,
1965bd8deadSopenharmony_ci                               uint64EXT y, uint64EXT z);
1975bd8deadSopenharmony_ci    void ProgramUniform4ui64NV(uint program, int location, uint64EXT x,
1985bd8deadSopenharmony_ci                               uint64EXT y, uint64EXT z, uint64EXT w);
1995bd8deadSopenharmony_ci    void ProgramUniform1ui64vNV(uint program, int location, sizei count,
2005bd8deadSopenharmony_ci                                const uint64EXT *value);
2015bd8deadSopenharmony_ci    void ProgramUniform2ui64vNV(uint program, int location, sizei count,
2025bd8deadSopenharmony_ci                                const uint64EXT *value);
2035bd8deadSopenharmony_ci    void ProgramUniform3ui64vNV(uint program, int location, sizei count,
2045bd8deadSopenharmony_ci                                const uint64EXT *value);
2055bd8deadSopenharmony_ci    void ProgramUniform4ui64vNV(uint program, int location, sizei count,
2065bd8deadSopenharmony_ci                                const uint64EXT *value);
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci
2095bd8deadSopenharmony_ciNew Tokens
2105bd8deadSopenharmony_ci
2115bd8deadSopenharmony_ci    Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and
2125bd8deadSopenharmony_ci    GetTransformFeedbackVarying:
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ci        INT64_NV                                        0x140E
2155bd8deadSopenharmony_ci        UNSIGNED_INT64_NV                               0x140F
2165bd8deadSopenharmony_ci
2175bd8deadSopenharmony_ci        INT8_NV                                         0x8FE0
2185bd8deadSopenharmony_ci        INT8_VEC2_NV                                    0x8FE1
2195bd8deadSopenharmony_ci        INT8_VEC3_NV                                    0x8FE2
2205bd8deadSopenharmony_ci        INT8_VEC4_NV                                    0x8FE3
2215bd8deadSopenharmony_ci        INT16_NV                                        0x8FE4
2225bd8deadSopenharmony_ci        INT16_VEC2_NV                                   0x8FE5
2235bd8deadSopenharmony_ci        INT16_VEC3_NV                                   0x8FE6
2245bd8deadSopenharmony_ci        INT16_VEC4_NV                                   0x8FE7
2255bd8deadSopenharmony_ci        INT64_VEC2_NV                                   0x8FE9
2265bd8deadSopenharmony_ci        INT64_VEC3_NV                                   0x8FEA
2275bd8deadSopenharmony_ci        INT64_VEC4_NV                                   0x8FEB
2285bd8deadSopenharmony_ci        UNSIGNED_INT8_NV                                0x8FEC
2295bd8deadSopenharmony_ci        UNSIGNED_INT8_VEC2_NV                           0x8FED
2305bd8deadSopenharmony_ci        UNSIGNED_INT8_VEC3_NV                           0x8FEE
2315bd8deadSopenharmony_ci        UNSIGNED_INT8_VEC4_NV                           0x8FEF
2325bd8deadSopenharmony_ci        UNSIGNED_INT16_NV                               0x8FF0
2335bd8deadSopenharmony_ci        UNSIGNED_INT16_VEC2_NV                          0x8FF1
2345bd8deadSopenharmony_ci        UNSIGNED_INT16_VEC3_NV                          0x8FF2
2355bd8deadSopenharmony_ci        UNSIGNED_INT16_VEC4_NV                          0x8FF3
2365bd8deadSopenharmony_ci        UNSIGNED_INT64_VEC2_NV                          0x8FF5
2375bd8deadSopenharmony_ci        UNSIGNED_INT64_VEC3_NV                          0x8FF6
2385bd8deadSopenharmony_ci        UNSIGNED_INT64_VEC4_NV                          0x8FF7
2395bd8deadSopenharmony_ci        FLOAT16_NV                                      0x8FF8
2405bd8deadSopenharmony_ci        FLOAT16_VEC2_NV                                 0x8FF9
2415bd8deadSopenharmony_ci        FLOAT16_VEC3_NV                                 0x8FFA
2425bd8deadSopenharmony_ci        FLOAT16_VEC4_NV                                 0x8FFB
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci    (If ARB_tessellation_shader is supported, the following enum is accepted
2455bd8deadSopenharmony_ci     by a new primitive.)
2465bd8deadSopenharmony_ci
2475bd8deadSopenharmony_ci    Accepted by the <primitiveMode> parameter of BeginTransformFeedback:
2485bd8deadSopenharmony_ci
2495bd8deadSopenharmony_ci        PATCHES
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 3.2 (Compatibility Profile) Specification
2545bd8deadSopenharmony_ci(OpenGL Operation)
2555bd8deadSopenharmony_ci
2565bd8deadSopenharmony_ci    Modify Section 2.6.1, Begin and End, p. 22
2575bd8deadSopenharmony_ci
2585bd8deadSopenharmony_ci    (Extend language describing PATCHES introduced by ARB_tessellation_shader.
2595bd8deadSopenharmony_ci    It particular, add the following to the end of the description of the
2605bd8deadSopenharmony_ci    primitive type.)
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci    If a patch primitive is drawn, each patch is drawn separately as a
2635bd8deadSopenharmony_ci    collection of points, which each patch vertex definining a separate point.
2645bd8deadSopenharmony_ci    Extra vertices from an incomplete patch are never drawn.
2655bd8deadSopenharmony_ci
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ci    Modify Section 2.14.3, Vertex Attributes, p. 86
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci    (modify the second paragraph, p. 87) ... exceeds MAX_VERTEX_ATTRIBS.  For
2705bd8deadSopenharmony_ci    the purposes of this comparison, attribute variables of the type i64vec3,
2715bd8deadSopenharmony_ci    u64vec3, i64vec4, and u64vec4 count as consuming twice as many attributes
2725bd8deadSopenharmony_ci    as equivalent single-precision types.
2735bd8deadSopenharmony_ci
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci    (extend the list of types in the first paragraph, p. 88)
2765bd8deadSopenharmony_ci    ... UNSIGNED_INT_VEC3, UNSIGNED_INT_VEC4, INT8_NV, INT8_VEC2_NV,
2775bd8deadSopenharmony_ci    INT8_VEC3_NV, INT8_VEC4_NV, INT16_NV, INT16_VEC2_NV, INT16_VEC3_NV,
2785bd8deadSopenharmony_ci    INT16_VEC4_NV, INT64_NV, INT64_VEC2_NV, INT64_VEC3_NV, INT64_VEC4_NV,
2795bd8deadSopenharmony_ci    UNSIGNED_INT8_NV, UNSIGNED_INT8_VEC2_NV, UNSIGNED_INT8_VEC3_NV,
2805bd8deadSopenharmony_ci    UNSIGNED_INT8_VEC4_NV, UNSIGNED_INT16_NV, UNSIGNED_INT16_VEC2_NV,
2815bd8deadSopenharmony_ci    UNSIGNED_INT16_VEC3_NV, UNSIGNED_INT16_VEC4_NV, UNSIGNED_INT64_NV,
2825bd8deadSopenharmony_ci    UNSIGNED_INT64_VEC2_NV, UNSIGNED_INT64_VEC3_NV, UNSIGNED_INT64_VEC4_NV,
2835bd8deadSopenharmony_ci    FLOAT16_NV, FLOAT16_VEC2_NV, FLOAT16_VEC3_NV, or FLOAT16_VEC4_NV.
2845bd8deadSopenharmony_ci
2855bd8deadSopenharmony_ci
2865bd8deadSopenharmony_ci    Modify Section 2.14.4, Uniform Variables, p. 89
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci    (modify third paragraph, p. 90) ... uniform variable storage for a vertex
2895bd8deadSopenharmony_ci    shader.  A scalar or vector uniform with with 64-bit integer components
2905bd8deadSopenharmony_ci    will consume no more than 2<n> components, where <n> is 1 for scalars, and
2915bd8deadSopenharmony_ci    the component count for vectors.  A link error is generated ...
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ci    (add to Table 2.13, p. 96)
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci      Type Name Token           Keyword
2965bd8deadSopenharmony_ci      --------------------      ----------------
2975bd8deadSopenharmony_ci      INT8_NV                   int8_t
2985bd8deadSopenharmony_ci      INT8_VEC2_NV              i8vec2
2995bd8deadSopenharmony_ci      INT8_VEC3_NV              i8vec3
3005bd8deadSopenharmony_ci      INT8_VEC4_NV              i8vec4
3015bd8deadSopenharmony_ci      INT16_NV                  int16_t
3025bd8deadSopenharmony_ci      INT16_VEC2_NV             i16vec2
3035bd8deadSopenharmony_ci      INT16_VEC3_NV             i16vec3
3045bd8deadSopenharmony_ci      INT16_VEC4_NV             i16vec4
3055bd8deadSopenharmony_ci      INT64_NV                  int64_t
3065bd8deadSopenharmony_ci      INT64_VEC2_NV             i64vec2
3075bd8deadSopenharmony_ci      INT64_VEC3_NV             i64vec3
3085bd8deadSopenharmony_ci      INT64_VEC4_NV             i64vec4
3095bd8deadSopenharmony_ci      UNSIGNED_INT8_NV          uint8_t
3105bd8deadSopenharmony_ci      UNSIGNED_INT8_VEC2_NV     u8vec2
3115bd8deadSopenharmony_ci      UNSIGNED_INT8_VEC3_NV     u8vec3
3125bd8deadSopenharmony_ci      UNSIGNED_INT8_VEC4_NV     u8vec4
3135bd8deadSopenharmony_ci      UNSIGNED_INT16_NV         uint16_t
3145bd8deadSopenharmony_ci      UNSIGNED_INT16_VEC2_NV    u16vec2
3155bd8deadSopenharmony_ci      UNSIGNED_INT16_VEC3_NV    u16vec3
3165bd8deadSopenharmony_ci      UNSIGNED_INT16_VEC4_NV    u16vec4
3175bd8deadSopenharmony_ci      UNSIGNED_INT64_NV         uint64_t
3185bd8deadSopenharmony_ci      UNSIGNED_INT64_VEC2_NV    u64vec2
3195bd8deadSopenharmony_ci      UNSIGNED_INT64_VEC3_NV    u64vec3
3205bd8deadSopenharmony_ci      UNSIGNED_INT64_VEC4_NV    u64vec4
3215bd8deadSopenharmony_ci      FLOAT16_NV                float16_t
3225bd8deadSopenharmony_ci      FLOAT16_VEC2_NV           f16vec2
3235bd8deadSopenharmony_ci      FLOAT16_VEC3_NV           f16vec3
3245bd8deadSopenharmony_ci      FLOAT16_VEC4_NV           f16vec4
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci    (modify list of commands at the bottom of p. 99)
3275bd8deadSopenharmony_ci
3285bd8deadSopenharmony_ci      void Uniform{1,2,3,4}{i64,ui64}NV(int location, T value);
3295bd8deadSopenharmony_ci      void Uniform{1,2,3,4}{i64,ui64}vNV(int location, T value);
3305bd8deadSopenharmony_ci
3315bd8deadSopenharmony_ci    (insert after fourth paragraph, p. 100) The Uniform*i64{v}NV and
3325bd8deadSopenharmony_ci    Uniform*ui64{v}NV commands will load <count> sets of one to four 64-bit
3335bd8deadSopenharmony_ci    signed or unsigned integer values into a uniform location defined as a
3345bd8deadSopenharmony_ci    64-bit signed or unsigned integer scalar or vector types.
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci
3375bd8deadSopenharmony_ci    (modify "Uniform Buffer Object Storage", p. 102, adding two bullets after
3385bd8deadSopenharmony_ci     the last "Members of type", and modifying the subsequent bullet)
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci     * Members of type int8_t, int16_t, and int64_t are extracted from a
3415bd8deadSopenharmony_ci       buffer object by reading a single byte, short, or int64-typed value at
3425bd8deadSopenharmony_ci       the specified offset.
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ci     * Members of type uint8_t, uint16_t, and uint64_t are extracted from a
3455bd8deadSopenharmony_ci       buffer object by reading a single ubyte, ushort, or uint64-typed value
3465bd8deadSopenharmony_ci       at the specified offset.
3475bd8deadSopenharmony_ci
3485bd8deadSopenharmony_ci     * Members of type float16_t are extracted from a buffer object by reading
3495bd8deadSopenharmony_ci       a single half-typed value at the specified offset.
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ci     * Vectors with N elements with basic data types of bool, int, uint,
3525bd8deadSopenharmony_ci       float, double, int8_t, int16_t, int64_t, uint8_t, uint16_t, uint64_t,
3535bd8deadSopenharmony_ci       or float16_t are extracted as N values in consecutive memory locations
3545bd8deadSopenharmony_ci       beginning at the specified offset, with components stored in order with
3555bd8deadSopenharmony_ci       the first (X) component at the lowest offset. The GL data type used for
3565bd8deadSopenharmony_ci       component extraction is derived according to the rules for scalar
3575bd8deadSopenharmony_ci       members above.
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci
3605bd8deadSopenharmony_ci    Modify Section 2.14.6, Varying Variables, p. 106
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci    (modify third paragraph, p. 107) ... For the purposes of counting input
3635bd8deadSopenharmony_ci    and output components consumed by a shader, variables declared as vectors,
3645bd8deadSopenharmony_ci    matrices, and arrays will all consume multiple components.  Each component
3655bd8deadSopenharmony_ci    of variables declared as 64-bit integer scalars or vectors, will be
3665bd8deadSopenharmony_ci    counted as consuming two components.
3675bd8deadSopenharmony_ci
3685bd8deadSopenharmony_ci    (add after the bulleted list, p. 108) For the purposes of counting the
3695bd8deadSopenharmony_ci    total number of components to capture, each component of outputs declared
3705bd8deadSopenharmony_ci    as 64-bit integer scalars or vectors will be counted as consuming two
3715bd8deadSopenharmony_ci    components.
3725bd8deadSopenharmony_ci
3735bd8deadSopenharmony_ci
3745bd8deadSopenharmony_ci    Modify Section 2.15.1, Geometry Shader Input Primitives, p. 118
3755bd8deadSopenharmony_ci
3765bd8deadSopenharmony_ci    (add new qualifier at the end of the section, p. 120)
3775bd8deadSopenharmony_ci
3785bd8deadSopenharmony_ci    Patches (patches)
3795bd8deadSopenharmony_ci
3805bd8deadSopenharmony_ci    Geometry shaders that operate on patches are valid for the PATCHES
3815bd8deadSopenharmony_ci    primitive type.  The number of vertices available to each program
3825bd8deadSopenharmony_ci    invocation is equal to the vertex count of the variable-size patch, with
3835bd8deadSopenharmony_ci    vertices presented to the geometry shader in the order specified in the
3845bd8deadSopenharmony_ci    patch.
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci
3875bd8deadSopenharmony_ci    Modify Section 2.15.4, Geometry Shader Execution Environment, p. 121
3885bd8deadSopenharmony_ci
3895bd8deadSopenharmony_ci    (add to the end of "Geometry Shader Inputs", p. 123)
3905bd8deadSopenharmony_ci
3915bd8deadSopenharmony_ci    Geometry shaders also support built-in and user-defined per-primitive
3925bd8deadSopenharmony_ci    inputs.  The following built-in inputs, not replicated per-vertex and not
3935bd8deadSopenharmony_ci    contained in gl_in[], are supported:
3945bd8deadSopenharmony_ci
3955bd8deadSopenharmony_ci      * The variable gl_PatchVerticesIn is filled with the number of the
3965bd8deadSopenharmony_ci        vertices in the input primitive.
3975bd8deadSopenharmony_ci
3985bd8deadSopenharmony_ci      * The variables gl_TessLevelOuter[] and gl_TessLevelInner[] are arrays
3995bd8deadSopenharmony_ci        holding outer and inner tessellation levels of an input patch.  If a
4005bd8deadSopenharmony_ci        tessellation control shader is active, the tessellation levels will be
4015bd8deadSopenharmony_ci        taken from the corresponding outputs of the tessellation control
4025bd8deadSopenharmony_ci        shader.  Otherwise, the default levels provided as patch parameters
4035bd8deadSopenharmony_ci        are used.  Tessellation level values loaded in these variables will be
4045bd8deadSopenharmony_ci        prior to the clamping and rounding operations performed by the
4055bd8deadSopenharmony_ci        primitive generator as described in Section 2.X.2 of
4065bd8deadSopenharmony_ci        ARB_tessellation_shader.  For triangular tessellation,
4075bd8deadSopenharmony_ci        gl_TessLevelOuter[3] and gl_TessLevelInner[1] will be undefined.  For
4085bd8deadSopenharmony_ci        isoline tessellation, gl_TessLevelOuter[2], gl_TessLevelOuter[3], and
4095bd8deadSopenharmony_ci        both values in gl_TessLevelInner[] are undefined.
4105bd8deadSopenharmony_ci
4115bd8deadSopenharmony_ci    Additionally, a geometry shader with an input primitive type of "patches"
4125bd8deadSopenharmony_ci    may declare per-patch input variables using the qualifier "patch in".
4135bd8deadSopenharmony_ci    Unlike per-vertex inputs, per-patch inputs do not correspond to any
4145bd8deadSopenharmony_ci    specific vertex in the input primitive, and are not indexed by vertex
4155bd8deadSopenharmony_ci    number.  Per-patch inputs declared as arrays have multiple values for the
4165bd8deadSopenharmony_ci    input patch; similarly declared per-vertex inputs would indicate a single
4175bd8deadSopenharmony_ci    value for each vertex in the output patch.  User-defined per-patch input
4185bd8deadSopenharmony_ci    variables are filled with corresponding per-patch output values written by
4195bd8deadSopenharmony_ci    the tessellation control shader.  If no tessellation control shader is
4205bd8deadSopenharmony_ci    active, all such variables are undefined.
4215bd8deadSopenharmony_ci
4225bd8deadSopenharmony_ci    Per-patch input variables and the built-in inputs "gl_PatchVerticesIn",
4235bd8deadSopenharmony_ci    "gl_TessLevelOuter[]", and "gl_TessLevelInner[]" are supported only for
4245bd8deadSopenharmony_ci    geometry shaders with an input primitive type of "patches".  A program
4255bd8deadSopenharmony_ci    will fail to link if any such variable is used in a geometry shader with a
4265bd8deadSopenharmony_ci    input primitive type other than "patches".
4275bd8deadSopenharmony_ci
4285bd8deadSopenharmony_ci
4295bd8deadSopenharmony_ci    Modify Section 2.19, Transform Feedback, p. 130
4305bd8deadSopenharmony_ci
4315bd8deadSopenharmony_ci    (add to Table 2.14, p. 131)
4325bd8deadSopenharmony_ci
4335bd8deadSopenharmony_ci      Transform Feedback
4345bd8deadSopenharmony_ci      primitiveMode               allowed render primitive modes
4355bd8deadSopenharmony_ci      ----------------------      ---------------------------------
4365bd8deadSopenharmony_ci      PATCHES                     PATCHES
4375bd8deadSopenharmony_ci
4385bd8deadSopenharmony_ci
4395bd8deadSopenharmony_ci    (modify first paragraph, p. 131) ... <primitiveMode> is one of TRIANGLES,
4405bd8deadSopenharmony_ci    LINES, POINTS, or PATCHES and specifies the type of primitives that will
4415bd8deadSopenharmony_ci    be recorded into the buffer objects bound for transform feedback (see
4425bd8deadSopenharmony_ci    below). ...
4435bd8deadSopenharmony_ci
4445bd8deadSopenharmony_ci    (modify last paragraph, p. 131 and first paragraph, p. 132, adding patch
4455bd8deadSopenharmony_ci    support, and dealing with capture of 8- and 16-bit components)
4465bd8deadSopenharmony_ci
4475bd8deadSopenharmony_ci    When an individual point, line, triangle, or patch primitive reaches the
4485bd8deadSopenharmony_ci    transform feedback stage ...  When capturing line, triangle, and patch
4495bd8deadSopenharmony_ci    primitives, all attributes ...  For multi-component varying variables or
4505bd8deadSopenharmony_ci    varying array elements, the individual components are written in order.
4515bd8deadSopenharmony_ci    For variables with 8- or 16-bit fixed- or floating-point components,
4525bd8deadSopenharmony_ci    individual components will be converted to and stored as equivalent values
4535bd8deadSopenharmony_ci    of type "int", "uint", or "float".  The value for any attribute specified
4545bd8deadSopenharmony_ci    ...
4555bd8deadSopenharmony_ci
4565bd8deadSopenharmony_ci    (modify next-to-last paragraph, p. 132) ... is not incremented.  If
4575bd8deadSopenharmony_ci    transform feedback receives a primitive that fits in the remaining space
4585bd8deadSopenharmony_ci    after such an overflow occurs, that primitive may or may not be recorded.
4595bd8deadSopenharmony_ci    Primitives that fail to fit in the remaining space are never recorded.
4605bd8deadSopenharmony_ci
4615bd8deadSopenharmony_ci
4625bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 3.2 (Compatibility Profile) Specification
4635bd8deadSopenharmony_ci(Rasterization)
4645bd8deadSopenharmony_ci
4655bd8deadSopenharmony_ci    None.
4665bd8deadSopenharmony_ci
4675bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 3.2 (Compatibility Profile) Specification
4685bd8deadSopenharmony_ci(Per-Fragment Operations and the Frame Buffer)
4695bd8deadSopenharmony_ci
4705bd8deadSopenharmony_ci    None.
4715bd8deadSopenharmony_ci
4725bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 3.2 (Compatibility Profile) Specification
4735bd8deadSopenharmony_ci(Special Functions)
4745bd8deadSopenharmony_ci
4755bd8deadSopenharmony_ci    None.
4765bd8deadSopenharmony_ci
4775bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 3.2 (Compatibility Profile) Specification
4785bd8deadSopenharmony_ci(State and State Requests)
4795bd8deadSopenharmony_ci
4805bd8deadSopenharmony_ci    Modify Section 6.1.15, Shader and Program Queries, p. 332
4815bd8deadSopenharmony_ci
4825bd8deadSopenharmony_ci    (add to the first list of commands, p. 337)
4835bd8deadSopenharmony_ci
4845bd8deadSopenharmony_ci      void GetUniformi64vNV(uint program, int location, int64EXT *params);
4855bd8deadSopenharmony_ci      void GetUniformui64vNV(uint program, int location, uint64EXT *params);
4865bd8deadSopenharmony_ci
4875bd8deadSopenharmony_ci
4885bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 3.2 (Compatibility Profile)
4895bd8deadSopenharmony_ciSpecification (Invariance)
4905bd8deadSopenharmony_ci
4915bd8deadSopenharmony_ci    None.
4925bd8deadSopenharmony_ci
4935bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
4945bd8deadSopenharmony_ci
4955bd8deadSopenharmony_ci    None.
4965bd8deadSopenharmony_ci
4975bd8deadSopenharmony_ciModifications to The OpenGL Shading Language Specification, Version 1.50
4985bd8deadSopenharmony_ci(Revision 09)
4995bd8deadSopenharmony_ci
5005bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
5015bd8deadSopenharmony_ci    language features described in this extension:
5025bd8deadSopenharmony_ci
5035bd8deadSopenharmony_ci      #extension GL_NV_gpu_shader5 : <behavior>
5045bd8deadSopenharmony_ci
5055bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.3.
5065bd8deadSopenharmony_ci
5075bd8deadSopenharmony_ci    New preprocessor #defines are added to the OpenGL Shading Language:
5085bd8deadSopenharmony_ci
5095bd8deadSopenharmony_ci      #define GL_NV_gpu_shader5         1
5105bd8deadSopenharmony_ci
5115bd8deadSopenharmony_ci    If the features of this extension are enabled by an #extension directive,
5125bd8deadSopenharmony_ci    shading language features documented in the ARB_gpu_shader5 extension will
5135bd8deadSopenharmony_ci    also be provided.
5145bd8deadSopenharmony_ci
5155bd8deadSopenharmony_ci
5165bd8deadSopenharmony_ci    Modify Section 3.6, Keywords, p. 15
5175bd8deadSopenharmony_ci
5185bd8deadSopenharmony_ci    (add the following to the list of reserved keywords)
5195bd8deadSopenharmony_ci
5205bd8deadSopenharmony_ci    int8_t              i8vec2          i8vec3          i8vec4
5215bd8deadSopenharmony_ci    int16_t             i16vec2         i16vec3         i16vec4
5225bd8deadSopenharmony_ci    int32_t             i32vec2         i32vec3         i32vec4
5235bd8deadSopenharmony_ci    int64_t             i64vec2         i64vec3         i64vec4
5245bd8deadSopenharmony_ci    uint8_t             u8vec2          u8vec3          u8vec4
5255bd8deadSopenharmony_ci    uint16_t            u16vec2         u16vec3         u16vec4
5265bd8deadSopenharmony_ci    uint32_t            u32vec2         u32vec3         u32vec4
5275bd8deadSopenharmony_ci    uint64_t            u64vec2         u64vec3         u64vec4
5285bd8deadSopenharmony_ci    float16_t           f16vec2         f16vec3         f16vec4
5295bd8deadSopenharmony_ci    float32_t           f32vec2         f32vec3         f32vec4
5305bd8deadSopenharmony_ci    float64_t           f64vec2         f64vec3         f64vec4
5315bd8deadSopenharmony_ci
5325bd8deadSopenharmony_ci    (note:  the "float64_t" and "f64vec*" types are available if and only if
5335bd8deadSopenharmony_ci    ARB_gpu_shader_fp64 is also supported)
5345bd8deadSopenharmony_ci
5355bd8deadSopenharmony_ci
5365bd8deadSopenharmony_ci    Modify Section 4.1, Basic Types, p. 18
5375bd8deadSopenharmony_ci
5385bd8deadSopenharmony_ci    (add to the basic "Transparent Types" table, p. 18)
5395bd8deadSopenharmony_ci
5405bd8deadSopenharmony_ci      Types       Meaning
5415bd8deadSopenharmony_ci      --------    ----------------------------------------------------------
5425bd8deadSopenharmony_ci      int8_t      an 8-bit signed integer
5435bd8deadSopenharmony_ci      i8vec2      a two-component signed integer vector (8-bit components)
5445bd8deadSopenharmony_ci      i8vec3      a three-component signed integer vector (8-bit components)
5455bd8deadSopenharmony_ci      i8vec4      a four-component signed integer vector (8-bit components)
5465bd8deadSopenharmony_ci
5475bd8deadSopenharmony_ci      int16_t     a 16-bit signed integer
5485bd8deadSopenharmony_ci      i16vec2     a two-component signed integer vector (16-bit components)
5495bd8deadSopenharmony_ci      i16vec3     a three-component signed integer vector (16-bit components)
5505bd8deadSopenharmony_ci      i16vec4     a four-component signed integer vector (16-bit components)
5515bd8deadSopenharmony_ci
5525bd8deadSopenharmony_ci      int32_t     a 32-bit signed integer
5535bd8deadSopenharmony_ci      i32vec2     a two-component signed integer vector (32-bit components)
5545bd8deadSopenharmony_ci      i32vec3     a three-component signed integer vector (32-bit components)
5555bd8deadSopenharmony_ci      i32vec4     a four-component signed integer vector (32-bit components)
5565bd8deadSopenharmony_ci
5575bd8deadSopenharmony_ci      int64_t     a 64-bit signed integer
5585bd8deadSopenharmony_ci      i64vec2     a two-component signed integer vector (64-bit components)
5595bd8deadSopenharmony_ci      i64vec3     a three-component signed integer vector (64-bit components)
5605bd8deadSopenharmony_ci      i64vec4     a four-component signed integer vector (64-bit components)
5615bd8deadSopenharmony_ci
5625bd8deadSopenharmony_ci      uint8_t     a 8-bit unsigned integer
5635bd8deadSopenharmony_ci      u8vec2      a two-component unsigned integer vector (8-bit components)
5645bd8deadSopenharmony_ci      u8vec3      a three-component unsigned integer vector (8-bit components)
5655bd8deadSopenharmony_ci      u8vec4      a four-component unsigned integer vector (8-bit components)
5665bd8deadSopenharmony_ci
5675bd8deadSopenharmony_ci      uint16_t    a 16-bit unsigned integer
5685bd8deadSopenharmony_ci      u16vec2     a two-component unsigned integer vector (16-bit components)
5695bd8deadSopenharmony_ci      u16vec3     a three-component unsigned integer vector (16-bit components)
5705bd8deadSopenharmony_ci      u16vec4     a four-component unsigned integer vector (16-bit components)
5715bd8deadSopenharmony_ci
5725bd8deadSopenharmony_ci      uint32_t    a 32-bit unsigned integer
5735bd8deadSopenharmony_ci      u32vec2     a two-component unsigned integer vector (32-bit components)
5745bd8deadSopenharmony_ci      u32vec3     a three-component unsigned integer vector (32-bit components)
5755bd8deadSopenharmony_ci      u32vec4     a four-component unsigned integer vector (32-bit components)
5765bd8deadSopenharmony_ci
5775bd8deadSopenharmony_ci      uint64_t    a 64-bit unsigned integer
5785bd8deadSopenharmony_ci      u64vec2     a two-component unsigned integer vector (64-bit components)
5795bd8deadSopenharmony_ci      u64vec3     a three-component unsigned integer vector (64-bit components)
5805bd8deadSopenharmony_ci      u64vec4     a four-component unsigned integer vector (64-bit components)
5815bd8deadSopenharmony_ci
5825bd8deadSopenharmony_ci      float16_t   a single 16-bit floating-point value
5835bd8deadSopenharmony_ci      f16vec2     a two-component floating-point vector (16-bit components)
5845bd8deadSopenharmony_ci      f16vec3     a three-component floating-point vector (16-bit components)
5855bd8deadSopenharmony_ci      f16vec4     a four-component floating-point vector (16-bit components)
5865bd8deadSopenharmony_ci
5875bd8deadSopenharmony_ci      float32_t   a single 32-bit floating-point value
5885bd8deadSopenharmony_ci      f32vec2     a two-component floating-point vector (32-bit components)
5895bd8deadSopenharmony_ci      f32vec3     a three-component floating-point vector (32-bit components)
5905bd8deadSopenharmony_ci      f32vec4     a four-component floating-point vector (32-bit components)
5915bd8deadSopenharmony_ci
5925bd8deadSopenharmony_ci      float64_t   a single 64-bit floating-point value
5935bd8deadSopenharmony_ci      f64vec2     a two-component floating-point vector (64-bit components)
5945bd8deadSopenharmony_ci      f64vec3     a three-component floating-point vector (64-bit components)
5955bd8deadSopenharmony_ci      f64vec4     a four-component floating-point vector (64-bit components)
5965bd8deadSopenharmony_ci
5975bd8deadSopenharmony_ci
5985bd8deadSopenharmony_ci    Modify Section 4.1.3, Integers, p. 20
5995bd8deadSopenharmony_ci
6005bd8deadSopenharmony_ci    (add after the first paragraph of the section, p. 20)
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci    Variables with the types "int8_t", "int16_t", and "int64_t" represent
6035bd8deadSopenharmony_ci    signed integer values with exactly 8, 16, or 64 bits, respectively.
6045bd8deadSopenharmony_ci    Variables with the type "uint8_t", "uint16_t", and "uint64_t" represent
6055bd8deadSopenharmony_ci    unsigned integer values with exactly 8, 16, or 64 bits, respectively.
6065bd8deadSopenharmony_ci    Variables with the type "int32_t" and "uint32_t" represent signed and
6075bd8deadSopenharmony_ci    unsigned integer values with 32 bits, and are equivalent to "int" and
6085bd8deadSopenharmony_ci    "uint" types, respectively.
6095bd8deadSopenharmony_ci
6105bd8deadSopenharmony_ci
6115bd8deadSopenharmony_ci    (modify the grammar, p. 21, adding "L" and "UL" suffixes)
6125bd8deadSopenharmony_ci
6135bd8deadSopenharmony_ci      integer-suffix:  one of
6145bd8deadSopenharmony_ci
6155bd8deadSopenharmony_ci        u U l L ul UL
6165bd8deadSopenharmony_ci
6175bd8deadSopenharmony_ci    (modify next-to-last paragraph, p. 21) ... When the suffix "u" or "U" is
6185bd8deadSopenharmony_ci    present, the literal has type <uint>.  When the suffix "l" or "L" is
6195bd8deadSopenharmony_ci    present, the literal has type <int64_t>.  When the suffix "ul" or "UL" is
6205bd8deadSopenharmony_ci    present, the literal has type <uint64_t>.  Otherwise, the type is
6215bd8deadSopenharmony_ci    <int>. ...
6225bd8deadSopenharmony_ci
6235bd8deadSopenharmony_ci
6245bd8deadSopenharmony_ci    Modify Section 4.1.4, Floats, p. 22
6255bd8deadSopenharmony_ci
6265bd8deadSopenharmony_ci    (insert after second paragraph, p. 22)
6275bd8deadSopenharmony_ci
6285bd8deadSopenharmony_ci    Variables of type "float16_t" represent floating-point using exactly 16
6295bd8deadSopenharmony_ci    bits and are stored using the 16-bit floating-point representation
6305bd8deadSopenharmony_ci    described in the OpenGL Specification.  Variables of type "float32_t"
6315bd8deadSopenharmony_ci    and "float64_t" represent floating-point with 32 or 64 bits, and are
6325bd8deadSopenharmony_ci    equivalent to "float" and "double" types, respectively.
6335bd8deadSopenharmony_ci
6345bd8deadSopenharmony_ci
6355bd8deadSopenharmony_ci    Modify Section 4.1.7, Samplers, p. 23
6365bd8deadSopenharmony_ci
6375bd8deadSopenharmony_ci    (modify 1st paragraph of the section, deleting the restriction requiring
6385bd8deadSopenharmony_ci    constant indexing of sampler arrays) ... Samplers may aggregated into
6395bd8deadSopenharmony_ci    arrays within a shader (using square brackets [ ]) and can be indexed with
6405bd8deadSopenharmony_ci    general integer expressions.  The results of accessing a sampler array
6415bd8deadSopenharmony_ci    with an out-of-bounds index are undefined. ...
6425bd8deadSopenharmony_ci
6435bd8deadSopenharmony_ci    (remove the additional restriction added by ARB_gpu_shader5 making a
6445bd8deadSopenharmony_ci    similar edit requiring uniform indexing across shader invocations for
6455bd8deadSopenharmony_ci    defined results.  NV_gpu_shader5 has no such limitation.)
6465bd8deadSopenharmony_ci
6475bd8deadSopenharmony_ci
6485bd8deadSopenharmony_ci    Modify Section 4.1.10, Implicit Conversions, p. 27
6495bd8deadSopenharmony_ci
6505bd8deadSopenharmony_ci    (modify table of implicit conversions)
6515bd8deadSopenharmony_ci
6525bd8deadSopenharmony_ci                                Can be implicitly
6535bd8deadSopenharmony_ci        Type of expression        converted to
6545bd8deadSopenharmony_ci        --------------------    -----------------------------------------
6555bd8deadSopenharmony_ci        int                     uint, int64_t, uint64_t, float, double(*)
6565bd8deadSopenharmony_ci        ivec2                   uvec2, i64vec2, u64vec2, vec2, dvec2(*)
6575bd8deadSopenharmony_ci        ivec3                   uvec3, i64vec3, u64vec3, vec3, dvec3(*)
6585bd8deadSopenharmony_ci        ivec4                   uvec4, i64vec4, u64vec4, vec4, dvec4(*)
6595bd8deadSopenharmony_ci
6605bd8deadSopenharmony_ci        int8_t   int16_t        int, int64_t, uint, uint64_t, float, double(*)
6615bd8deadSopenharmony_ci        i8vec2   i16vec2        ivec2, i64vec2, uvec2, u64vec2, vec2, dvec2(*)
6625bd8deadSopenharmony_ci        i8vec3   i16vec3        ivec3, i64vec3, uvec3, u64vec3, vec3, dvec3(*)
6635bd8deadSopenharmony_ci        i8vec4   i16vec4        ivec4, i64vec4, uvec4, u64vec4, vec4, dvec4(*)
6645bd8deadSopenharmony_ci
6655bd8deadSopenharmony_ci        int64_t                 uint64_t, double(*)
6665bd8deadSopenharmony_ci        i64vec2                 u64vec2, dvec2(*)
6675bd8deadSopenharmony_ci        i64vec3                 u64vec3, dvec3(*)
6685bd8deadSopenharmony_ci        i64vec4                 u64vec4, dvec4(*)
6695bd8deadSopenharmony_ci
6705bd8deadSopenharmony_ci        uint                    uint64_t, float, double(*)
6715bd8deadSopenharmony_ci        uvec2                   u64vec2, vec2, dvec2(*)
6725bd8deadSopenharmony_ci        uvec3                   u64vec3, vec3, dvec3(*)
6735bd8deadSopenharmony_ci        uvec4                   u64vec4, vec4, dvec4(*)
6745bd8deadSopenharmony_ci
6755bd8deadSopenharmony_ci        uint8_t  uint16_t       uint, uint64_t, float, double(*)
6765bd8deadSopenharmony_ci        u8vec2   u16vec2        uvec2, u64vec2, vec2, dvec2(*)
6775bd8deadSopenharmony_ci        u8vec3   i16vec3        uvec3, u64vec3, vec3, dvec3(*)
6785bd8deadSopenharmony_ci        u8vec4   i16vec4        uvec4, u64vec4, vec4, dvec4(*)
6795bd8deadSopenharmony_ci
6805bd8deadSopenharmony_ci        uint64_t                double(*)
6815bd8deadSopenharmony_ci        u64vec2                 dvec2(*)
6825bd8deadSopenharmony_ci        u64vec3                 dvec3(*)
6835bd8deadSopenharmony_ci        u64vec4                 dvec4(*)
6845bd8deadSopenharmony_ci
6855bd8deadSopenharmony_ci        float                   double(*)
6865bd8deadSopenharmony_ci        vec2                    dvec2(*)
6875bd8deadSopenharmony_ci        vec3                    dvec3(*)
6885bd8deadSopenharmony_ci        vec4                    dvec4(*)
6895bd8deadSopenharmony_ci
6905bd8deadSopenharmony_ci        float16_t               float, double(*)
6915bd8deadSopenharmony_ci        f16vec2                 vec2, dvec2(*)
6925bd8deadSopenharmony_ci        f16vec3                 vec3, dvec3(*)
6935bd8deadSopenharmony_ci        f16vec4                 vec4, dvec4(*)
6945bd8deadSopenharmony_ci
6955bd8deadSopenharmony_ci        (*) if ARB_gpu_shader_fp64 is supported
6965bd8deadSopenharmony_ci
6975bd8deadSopenharmony_ci    (Note:  Expressions of type "int32_t", "uint32_t", "float32_t", and
6985bd8deadSopenharmony_ci    "float64_t" are treated as identical to those of type "int", "uint",
6995bd8deadSopenharmony_ci    "float", and "double", respectively.  Implicit conversions to and from
7005bd8deadSopenharmony_ci    these explicitly-sized types are allowed whenever conversions involving
7015bd8deadSopenharmony_ci    the equivalent base type are allowed.)
7025bd8deadSopenharmony_ci
7035bd8deadSopenharmony_ci
7045bd8deadSopenharmony_ci    (modify second paragraph of the section) No implicit conversions are
7055bd8deadSopenharmony_ci    provided to convert from unsigned to signed integer types, from
7065bd8deadSopenharmony_ci    floating-point to integer types, from higher-precision to lower-precision
7075bd8deadSopenharmony_ci    types, from 8-bit to 16-bit types, or between matrix types.  There are no
7085bd8deadSopenharmony_ci    implicit array or structure conversions.
7095bd8deadSopenharmony_ci
7105bd8deadSopenharmony_ci    (add before the final paragraph of the section, p. 27)
7115bd8deadSopenharmony_ci
7125bd8deadSopenharmony_ci    (insert before the final paragraph of the section) When performing
7135bd8deadSopenharmony_ci    implicit conversion for binary operators, there may be multiple data types
7145bd8deadSopenharmony_ci    to which the two operands can be converted.  For example, when adding an
7155bd8deadSopenharmony_ci    int8_t value to a uint16_t value, both values can be implicitly converted
7165bd8deadSopenharmony_ci    to uint, uint64_t, float, and double.  In such cases, a floating-point
7175bd8deadSopenharmony_ci    type is chosen if either operand has a floating-point type.  Otherwise, an
7185bd8deadSopenharmony_ci    unsigned integer type is chosen if either operand has an unsigned integer
7195bd8deadSopenharmony_ci    type.  Otherwise, a signed integer type is chosen.  If operands can be
7205bd8deadSopenharmony_ci    converted to both 32- and 64-bit versions of the chosen base data type,
7215bd8deadSopenharmony_ci    the 32-bit version is used.
7225bd8deadSopenharmony_ci
7235bd8deadSopenharmony_ci
7245bd8deadSopenharmony_ci    Modify Section 4.3.4, Inputs, p. 31
7255bd8deadSopenharmony_ci
7265bd8deadSopenharmony_ci    (modify third paragraph of section, p. 31, allowing explicitly-sized
7275bd8deadSopenharmony_ci    types) ... Vertex shader inputs variables can only be signed and unsigned
7285bd8deadSopenharmony_ci    integers, floats, doubles, explicitly-sized integers and floating-point
7295bd8deadSopenharmony_ci    values, vectors of any of these types, and matrices.  ...
7305bd8deadSopenharmony_ci
7315bd8deadSopenharmony_ci    (modify edits done in ARB_tessellation_shader adding support for "patch
7325bd8deadSopenharmony_ci    in", allowing for geometry shaders as well) Additionally, tessellation
7335bd8deadSopenharmony_ci    evaluation and geometry shaders support per-patch input variables declared
7345bd8deadSopenharmony_ci    with the "patch in" qualifier.  Per-patch input ...
7355bd8deadSopenharmony_ci
7365bd8deadSopenharmony_ci
7375bd8deadSopenharmony_ci    (modify third paragraph, p. 32) ... Fragment inputs can only be signed and
7385bd8deadSopenharmony_ci    unsigned integers, floats, doubles, explicitly-sized integers and
7395bd8deadSopenharmony_ci    floating-point values, vectors of any of these types, matrices, or arrays
7405bd8deadSopenharmony_ci    or structures of these.  Fragment inputs declared as signed or unsigned
7415bd8deadSopenharmony_ci    integers, doubles, 64-bit floating-point values, including vectors,
7425bd8deadSopenharmony_ci    matrices, or arrays derived from those types, must be qualified as "flat".
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci
7455bd8deadSopenharmony_ci    Modify Section 4.3.6, Outputs, p. 33
7465bd8deadSopenharmony_ci
7475bd8deadSopenharmony_ci    (modify third paragraph of the section, p. 33) ... They can only be signed
7485bd8deadSopenharmony_ci    and unsigned integers, floats, doubles, explicitly-sized integers and
7495bd8deadSopenharmony_ci    floating-point values, vectors of any of these types, matrices, or arrays
7505bd8deadSopenharmony_ci    or structures of these.
7515bd8deadSopenharmony_ci
7525bd8deadSopenharmony_ci    (modify last paragraph, p. 33) ...  Fragment outputs can only be signed
7535bd8deadSopenharmony_ci    and unsigned integers, floats, explicitly-sized integers and
7545bd8deadSopenharmony_ci    floating-point values with 32 or fewer bits, vectors of any of these
7555bd8deadSopenharmony_ci    types, or arrays of these.  Doubles, 64-bit integers or floating-point
7565bd8deadSopenharmony_ci    values, vectors or arrays of those types, matrices, and structures cannot
7575bd8deadSopenharmony_ci    be output. ...
7585bd8deadSopenharmony_ci
7595bd8deadSopenharmony_ci
7605bd8deadSopenharmony_ci    Modify Section 4.3.8.1, Input Layout Qualifiers, p. 37
7615bd8deadSopenharmony_ci
7625bd8deadSopenharmony_ci    (add to the list of qualifiers for geometry shaders, p. 37)
7635bd8deadSopenharmony_ci
7645bd8deadSopenharmony_ci      layout-qualifier-id:
7655bd8deadSopenharmony_ci        ...
7665bd8deadSopenharmony_ci        triangles_adjacency
7675bd8deadSopenharmony_ci        patches
7685bd8deadSopenharmony_ci
7695bd8deadSopenharmony_ci    (modify the "size of input arrays" table, p. 38)
7705bd8deadSopenharmony_ci
7715bd8deadSopenharmony_ci        Layout          Size of Input Arrays
7725bd8deadSopenharmony_ci      ------------      --------------------
7735bd8deadSopenharmony_ci        patches         gl_MaxPatchVertices
7745bd8deadSopenharmony_ci
7755bd8deadSopenharmony_ci    (add paragraph below that table, p. 38)
7765bd8deadSopenharmony_ci
7775bd8deadSopenharmony_ci    When using the input primitive type "patches", the geometry shader is used
7785bd8deadSopenharmony_ci    to process a set of patches with vertex counts that may vary from patch to
7795bd8deadSopenharmony_ci    patch.  For the purposes of input array sizing, patches are treated as
7805bd8deadSopenharmony_ci    having a vertex count fixed at the implementation-dependent maximum patch
7815bd8deadSopenharmony_ci    size, gl_MaxPatchVertices.  If a shader reads an input corresponding to a
7825bd8deadSopenharmony_ci    vertex not found in the patch being processed, the values read are
7835bd8deadSopenharmony_ci    undefined.
7845bd8deadSopenharmony_ci
7855bd8deadSopenharmony_ci
7865bd8deadSopenharmony_ci    Modify Section 5.4.1, Conversion and Scalar Constructors, p. 49
7875bd8deadSopenharmony_ci
7885bd8deadSopenharmony_ci    (add after first list of constructor examples)
7895bd8deadSopenharmony_ci
7905bd8deadSopenharmony_ci    Similar constructors are provided to convert to and from explicitly-sized
7915bd8deadSopenharmony_ci    scalar data types, as well:
7925bd8deadSopenharmony_ci
7935bd8deadSopenharmony_ci      float(uint8_t)      // converts an 8-bit uint value to a float
7945bd8deadSopenharmony_ci      int64_t(double)     // converts a double value to a 64-bit int
7955bd8deadSopenharmony_ci      float64_t(int16_t)  // converts a 16-bit int value to a 64-bit float
7965bd8deadSopenharmony_ci      uint16_t(bool)      // converts a Boolean value to a 16-bit uint
7975bd8deadSopenharmony_ci
7985bd8deadSopenharmony_ci    (replace final two paragraphs, p. 49, and the first paragraph, p. 50,
7995bd8deadSopenharmony_ci    using more general language)
8005bd8deadSopenharmony_ci
8015bd8deadSopenharmony_ci    When constructors are used to convert any floating-point type to any
8025bd8deadSopenharmony_ci    integer type, the fractional part of the floating-point value is dropped.
8035bd8deadSopenharmony_ci    It is undefined to convert a negative floating point value to an unsigned
8045bd8deadSopenharmony_ci    integer type.
8055bd8deadSopenharmony_ci
8065bd8deadSopenharmony_ci    When a constructor is used to convert any integer or floating-point type
8075bd8deadSopenharmony_ci    to bool, 0 and 0.0 are converted to false, and non-zero values are
8085bd8deadSopenharmony_ci    converted to true.  When a constructor is used to convert a bool to any
8095bd8deadSopenharmony_ci    integer or floating-point type, false is converted to 0 or 0.0, and true
8105bd8deadSopenharmony_ci    is converted to 1 or 1.0.
8115bd8deadSopenharmony_ci
8125bd8deadSopenharmony_ci    Constructors converting between signed and unsigned integers with the same
8135bd8deadSopenharmony_ci    bit count always preserve the bit pattern of the input.  This will change
8145bd8deadSopenharmony_ci    the value of the argument if its most significant bit is set, converting a
8155bd8deadSopenharmony_ci    negative signed integer to a large unsigned integer, or vice versa.
8165bd8deadSopenharmony_ci
8175bd8deadSopenharmony_ci
8185bd8deadSopenharmony_ci    Modify Section 5.9, Expressions, p. 57
8195bd8deadSopenharmony_ci
8205bd8deadSopenharmony_ci    (modify bulleted list as follows, adding support for expressions with
8215bd8deadSopenharmony_ci    64-bit integer types)
8225bd8deadSopenharmony_ci
8235bd8deadSopenharmony_ci    Expressions in the shading language are built from the following:
8245bd8deadSopenharmony_ci
8255bd8deadSopenharmony_ci    * Constants of type bool, int, int64_t, uint, uint64_t, float, all vector
8265bd8deadSopenharmony_ci      types, and all matrix types.
8275bd8deadSopenharmony_ci
8285bd8deadSopenharmony_ci    ...
8295bd8deadSopenharmony_ci
8305bd8deadSopenharmony_ci    * The arithmetic binary operators add (+), subtract (-), multiply (*), and
8315bd8deadSopenharmony_ci      divide (/) operate on 32-bit integer, 64-bit integer, and floating-point
8325bd8deadSopenharmony_ci      scalars, vectors, and matrices.  If the fundamental types of the
8335bd8deadSopenharmony_ci      operands do not match, the conversions from Section 4.1.10 "Implicit
8345bd8deadSopenharmony_ci      Conversions" are applied to produce matching types.  ...
8355bd8deadSopenharmony_ci
8365bd8deadSopenharmony_ci    * The operator modulus (%) operate on 32- and 64-bit integer scalars or
8375bd8deadSopenharmony_ci      vectors. If the fundamental types of the operands do not match, the
8385bd8deadSopenharmony_ci      conversions from Section 4.1.10 "Implicit Conversions" are applied to
8395bd8deadSopenharmony_ci      produce matching types.  ...
8405bd8deadSopenharmony_ci
8415bd8deadSopenharmony_ci    * The arithmetic unary operators negate (-), post- and pre-increment and
8425bd8deadSopenharmony_ci      decrement (-- and ++) operate on 32-bit integer, 64-bit integer, and
8435bd8deadSopenharmony_ci      floating-point values (including vectors and matrices). ...
8445bd8deadSopenharmony_ci
8455bd8deadSopenharmony_ci    * The relational operators greater than (>), less than (<), and less than
8465bd8deadSopenharmony_ci      or equal (<=) operate only on scalar 32-bit integer, 64-bit integer, and
8475bd8deadSopenharmony_ci      floating-point expressions.  The result is scalar Boolean.  The
8485bd8deadSopenharmony_ci      fundamental type of the two operands must match, either as specified, or
8495bd8deadSopenharmony_ci      after one of the implicit type conversions specified in Section 4.1.10.
8505bd8deadSopenharmony_ci      ...
8515bd8deadSopenharmony_ci
8525bd8deadSopenharmony_ci    * The equality operators equal (==), and not equal (!=) operate only on
8535bd8deadSopenharmony_ci      scalar 32-bit integer, 64-bit integer, and floating-point expressions.
8545bd8deadSopenharmony_ci      The result is scalar Boolean.  The fundamental type of the two operands
8555bd8deadSopenharmony_ci      must match, either as specified, or after one of the implicit type
8565bd8deadSopenharmony_ci      conversions specified in Section 4.1.10.  ...
8575bd8deadSopenharmony_ci
8585bd8deadSopenharmony_ci
8595bd8deadSopenharmony_ci    Modify Section 6.1, Function Definitions, p. 63
8605bd8deadSopenharmony_ci
8615bd8deadSopenharmony_ci    (ARB_gpu_shader5 adds a set of rules for defining whether implicit
8625bd8deadSopenharmony_ci    conversions for one matching function definition are better or worse than
8635bd8deadSopenharmony_ci    those for another.  These comparisons are done argument by argument.
8645bd8deadSopenharmony_ci    Extend the edits made by ARB_gpu_shader5 to add several new rules for
8655bd8deadSopenharmony_ci    comparing implicit conversions for a single argument, corresponding to the
8665bd8deadSopenharmony_ci    new data types introduced by this extension.)
8675bd8deadSopenharmony_ci
8685bd8deadSopenharmony_ci     To determine whether the conversion for a single argument in one match is
8695bd8deadSopenharmony_ci     better than that for another match, the following rules are applied, in
8705bd8deadSopenharmony_ci     order:
8715bd8deadSopenharmony_ci
8725bd8deadSopenharmony_ci       1.  An exact match is better than a match involving any implicit
8735bd8deadSopenharmony_ci           conversion.
8745bd8deadSopenharmony_ci
8755bd8deadSopenharmony_ci       2.  A match involving a conversion from a signed integer, unsigned
8765bd8deadSopenharmony_ci           integer, or floating-point type to a similar type having a larger
8775bd8deadSopenharmony_ci           number of bits is better a match not involving another conversion.
8785bd8deadSopenharmony_ci           The set of conversions qualifying under this rule are:
8795bd8deadSopenharmony_ci
8805bd8deadSopenharmony_ci            source types                destination types
8815bd8deadSopenharmony_ci            -----------------           -----------------
8825bd8deadSopenharmony_ci            int8_t, int16_t             int, int64_t
8835bd8deadSopenharmony_ci            int                         int64_t
8845bd8deadSopenharmony_ci            uint8_t, uint16_t           uint, uint64_t
8855bd8deadSopenharmony_ci            uint                        uint64_t
8865bd8deadSopenharmony_ci            float16_t                   float
8875bd8deadSopenharmony_ci            float                       double
8885bd8deadSopenharmony_ci
8895bd8deadSopenharmony_ci       3.  A match involving one conversion in rule 2 is better than a match
8905bd8deadSopenharmony_ci           involving another conversion in rule 2 if:
8915bd8deadSopenharmony_ci
8925bd8deadSopenharmony_ci            (a) both conversions start with the same type and the first
8935bd8deadSopenharmony_ci                conversion is to a type with a smaller number of bits (e.g.,
8945bd8deadSopenharmony_ci                converting from int16_t to int is preferred to converting
8955bd8deadSopenharmony_ci                int16_t to int64_t), or
8965bd8deadSopenharmony_ci
8975bd8deadSopenharmony_ci            (b) both conversions end with the same type and the first
8985bd8deadSopenharmony_ci                conversion is from a type with a larger number of bits (e.g.,
8995bd8deadSopenharmony_ci                converting an "out" parameter from int16_t to int is preferred
9005bd8deadSopenharmony_ci                to convering from int8_t to int).
9015bd8deadSopenharmony_ci
9025bd8deadSopenharmony_ci       4. A match involving an implicit conversion from any integer type to
9035bd8deadSopenharmony_ci          float is better than a match involving an implicit conversion from
9045bd8deadSopenharmony_ci          any integer type to double.
9055bd8deadSopenharmony_ci
9065bd8deadSopenharmony_ci
9075bd8deadSopenharmony_ci    Modify Section 7.1, Vertex and Geometry Shader Special Variables, p. 69
9085bd8deadSopenharmony_ci
9095bd8deadSopenharmony_ci    (NOTE:  These edits are written against the re-organized section in the
9105bd8deadSopenharmony_ci    ARB_tessellation_shader specification.)
9115bd8deadSopenharmony_ci
9125bd8deadSopenharmony_ci    (add to the list of built-ins inputs for geometry shaders) In the geometry
9135bd8deadSopenharmony_ci    language, built-in input and output variables are intrinsically declared
9145bd8deadSopenharmony_ci    as:
9155bd8deadSopenharmony_ci
9165bd8deadSopenharmony_ci      in int gl_PatchVerticesIn;
9175bd8deadSopenharmony_ci      patch in float gl_TessLevelOuter[4];
9185bd8deadSopenharmony_ci      patch in float gl_TessLevelInner[2];
9195bd8deadSopenharmony_ci
9205bd8deadSopenharmony_ci    ...
9215bd8deadSopenharmony_ci
9225bd8deadSopenharmony_ci    The input variable gl_PatchVerticesIn behaves as in the identically-named
9235bd8deadSopenharmony_ci    tessellation control and evaluation shader inputs.
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ci    The input variables gl_TessLevelOuter[] and gl_TessLevelInner[] behave as
9265bd8deadSopenharmony_ci    in the identically-named tessellation evaluation shader inputs.
9275bd8deadSopenharmony_ci
9285bd8deadSopenharmony_ci
9295bd8deadSopenharmony_ci    Modify Chapter 8, Built-in Functions, p. 81
9305bd8deadSopenharmony_ci
9315bd8deadSopenharmony_ci    (add to description of generic types, last paragraph of p. 69) ...  Where
9325bd8deadSopenharmony_ci    the input arguments (and corresponding output) can be int64_t, i64vec2,
9335bd8deadSopenharmony_ci    i64vec3, or i64vec4, <genI64Type> is used as the argument.  Where the
9345bd8deadSopenharmony_ci    input arguments (and corresponding output) can be uint64_t, u64vec2,
9355bd8deadSopenharmony_ci    u64vec3, or u64vec4, <genU64Type> is used as the argument.
9365bd8deadSopenharmony_ci
9375bd8deadSopenharmony_ci
9385bd8deadSopenharmony_ci    Modify Section 8.3, Common Functions, p. 84
9395bd8deadSopenharmony_ci
9405bd8deadSopenharmony_ci    (add support for 64-bit integer packing and unpacking functions)
9415bd8deadSopenharmony_ci
9425bd8deadSopenharmony_ci    Syntax:
9435bd8deadSopenharmony_ci
9445bd8deadSopenharmony_ci      int64_t  packInt2x32(ivec2 v);
9455bd8deadSopenharmony_ci      uint64_t packUint2x32(uvec2 v);
9465bd8deadSopenharmony_ci
9475bd8deadSopenharmony_ci      ivec2  unpackInt2x32(int64_t v);
9485bd8deadSopenharmony_ci      uvec2  unpackUint2x32(uint64_t v);
9495bd8deadSopenharmony_ci
9505bd8deadSopenharmony_ci    The functions packInt2x32() and packUint2x32() return a signed or unsigned
9515bd8deadSopenharmony_ci    64-bit integer obtained by packing the components of a two-component
9525bd8deadSopenharmony_ci    signed or unsigned integer vector, respectively.  The first vector
9535bd8deadSopenharmony_ci    component specifies the 32 least significant bits; the second component
9545bd8deadSopenharmony_ci    specifies the 32 most significant bits.
9555bd8deadSopenharmony_ci
9565bd8deadSopenharmony_ci    The functions unpackInt2x32() and unpackUint2x32() return a signed or
9575bd8deadSopenharmony_ci    unsigned integer vector built from a 64-bit signed or unsigned integer
9585bd8deadSopenharmony_ci    scalar, respectively.  The first component of the vector contains the 32
9595bd8deadSopenharmony_ci    least significant bits of the input; the second component consists the 32
9605bd8deadSopenharmony_ci    most significant bits.
9615bd8deadSopenharmony_ci
9625bd8deadSopenharmony_ci
9635bd8deadSopenharmony_ci    (add support for 16-bit floating-point packing and unpacking functions)
9645bd8deadSopenharmony_ci
9655bd8deadSopenharmony_ci    Syntax:
9665bd8deadSopenharmony_ci
9675bd8deadSopenharmony_ci      uint      packFloat2x16(f16vec2 v);
9685bd8deadSopenharmony_ci      f16vec2   unpackFloat2x16(uint v);
9695bd8deadSopenharmony_ci
9705bd8deadSopenharmony_ci    The function packFloat2x16() returns an unsigned integer obtained by
9715bd8deadSopenharmony_ci    interpreting the components of a two-component 16-bit floating-point
9725bd8deadSopenharmony_ci    vector as integers according to OpenGL Specification, and then packing the
9735bd8deadSopenharmony_ci    two 16-bit integers into a 32-bit unsigned integer.  The first vector
9745bd8deadSopenharmony_ci    component specifies the 16 least significant bits of the result; the
9755bd8deadSopenharmony_ci    second component specifies the 16 most significant bits.
9765bd8deadSopenharmony_ci
9775bd8deadSopenharmony_ci    The function unpackFloat2x16() returns a two-component vector with 16-bit
9785bd8deadSopenharmony_ci    floating-point components obtained by unpacking a 32-bit unsigned integer
9795bd8deadSopenharmony_ci    into a pair of 16-bit values, and interpreting those values as 16-bit
9805bd8deadSopenharmony_ci    floating-point numbers according to the OpenGL Specification.  The first
9815bd8deadSopenharmony_ci    component of the vector is obtained from the 16 least significant bits of
9825bd8deadSopenharmony_ci    the input; the second component is obtained from the 16 most significant
9835bd8deadSopenharmony_ci    bits.
9845bd8deadSopenharmony_ci
9855bd8deadSopenharmony_ci
9865bd8deadSopenharmony_ci    (add functions to get/set the bit encoding for floating-point values)
9875bd8deadSopenharmony_ci
9885bd8deadSopenharmony_ci    64-bit floating-point data types in the OpenGL shading language are
9895bd8deadSopenharmony_ci    specified to be encoded according to the IEEE specification for
9905bd8deadSopenharmony_ci    double-precision floating-point values.  The functions below allow shaders
9915bd8deadSopenharmony_ci    to convert double-precision floating-point values to and from 64-bit
9925bd8deadSopenharmony_ci    signed or unsigned integers representing their encoding.
9935bd8deadSopenharmony_ci
9945bd8deadSopenharmony_ci    To obtain signed or unsigned integer values holding the encoding of a
9955bd8deadSopenharmony_ci    floating-point value, use:
9965bd8deadSopenharmony_ci
9975bd8deadSopenharmony_ci      genI64Type doubleBitsToInt64(genDType value);
9985bd8deadSopenharmony_ci      genU64Type doubleBitsToUint64(genDType value);
9995bd8deadSopenharmony_ci
10005bd8deadSopenharmony_ci    Conversions are done on a component-by-component basis.
10015bd8deadSopenharmony_ci
10025bd8deadSopenharmony_ci    To obtain a floating-point value corresponding to a signed or unsigned
10035bd8deadSopenharmony_ci    integer encoding, use:
10045bd8deadSopenharmony_ci
10055bd8deadSopenharmony_ci      genDType int64BitsToDouble(genI64Type value);
10065bd8deadSopenharmony_ci      genDType uint64BitsToDouble(genU64Type value);
10075bd8deadSopenharmony_ci
10085bd8deadSopenharmony_ci
10095bd8deadSopenharmony_ci    (add functions to evaluate predicates over groups of threads)
10105bd8deadSopenharmony_ci
10115bd8deadSopenharmony_ci    Syntax:
10125bd8deadSopenharmony_ci
10135bd8deadSopenharmony_ci      bool anyThreadNV(bool value);
10145bd8deadSopenharmony_ci      bool allThreadsNV(bool value);
10155bd8deadSopenharmony_ci      bool allThreadsEqualNV(bool value);
10165bd8deadSopenharmony_ci
10175bd8deadSopenharmony_ci    Implementations of the OpenGL Shading Language may, but are not required,
10185bd8deadSopenharmony_ci    to run multiple shader threads for a single stage as a SIMD thread group,
10195bd8deadSopenharmony_ci    where individual execution threads are assigned to thread groups in an
10205bd8deadSopenharmony_ci    undefined, implementation-dependent order.  Algorithms may benefit from
10215bd8deadSopenharmony_ci    being able to evaluate a composite of boolean values over all active
10225bd8deadSopenharmony_ci    threads in the thread group.
10235bd8deadSopenharmony_ci
10245bd8deadSopenharmony_ci    The function anyThreadNV() returns true if and only if <value> is true for
10255bd8deadSopenharmony_ci    at least one active thread in the group.  The function allThreadsNV()
10265bd8deadSopenharmony_ci    returns true if and only if <value> is true for all active threads in the
10275bd8deadSopenharmony_ci    group.  The function allThreadsEqualNV() returns true if <value> is the
10285bd8deadSopenharmony_ci    same for all active threads in the group; the result of
10295bd8deadSopenharmony_ci    allThreadsEqualNV() will be true if and only if anyThreadNV() and
10305bd8deadSopenharmony_ci    allThreadsNV() would return the same value.
10315bd8deadSopenharmony_ci
10325bd8deadSopenharmony_ci    Since these functions depends on the values of <value> in an undefined
10335bd8deadSopenharmony_ci    group of threads, the value returned by these functions is largely
10345bd8deadSopenharmony_ci    undefined.  However, anyThreadNV() is guaranteed to return true if <value>
10355bd8deadSopenharmony_ci    is true, and allThreadsNV() is guaranteed to return false if <value> is
10365bd8deadSopenharmony_ci    false.
10375bd8deadSopenharmony_ci
10385bd8deadSopenharmony_ci    Since implementations are generally not required to combine threads into
10395bd8deadSopenharmony_ci    groups, simply returning <value> for anyThreadNV() and allThreadsNV() and
10405bd8deadSopenharmony_ci    returning true for allThreadsEqualNV() is a legal implementation of these
10415bd8deadSopenharmony_ci    functions.
10425bd8deadSopenharmony_ci
10435bd8deadSopenharmony_ci
10445bd8deadSopenharmony_ci    Modify Section 8.6, Vector Relational Functions, p. 90
10455bd8deadSopenharmony_ci
10465bd8deadSopenharmony_ci    (modify the first paragraph, p. 90, adding support for relational
10475bd8deadSopenharmony_ci    functions operating on explicitly-sized types)
10485bd8deadSopenharmony_ci
10495bd8deadSopenharmony_ci    Relational and equality operators (<, <=, >, >=, ==, !=) are defined (or
10505bd8deadSopenharmony_ci    reserved) to operate on scalars and produce scalar Boolean results.  For
10515bd8deadSopenharmony_ci    vector results, use the following built-in functions.  In the definitions
10525bd8deadSopenharmony_ci    below, the following terms are used as placeholders for all vector types
10535bd8deadSopenharmony_ci    for a given fundamental data type:
10545bd8deadSopenharmony_ci
10555bd8deadSopenharmony_ci        placeholder     fundamental types
10565bd8deadSopenharmony_ci        -----------     ------------------------------------------------
10575bd8deadSopenharmony_ci        bvec            bvec2, bvec3, bvec4
10585bd8deadSopenharmony_ci
10595bd8deadSopenharmony_ci        ivec            ivec2, ivec3, ivec4, i8vec2, i8vec3, i8vec4,
10605bd8deadSopenharmony_ci                        i16vec2, i16vec3, i16vec4, i64vec2, i64vec3, i64vec4
10615bd8deadSopenharmony_ci
10625bd8deadSopenharmony_ci        uvec            uvec2, uvec3, uvec4, u8vec2, u8vec3, u8vec4,
10635bd8deadSopenharmony_ci                        u16vec2, u16vec3, u16vec4, u64vec2, u64vec3, u64vec4
10645bd8deadSopenharmony_ci
10655bd8deadSopenharmony_ci        vec             vec2, vec3, vec4, dvec2(*), dvec3(*), dvec4(*),
10665bd8deadSopenharmony_ci                        f16vec2, f16vec3, f16vec4
10675bd8deadSopenharmony_ci
10685bd8deadSopenharmony_ci        (*) only if ARB_gpu_shader_fp64 is supported
10695bd8deadSopenharmony_ci
10705bd8deadSopenharmony_ci    In all cases, the sizes of the input and return vectors for any
10715bd8deadSopenharmony_ci    particular call must match.
10725bd8deadSopenharmony_ci
10735bd8deadSopenharmony_ci
10745bd8deadSopenharmony_ci    Modify Section 8.7, Texture Lookup Functions, p. 91
10755bd8deadSopenharmony_ci
10765bd8deadSopenharmony_ci    (modify text for textureOffset() functions, p. 94, allowing non-constant
10775bd8deadSopenharmony_ci    offsets)
10785bd8deadSopenharmony_ci
10795bd8deadSopenharmony_ci    Do a texture lookup as in texture but with offset added to the (u,v,w)
10805bd8deadSopenharmony_ci    texel coordinates before looking up each texel.  The value <offset> need
10815bd8deadSopenharmony_ci    not be constant; however, a limited range of offset values are supported.
10825bd8deadSopenharmony_ci    If any component of <offset> is less than MIN_PROGRAM_TEXEL_OFFSET_EXT or
10835bd8deadSopenharmony_ci    greater than MAX_PROGRAM_TEXEL_OFFSET_EXT, the offset applied to the
10845bd8deadSopenharmony_ci    texture coordinates is undefined.  Note that offset does not apply to the
10855bd8deadSopenharmony_ci    layer coordinate for texture arrays. This is explained in detail in
10865bd8deadSopenharmony_ci    section 3.9.9 of the OpenGL Specification (Version 3.2, Compatibility
10875bd8deadSopenharmony_ci    Profile), where offset is (delta_u, delta_v, delta_w).  Note that texel
10885bd8deadSopenharmony_ci    offsets are also not supported for cube maps.
10895bd8deadSopenharmony_ci
10905bd8deadSopenharmony_ci    (Note:  This lifting of the constant offset restriction also applies to
10915bd8deadSopenharmony_ci    texelFetchOffset, p. 95, textureProjOffset, p. 95, textureLodOffset,
10925bd8deadSopenharmony_ci    p. 96, textureProjLodOffset, p. 96.)
10935bd8deadSopenharmony_ci
10945bd8deadSopenharmony_ci
10955bd8deadSopenharmony_ci    (modify the description of the textureGradOffset() functions, p. 97,
10965bd8deadSopenharmony_ci    preserving the restriction on constant offsets)
10975bd8deadSopenharmony_ci
10985bd8deadSopenharmony_ci    Do a texture lookup with both explicit gradient and offset, as described
10995bd8deadSopenharmony_ci    in textureGrad and textureOffset.  For these functions, the offset value
11005bd8deadSopenharmony_ci    must be a constant expression.  A limited range of offset values are
11015bd8deadSopenharmony_ci    supported; the minimum and maximum offset values are
11025bd8deadSopenharmony_ci    implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET and
11035bd8deadSopenharmony_ci    MAX_PROGRAM_TEXEL_OFFSET, respectively.
11045bd8deadSopenharmony_ci
11055bd8deadSopenharmony_ci
11065bd8deadSopenharmony_ci    (modify the description of the textureProjGradOffset() functions,
11075bd8deadSopenharmony_ci    p. 98, preserving the restriction on constant offsets)
11085bd8deadSopenharmony_ci
11095bd8deadSopenharmony_ci    Do a texture lookup projectively and with explicit gradient as described
11105bd8deadSopenharmony_ci    in textureProjGrad, as well as with offset, as described in textureOffset.
11115bd8deadSopenharmony_ci    For these functions, the offset value must be a constant expression.  A
11125bd8deadSopenharmony_ci    limited range of offset values are supported; the minimum and maximum
11135bd8deadSopenharmony_ci    offset values are implementation-dependent and given by
11145bd8deadSopenharmony_ci    MIN_PROGRAM_TEXEL_OFFSET and MAX_PROGRAM_TEXEL_OFFSET, respectively.
11155bd8deadSopenharmony_ci
11165bd8deadSopenharmony_ci    (modify the description of the textureGatherOffsets() functions,
11175bd8deadSopenharmony_ci     added in ARB_gpu_shader5, to remove the restriction on constant offsets)
11185bd8deadSopenharmony_ci
11195bd8deadSopenharmony_ci    The textureGatherOffsets() functions operate identically ...
11205bd8deadSopenharmony_ci    selecting the texel T_i0_j0 of that footprint.  The specified values in
11215bd8deadSopenharmony_ci    <offsets> need not be constant.  A limited range of ...
11225bd8deadSopenharmony_ci
11235bd8deadSopenharmony_ci    Modify Section 9, Shading Language Grammar, p. 92
11245bd8deadSopenharmony_ci
11255bd8deadSopenharmony_ci    !!! TBD !!!
11265bd8deadSopenharmony_ci
11275bd8deadSopenharmony_ci
11285bd8deadSopenharmony_ciGLX Protocol
11295bd8deadSopenharmony_ci
11305bd8deadSopenharmony_ci    TBD
11315bd8deadSopenharmony_ci
11325bd8deadSopenharmony_ciInteractions with OpenGL ES 3.1
11335bd8deadSopenharmony_ci
11345bd8deadSopenharmony_ci    If implemented in OpenGL ES, NV_gpu_shader5 acts as a superset
11355bd8deadSopenharmony_ci    of functionality provided by OES_gpu_shader5.
11365bd8deadSopenharmony_ci
11375bd8deadSopenharmony_ci    A shader that enables this extension
11385bd8deadSopenharmony_ci    via an #extension directive also implicitly enables the common
11395bd8deadSopenharmony_ci    capabilities provided by OES_gpu_shader5.
11405bd8deadSopenharmony_ci
11415bd8deadSopenharmony_ci    Replace references to ARB_gpu_shader5 with OES_gpu_shader5 and
11425bd8deadSopenharmony_ci    EXT_shader_implicit_conversions (as appropriate).
11435bd8deadSopenharmony_ci    Replace references to ARB_geometry_shader with OES/EXT_geometry_shader.
11445bd8deadSopenharmony_ci    Replace references to ARB_tessellation_shader with OES/EXT_tessellation_shader.
11455bd8deadSopenharmony_ci
11465bd8deadSopenharmony_ci    Replace references to int64EXT and uint64EXT with int64 and uint64,
11475bd8deadSopenharmony_ci    respectively.
11485bd8deadSopenharmony_ci
11495bd8deadSopenharmony_ci    The specification should be edited as follows to include new
11505bd8deadSopenharmony_ci    ProgramUniform* functions.
11515bd8deadSopenharmony_ci
11525bd8deadSopenharmony_ci    (modify the ProgramUniform* language)
11535bd8deadSopenharmony_ci
11545bd8deadSopenharmony_ci    The following commands:
11555bd8deadSopenharmony_ci
11565bd8deadSopenharmony_ci        ....
11575bd8deadSopenharmony_ci        void ProgramUniform{1,2,3,4}{i64,ui64}NV
11585bd8deadSopenharmony_ci            (uint program int location, T value);
11595bd8deadSopenharmony_ci        void ProgramUniform{1,2,3,4}{i64,ui64}vNV
11605bd8deadSopenharmony_ci            (uint program, int location, const T *value);
11615bd8deadSopenharmony_ci
11625bd8deadSopenharmony_ci    operate identically to the corresponding command where "Program" is
11635bd8deadSopenharmony_ci    deleted from the name (and extension suffixes are dropped or updated
11645bd8deadSopenharmony_ci    appropriately) except, rather than updating the currently active program
11655bd8deadSopenharmony_ci    object, these "Program" commands update the program object named by the
11665bd8deadSopenharmony_ci    <program> parameter.  ...
11675bd8deadSopenharmony_ci
11685bd8deadSopenharmony_ci    Changes to Section 2.6.1 "Begin and End" don't apply.
11695bd8deadSopenharmony_ci
11705bd8deadSopenharmony_ci    Disregard introduction of 64bit -integer or -floating point vertex
11715bd8deadSopenharmony_ci    attribute types.
11725bd8deadSopenharmony_ci
11735bd8deadSopenharmony_ciInteractions with OpenGL ES Shading Language 3.10, revision 3
11745bd8deadSopenharmony_ci
11755bd8deadSopenharmony_ci    If implemented in GLSL ES, NV_gpu_shader5 acts as a superset
11765bd8deadSopenharmony_ci    of functionality provided by OES_gpu_shader5 and
11775bd8deadSopenharmony_ci    EXT_shader_implicit_conversions.
11785bd8deadSopenharmony_ci
11795bd8deadSopenharmony_ci    A shader that enables this extension via an #extension directive
11805bd8deadSopenharmony_ci    also implicitly enables the common capabilities provided by
11815bd8deadSopenharmony_ci    OES_gpu_shader5 and EXT_shader_implicit_conversions.
11825bd8deadSopenharmony_ci
11835bd8deadSopenharmony_ci    Replace references to ARB_tessellation_shader with OES/EXT_tessellation_shader.
11845bd8deadSopenharmony_ci
11855bd8deadSopenharmony_ci    Implicit conversion between GLSL ES types are introduced by
11865bd8deadSopenharmony_ci    EXT_shader_implicit_conversions instead of ARB_gpu_shader5.
11875bd8deadSopenharmony_ci
11885bd8deadSopenharmony_ci    Disregard the notion of 'double' types as vertex shader inputs.
11895bd8deadSopenharmony_ci
11905bd8deadSopenharmony_ci    Section 4.1.7.2 "Images"
11915bd8deadSopenharmony_ci        Remove the third sentence restricts
11925bd8deadSopenharmony_ci        access to arrays of images to constant integral expression.
11935bd8deadSopenharmony_ci
11945bd8deadSopenharmony_ci        This essentially leaves it to the 'dynamically uniform integral
11955bd8deadSopenharmony_ci        expressions' default as OES_gpu_shader5 introduced.
11965bd8deadSopenharmony_ci
11975bd8deadSopenharmony_ci    Modify Section 4.3.9 "Interface Blocks", as modified OES_gpu_shader5
11985bd8deadSopenharmony_ci
11995bd8deadSopenharmony_ci        NV_gpu_shader5 also lifts OES_gpu_shader5 restrictions with
12005bd8deadSopenharmony_ci        regard to indexing into arrays of uniforms blocks and shader
12015bd8deadSopenharmony_ci        storage blocks.
12025bd8deadSopenharmony_ci
12035bd8deadSopenharmony_ci        Change sentence
12045bd8deadSopenharmony_ci        "All indices used to index a shader storage block array must be
12055bd8deadSopenharmony_ci         constant integral expressions. A uniform block array can only
12065bd8deadSopenharmony_ci         be indexed with a dynamically uniform integral expression,
12075bd8deadSopenharmony_ci         otherwise results are undefined." into
12085bd8deadSopenharmony_ci
12095bd8deadSopenharmony_ci        "Arbitrary indices may be used to index a uniform block array;
12105bd8deadSopenharmony_ci         integral constant expressions are not required. If the index
12115bd8deadSopenharmony_ci         used to access an array of uniform blocks is out-of-bounds,
12125bd8deadSopenharmony_ci         the results of the access are undefined."
12135bd8deadSopenharmony_ci
12145bd8deadSopenharmony_ci        Indexing into arrays  of shader storage blocks defaults to
12155bd8deadSopenharmony_ci        'dynamically uniform integral expressions'.
12165bd8deadSopenharmony_ci
12175bd8deadSopenharmony_ci    Changes to Section 4.3.9, p.48 "Interface Blocks"
12185bd8deadSopenharmony_ci
12195bd8deadSopenharmony_ci        Replace the sentence
12205bd8deadSopenharmony_ci        "All indices used to index a shader storage block array must be
12215bd8deadSopenharmony_ci         constant integral expressions. A uniform block array can only
12225bd8deadSopenharmony_ci         be indexed with a dynamically uniform integral expression,
12235bd8deadSopenharmony_ci         otherwise results are undefined."
12245bd8deadSopenharmony_ci        with
12255bd8deadSopenharmony_ci        "Arbitrary indices may be used to index a uniform block array;
12265bd8deadSopenharmony_ci         integral constant expressions are not required. If the index
12275bd8deadSopenharmony_ci         used to access an array of uniform blocks is out-of-bounds, the
12285bd8deadSopenharmony_ci         results of the access are undefined."
12295bd8deadSopenharmony_ci
12305bd8deadSopenharmony_ci    4.4.1.1 "Compute Shader Inputs" change
12315bd8deadSopenharmony_ci
12325bd8deadSopenharmony_ci        "layout-qualifier-id:
12335bd8deadSopenharmony_ci            local_size_x = integer-constant
12345bd8deadSopenharmony_ci            local_size_y = integer-constant
12355bd8deadSopenharmony_ci            local_size_z = integer-constant" into
12365bd8deadSopenharmony_ci
12375bd8deadSopenharmony_ci        "layout-qualifier-id:
12385bd8deadSopenharmony_ci            local_size_x = integer-constant-expression
12395bd8deadSopenharmony_ci            local_size_y = integer-constant-expression
12405bd8deadSopenharmony_ci            local_size_z = integer-constant-expression"
12415bd8deadSopenharmony_ci
12425bd8deadSopenharmony_ci    Section 4.4.1.gs "Geometry Shader Inputs" change
12435bd8deadSopenharmony_ci
12445bd8deadSopenharmony_ci        "<layout-qualifier-id>
12455bd8deadSopenharmony_ci            ...
12465bd8deadSopenharmony_ci            invocations = integer-constant"  into
12475bd8deadSopenharmony_ci
12485bd8deadSopenharmony_ci        "<layout-qualifier-id>
12495bd8deadSopenharmony_ci            ...
12505bd8deadSopenharmony_ci            invocations = integer-constant-expression"
12515bd8deadSopenharmony_ci
12525bd8deadSopenharmony_ci    Section 4.4.2 "Output Layout Qualifiers" change
12535bd8deadSopenharmony_ci
12545bd8deadSopenharmony_ci        "layout-qualifier-id:
12555bd8deadSopenharmony_ci            location = integer-constant" into
12565bd8deadSopenharmony_ci
12575bd8deadSopenharmony_ci        "layout-qualifier-id:
12585bd8deadSopenharmony_ci            location = integer-constant-expression"
12595bd8deadSopenharmony_ci
12605bd8deadSopenharmony_ci    Section 4.4.2.ts "Tessellation Control Outputs" change
12615bd8deadSopenharmony_ci
12625bd8deadSopenharmony_ci        "layout-qualifier-id
12635bd8deadSopenharmony_ci            vertices = integer-constant"  into
12645bd8deadSopenharmony_ci
12655bd8deadSopenharmony_ci        "layout-qualifier-id:
12665bd8deadSopenharmony_ci            vertices = integer-constant-expression"
12675bd8deadSopenharmony_ci
12685bd8deadSopenharmony_ci    Section 4.4.3 "Uniform Variable Layout Qualifiers" change
12695bd8deadSopenharmony_ci
12705bd8deadSopenharmony_ci        "layout-qualifier-id:
12715bd8deadSopenharmony_ci            location = integer-constant" into
12725bd8deadSopenharmony_ci
12735bd8deadSopenharmony_ci        "layout-qualifier-id:
12745bd8deadSopenharmony_ci            location = integer-constant-expression"
12755bd8deadSopenharmony_ci
12765bd8deadSopenharmony_ci    Section 4.4.4 "Uniform and Shader Storage Block Layout Qualifiers" change
12775bd8deadSopenharmony_ci
12785bd8deadSopenharmony_ci        "layout-qualifier-id:
12795bd8deadSopenharmony_ci            ...
12805bd8deadSopenharmony_ci            binding = integer-constant" into
12815bd8deadSopenharmony_ci
12825bd8deadSopenharmony_ci        "layout-qualifier-id:
12835bd8deadSopenharmony_ci            ...
12845bd8deadSopenharmony_ci            binding = integer-constant-expression"
12855bd8deadSopenharmony_ci
12865bd8deadSopenharmony_ci    Section 4.4.5 "Opaque Uniform Layout Qualifiers" change
12875bd8deadSopenharmony_ci
12885bd8deadSopenharmony_ci        "layout-qualifier-id:
12895bd8deadSopenharmony_ci            binding = integer-constant" into
12905bd8deadSopenharmony_ci
12915bd8deadSopenharmony_ci        "layout-qualifier-id:
12925bd8deadSopenharmony_ci            binding = integer-constant-expression"
12935bd8deadSopenharmony_ci
12945bd8deadSopenharmony_ci    Change sentence
12955bd8deadSopenharmony_ci        "A link-time error will result if two shaders in a program
12965bd8deadSopenharmony_ci         specify different integer-constant bindings for the same
12975bd8deadSopenharmony_ci         opaque-uniform name." into
12985bd8deadSopenharmony_ci
12995bd8deadSopenharmony_ci         "A link-time error will result if two shaders in a program
13005bd8deadSopenharmony_ci          specify different bindings for the same opaque-uniform
13015bd8deadSopenharmony_ci          name."
13025bd8deadSopenharmony_ci
13035bd8deadSopenharmony_ci    Section 4.4.6 "Atomic Counter Layout Qualifiers" change
13045bd8deadSopenharmony_ci
13055bd8deadSopenharmony_ci        "layout-qualifier-id:
13065bd8deadSopenharmony_ci            binding = integer-constant
13075bd8deadSopenharmony_ci             offset = integer-constant" into
13085bd8deadSopenharmony_ci
13095bd8deadSopenharmony_ci        "layout-qualifier-id:
13105bd8deadSopenharmony_ci            binding = integer-constant-expression
13115bd8deadSopenharmony_ci             offset = integer-constant-expression"
13125bd8deadSopenharmony_ci
13135bd8deadSopenharmony_ci    Section 4.4.7 "Format Layout Qualifiers" change
13145bd8deadSopenharmony_ci
13155bd8deadSopenharmony_ci        "layout-qualifier-id:
13165bd8deadSopenharmony_ci            ...
13175bd8deadSopenharmony_ci            binding = integer-constant" into
13185bd8deadSopenharmony_ci
13195bd8deadSopenharmony_ci        "layout-qualifier-id:
13205bd8deadSopenharmony_ci            ...
13215bd8deadSopenharmony_ci            binding = integer-constant-expression"
13225bd8deadSopenharmony_ci
13235bd8deadSopenharmony_ci    Section 4.7.3 "Precision Qualifiers"
13245bd8deadSopenharmony_ci
13255bd8deadSopenharmony_ci    After "Literal constants do not have precision qualifiers." add
13265bd8deadSopenharmony_ci    "Neither do explicitly sized types such as int8_t, uint32_t,
13275bd8deadSopenharmony_ci    float16_t etc."
13285bd8deadSopenharmony_ci
13295bd8deadSopenharmony_ciDependencies on OES_gpu_shader5
13305bd8deadSopenharmony_ci
13315bd8deadSopenharmony_ci    In addition to allowing arbitrary indexing arrays of samplers, this
13325bd8deadSopenharmony_ci    extension also lifts OES_gpu_shader5 restrictions for indexing
13335bd8deadSopenharmony_ci    arrays of images and shader storage blocks. Additionally, it allows
13345bd8deadSopenharmony_ci    usage of 'integer-constant-expressions' for layout qualifiers that
13355bd8deadSopenharmony_ci    formerly took 'integer-constant'.
13365bd8deadSopenharmony_ci
13375bd8deadSopenharmony_ci    In Section 'Overview': change the bullet point
13385bd8deadSopenharmony_ci
13395bd8deadSopenharmony_ci    "* the ability to aggregate samplers into arrays...."
13405bd8deadSopenharmony_ci
13415bd8deadSopenharmony_ci    to
13425bd8deadSopenharmony_ci
13435bd8deadSopenharmony_ci    "* the ability to index into arrays of samplers, uniforms and shader
13445bd8deadSopenharmony_ci       storage blocks with arbitrary expressions, and not require that
13455bd8deadSopenharmony_ci       non-constant indices be uniform across all shader invocations."
13465bd8deadSopenharmony_ci
13475bd8deadSopenharmony_ci    "* the ability to index into arrays of images using dynamically
13485bd8deadSopenharmony_ci       uniform integers."
13495bd8deadSopenharmony_ci
13505bd8deadSopenharmony_ci    "* the ability to use 'integer-constant-expressions' in place of
13515bd8deadSopenharmony_ci       'integer-constant' for layout qualifiers."
13525bd8deadSopenharmony_ci
13535bd8deadSopenharmony_ciDependencies on OES/EXT_tessellation_shader and OpenGL ES 3.2
13545bd8deadSopenharmony_ci
13555bd8deadSopenharmony_ci    If implemented in OpenGL ES 3.1 or earlier and
13565bd8deadSopenharmony_ci    OES/EXT_tessellation_shader is not supported, language introduced by
13575bd8deadSopenharmony_ci    this extension describing processing patches in geometry shaders,
13585bd8deadSopenharmony_ci    transform feedback, and rasterization should be removed.
13595bd8deadSopenharmony_ci
13605bd8deadSopenharmony_ci    If implemented in OpenGL ES 3.2 or implemented in
13615bd8deadSopenharmony_ci    OpenGL ES 3.1 and OES/EXT_tessellation_shader is supported:
13625bd8deadSopenharmony_ci      
13635bd8deadSopenharmony_ci    It is legal to send patches past the tessellation stage -- the
13645bd8deadSopenharmony_ci    following language from OES/EXT_tessellation_shader is removed:
13655bd8deadSopenharmony_ci
13665bd8deadSopenharmony_ci      Patch primitives are not supported by pipeline stages below the
13675bd8deadSopenharmony_ci      tessellation evaluation shader.
13685bd8deadSopenharmony_ci      
13695bd8deadSopenharmony_ci    It is legal to use a tessellation control shader without a tessellation
13705bd8deadSopenharmony_ci    evaluation shader.
13715bd8deadSopenharmony_ci    
13725bd8deadSopenharmony_ci    Remove from the bullet list describing reasons for link failure below the
13735bd8deadSopenharmony_ci    LinkProgram command on p. 70 (as modified by OES/EXT_tessellation_shader):
13745bd8deadSopenharmony_ci
13755bd8deadSopenharmony_ci      * the program is not separable and contains no object to form a
13765bd8deadSopenharmony_ci      tessellation evaluation shader; or
13775bd8deadSopenharmony_ci        
13785bd8deadSopenharmony_ci    Modify section 11.1.2.1, "Output Variables" on p. 262 (as modified
13795bd8deadSopenharmony_ci    by the OES/EXT_geometry_shader extension):
13805bd8deadSopenharmony_ci
13815bd8deadSopenharmony_ci    Into the paragraph starting with 
13825bd8deadSopenharmony_ci     "Each program object can specify a set of output variables from one
13835bd8deadSopenharmony_ci      shader to be recorded in transform feedback mode..."
13845bd8deadSopenharmony_ci    
13855bd8deadSopenharmony_ci    Insert after the tesselation evaluation shader bullet point: 
13865bd8deadSopenharmony_ci      * tesselation control shader 
13875bd8deadSopenharmony_ci        
13885bd8deadSopenharmony_ci       
13895bd8deadSopenharmony_ci    Modify section 11.1.3.11, "Validation" to replace the bullet point
13905bd8deadSopenharmony_ci    starting with "One but not both of the tessellation..." on p. 271
13915bd8deadSopenharmony_ci
13925bd8deadSopenharmony_ci      * the tessellation evaluation but not tessellation control stage 
13935bd8deadSopenharmony_ci        has an active program with corresponding executable shader.
13945bd8deadSopenharmony_ci
13955bd8deadSopenharmony_ci
13965bd8deadSopenharmony_ci    Modify section 11.1ts, "Tessellation" 
13975bd8deadSopenharmony_ci
13985bd8deadSopenharmony_ci    Replace
13995bd8deadSopenharmony_ci      "Tessellation is considered active if and only if the active
14005bd8deadSopenharmony_ci      program object or program pipeline object includes both a
14015bd8deadSopenharmony_ci      tessellation control shader and a tessellation evaluation shader."
14025bd8deadSopenharmony_ci    with
14035bd8deadSopenharmony_ci      "Tessellation is considered active if and only if the active
14045bd8deadSopenharmony_ci      program object or program pipeline object includes a tessellation
14055bd8deadSopenharmony_ci      control shader."
14065bd8deadSopenharmony_ci
14075bd8deadSopenharmony_ci    Replace
14085bd8deadSopenharmony_ci      "An INVALID_OPERATION error is generated by any command that
14095bd8deadSopenharmony_ci      transfers vertices to the GL if the current program state has one
14105bd8deadSopenharmony_ci      but not both of a tessellation control shader and tessellation
14115bd8deadSopenharmony_ci      evaluation shader."
14125bd8deadSopenharmony_ci    with
14135bd8deadSopenharmony_ci      "An INVALID_OPERATION error is generated by any command that
14145bd8deadSopenharmony_ci      transfers vertices to the GL if the current program state has a
14155bd8deadSopenharmony_ci      tessellation evaluation shader but not a tessellation control
14165bd8deadSopenharmony_ci      shader."
14175bd8deadSopenharmony_ci      
14185bd8deadSopenharmony_ci    Modify section 12.1.2 "Transform Feedback Primitive Capture"
14195bd8deadSopenharmony_ci    
14205bd8deadSopenharmony_ci    Replace the second paragraph of the section on p. 274 (as modified
14215bd8deadSopenharmony_ci    by OES/EXT_tessellation_shader):
14225bd8deadSopenharmony_ci
14235bd8deadSopenharmony_ci    The data captured in transform feedback mode depends on the active
14245bd8deadSopenharmony_ci    programs on each of the shader stages. If a program is active for the
14255bd8deadSopenharmony_ci    geometry shader stage, transform feedback captures the vertices of each
14265bd8deadSopenharmony_ci    primitive emitted by the geometry shader. Otherwise, if a program is
14275bd8deadSopenharmony_ci    active for the tessellation evaluation shader stage, transform feedback
14285bd8deadSopenharmony_ci    captures each primitive produced by the tessellation primitive generator,
14295bd8deadSopenharmony_ci    whose vertices are processed by the tessellation evaluation shader.
14305bd8deadSopenharmony_ci    Otherwise, if a program is active for the tessellation control shader stage,
14315bd8deadSopenharmony_ci    transform feedback captures each output patch of that stage.
14325bd8deadSopenharmony_ci    Otherwise, transform feedback captures each primitive processed by the
14335bd8deadSopenharmony_ci    vertex shader.
14345bd8deadSopenharmony_ci
14355bd8deadSopenharmony_ci    Modify the second paragraph following ResumeTransformFeedback on p. 277
14365bd8deadSopenharmony_ci    (as modified by OES/EXT_tessellation_shader):
14375bd8deadSopenharmony_ci
14385bd8deadSopenharmony_ci    When transform feedback is active and not paused ... If a tessellation
14395bd8deadSopenharmony_ci    or geometry shader is active, the type of primitive emitted
14405bd8deadSopenharmony_ci    by that shader is used instead of the <mode> parameter passed to drawing
14415bd8deadSopenharmony_ci    commands for the purposes of this error check. If tessellation
14425bd8deadSopenharmony_ci    and geometry shaders are both active, the output primitive
14435bd8deadSopenharmony_ci    type of the geometry shader will be used for the purposes of this error.
14445bd8deadSopenharmony_ci    Any primitive type may be used while transform feedback is paused.
14455bd8deadSopenharmony_ci
14465bd8deadSopenharmony_ci
14475bd8deadSopenharmony_ci    Modify section 13.3, "Points"
14485bd8deadSopenharmony_ci
14495bd8deadSopenharmony_ci    After 
14505bd8deadSopenharmony_ci      "The point size is determined by the last active stage before the
14515bd8deadSopenharmony_ci      rasterizer:"
14525bd8deadSopenharmony_ci      
14535bd8deadSopenharmony_ci    Add a new bullet point to the list, between the
14545bd8deadSopenharmony_ci    tessellation evaluation shader and the vertex shader:
14555bd8deadSopenharmony_ci
14565bd8deadSopenharmony_ci      * the tessellation control shader, if active and no tessellation
14575bd8deadSopenharmony_ci        evaluation shader is active;
14585bd8deadSopenharmony_ci    
14595bd8deadSopenharmony_ciDependencies on OES/EXT_geometry_shader
14605bd8deadSopenharmony_ci
14615bd8deadSopenharmony_ci    If implemented in GLSL ES and OES/EXT_geometry_shader is not supported,
14625bd8deadSopenharmony_ci    disregard all changes to geometry shader related functionality.
14635bd8deadSopenharmony_ci
14645bd8deadSopenharmony_ciDependencies on ARB_gpu_shader5
14655bd8deadSopenharmony_ci
14665bd8deadSopenharmony_ci    This extension also incorporates all the changes to the OpenGL Shading
14675bd8deadSopenharmony_ci    Language made by ARB_gpu_shader5; enabling this extension by a #extension
14685bd8deadSopenharmony_ci    directive in shader code also enables all features of ARB_gpu_shader5 as
14695bd8deadSopenharmony_ci    though the shader code has also declared
14705bd8deadSopenharmony_ci
14715bd8deadSopenharmony_ci      #extension GL_ARB_gpu_shader5 : enable
14725bd8deadSopenharmony_ci
14735bd8deadSopenharmony_ci    The converse is not true; implementations supporting both extensions
14745bd8deadSopenharmony_ci    should not provide the shading language features in this extension if
14755bd8deadSopenharmony_ci    shader code #extension directives enable only ARB_gpu_shader5.
14765bd8deadSopenharmony_ci
14775bd8deadSopenharmony_ci    This specification and ARB_gpu_shader5 both lift the restriction in GLSL
14785bd8deadSopenharmony_ci    1.50 requiring that indexing in arrays of samplers must be done with
14795bd8deadSopenharmony_ci    constant expressions.  However, ARB_gpu_shader5 specifies that results are
14805bd8deadSopenharmony_ci    undefined if the indices would diverge if multiple shader invocations are
14815bd8deadSopenharmony_ci    run in lockstep.  This extension does not impose the non-divergent
14825bd8deadSopenharmony_ci    indexing requirement.
14835bd8deadSopenharmony_ci
14845bd8deadSopenharmony_ciDependencies on ARB_gpu_shader_fp64
14855bd8deadSopenharmony_ci
14865bd8deadSopenharmony_ci    This extension and ARB_gpu_shader_fp64 both provide support for shading
14875bd8deadSopenharmony_ci    language variables with 64-bit components.  If both extensions are
14885bd8deadSopenharmony_ci    supported, the various edits describing this new support should be
14895bd8deadSopenharmony_ci    combined.
14905bd8deadSopenharmony_ci
14915bd8deadSopenharmony_ci    If ARB_gpu_shader_fp64 is not supported, the following edits should be
14925bd8deadSopenharmony_ci    removed:
14935bd8deadSopenharmony_ci
14945bd8deadSopenharmony_ci     * language adding the data types "float64_t", "f64vec2", "f64vec3", and
14955bd8deadSopenharmony_ci       "f64vec4";
14965bd8deadSopenharmony_ci
14975bd8deadSopenharmony_ci     * language allowing implicit conversions of various types to double,
14985bd8deadSopenharmony_ci       dvec2, dvec3, or dvec4; and
14995bd8deadSopenharmony_ci
15005bd8deadSopenharmony_ci     * the built-in functions doubleBitsToInt64(), doubleBitsToUint64(),
15015bd8deadSopenharmony_ci       int64BitsToDouble(), and uint64BitsToDouble().
15025bd8deadSopenharmony_ci
15035bd8deadSopenharmony_ciDependencies on ARB_tessellation_shader
15045bd8deadSopenharmony_ci
15055bd8deadSopenharmony_ci    If ARB_tessellation_shader is not supported, language introduced by this
15065bd8deadSopenharmony_ci    extension describing processing patches in geometry shaders, transform
15075bd8deadSopenharmony_ci    feedback, and rasterization should be removed.
15085bd8deadSopenharmony_ci
15095bd8deadSopenharmony_ci    If this extension and ARB_tessellation_shader are supported, it is legal
15105bd8deadSopenharmony_ci    to send patches past the tessellation stage -- the following language from
15115bd8deadSopenharmony_ci    ARB_tessellation_shader is removed:
15125bd8deadSopenharmony_ci
15135bd8deadSopenharmony_ci      Patch primitives are not supported by pipeline stages below the
15145bd8deadSopenharmony_ci      tessellation evaluation shader.  If there is no active program object or
15155bd8deadSopenharmony_ci      the active program object does not contain a tessellation evaluation
15165bd8deadSopenharmony_ci      shader, the error INVALID_OPERATION is generated by Begin (or vertex
15175bd8deadSopenharmony_ci      array commands that implicitly call Begin) if the primitive mode is
15185bd8deadSopenharmony_ci      PATCHES.
15195bd8deadSopenharmony_ci
15205bd8deadSopenharmony_ciDependencies on NV_shader_buffer_load
15215bd8deadSopenharmony_ci
15225bd8deadSopenharmony_ci    If NV_shader_buffer_load is supported, that specification should be edited
15235bd8deadSopenharmony_ci    as follows, to allow pointers to dereference the new data types added by
15245bd8deadSopenharmony_ci    this extension.
15255bd8deadSopenharmony_ci
15265bd8deadSopenharmony_ci    Modify "Section 2.20.X, Shader Memory Access" from NV_shader_buffer_load.
15275bd8deadSopenharmony_ci
15285bd8deadSopenharmony_ci    (add rules for loads of variables having the new data types from this
15295bd8deadSopenharmony_ci    extension to the list of bullets following "When a shader dereferences a
15305bd8deadSopenharmony_ci    pointer variable")
15315bd8deadSopenharmony_ci
15325bd8deadSopenharmony_ci    - Data of type "int8_t," "int16_t", "int32_t", and "int64_t" are read
15335bd8deadSopenharmony_ci      from or written to memory as a single 8-, 16-, 32-, or 64-bit signed
15345bd8deadSopenharmony_ci      integer value at the specified GPU address.
15355bd8deadSopenharmony_ci
15365bd8deadSopenharmony_ci    - Data of type "uint8_t," "uint16_t", "uint32_t", and "uint64_t" are read
15375bd8deadSopenharmony_ci      from or written to memory as a single 8-, 16-, 32-, or 64-bit unsigned
15385bd8deadSopenharmony_ci      integer value at the specified GPU address.
15395bd8deadSopenharmony_ci
15405bd8deadSopenharmony_ci    - Data of type "float16_t", "float32_t", and "float64_t" are read from or
15415bd8deadSopenharmony_ci      written to memory as a single 16-, 32-, or 64-bit floating-point value
15425bd8deadSopenharmony_ci      at the specified GPU address.
15435bd8deadSopenharmony_ci
15445bd8deadSopenharmony_ciDependencies on EXT_direct_state_access
15455bd8deadSopenharmony_ci
15465bd8deadSopenharmony_ci    If EXT_direct_state_access is supported, that specification should be
15475bd8deadSopenharmony_ci    edited as follows to include new ProgramUniform* functions.
15485bd8deadSopenharmony_ci
15495bd8deadSopenharmony_ci    (modify the ProgramUniform* language)
15505bd8deadSopenharmony_ci
15515bd8deadSopenharmony_ci    The following commands:
15525bd8deadSopenharmony_ci
15535bd8deadSopenharmony_ci        ....
15545bd8deadSopenharmony_ci        void ProgramUniform{1,2,3,4}{i64,ui64}NV
15555bd8deadSopenharmony_ci            (uint program int location, T value);
15565bd8deadSopenharmony_ci        void ProgramUniform{1,2,3,4}{i64,ui64}vNV
15575bd8deadSopenharmony_ci            (uint program, int location, const T *value);
15585bd8deadSopenharmony_ci
15595bd8deadSopenharmony_ci    operate identically to the corresponding command where "Program" is
15605bd8deadSopenharmony_ci    deleted from the name (and extension suffixes are dropped or updated
15615bd8deadSopenharmony_ci    appropriately) except, rather than updating the currently active program
15625bd8deadSopenharmony_ci    object, these "Program" commands update the program object named by the
15635bd8deadSopenharmony_ci    <program> parameter.  ...
15645bd8deadSopenharmony_ci
15655bd8deadSopenharmony_ciDependencies on EXT_vertex_attrib_64bit and NV_vertex_attrib_integer_64bit
15665bd8deadSopenharmony_ci
15675bd8deadSopenharmony_ci    The EXT_vertex_attrib_64bit extension provides the ability to specify
15685bd8deadSopenharmony_ci    64-bit floating-point vertex attributes in a GLSL vertex shader and the
15695bd8deadSopenharmony_ci    specify the values of these attributes via the OpenGL API.  To
15705bd8deadSopenharmony_ci    successfully compile vertex shaders with fp64 input variables, is
15715bd8deadSopenharmony_ci    necessary to include
15725bd8deadSopenharmony_ci
15735bd8deadSopenharmony_ci      #extension GL_EXT_vertex_attrib_64bit : enable
15745bd8deadSopenharmony_ci
15755bd8deadSopenharmony_ci    in the shader text.
15765bd8deadSopenharmony_ci
15775bd8deadSopenharmony_ci    However, this extension is considered to enable 64-bit
15785bd8deadSopenharmony_ci    floating-point and integer inputs. Provided EXT_vertex_attrib_64bit
15795bd8deadSopenharmony_ci    and NV_vertex_attrib_integer_64bit are supported, including the
15805bd8deadSopenharmony_ci    following code in a vertex shader
15815bd8deadSopenharmony_ci
15825bd8deadSopenharmony_ci      #extension GL_NV_gpu_shader5 : enable
15835bd8deadSopenharmony_ci
15845bd8deadSopenharmony_ci    will enable 64-bit floating-point or integer input variables whose
15855bd8deadSopenharmony_ci    values would be specified using the OpenGL API mechanisms found in
15865bd8deadSopenharmony_ci    the EXT_vertex_attrib_64bit and NV_vertex_attrib_integer_64bit
15875bd8deadSopenharmony_ci    extensions.
15885bd8deadSopenharmony_ci
15895bd8deadSopenharmony_ci
15905bd8deadSopenharmony_ciErrors
15915bd8deadSopenharmony_ci
15925bd8deadSopenharmony_ci    None.
15935bd8deadSopenharmony_ci
15945bd8deadSopenharmony_ciNew State
15955bd8deadSopenharmony_ci
15965bd8deadSopenharmony_ci    None.
15975bd8deadSopenharmony_ci
15985bd8deadSopenharmony_ciNew Implementation Dependent State
15995bd8deadSopenharmony_ci
16005bd8deadSopenharmony_ci    None.
16015bd8deadSopenharmony_ci
16025bd8deadSopenharmony_ciIssues
16035bd8deadSopenharmony_ci
16045bd8deadSopenharmony_ci    (1) What implicit conversions are supported by this extension on top of
16055bd8deadSopenharmony_ci        those provided by related extensions?
16065bd8deadSopenharmony_ci
16075bd8deadSopenharmony_ci      RESOLVED:  ARB_gpu_shader5 and ARB_gpu_shader_fp64 provide new implicit
16085bd8deadSopenharmony_ci      conversions from "int" to "uint", and from "int", "uint", and "float" to
16095bd8deadSopenharmony_ci      "double".
16105bd8deadSopenharmony_ci
16115bd8deadSopenharmony_ci      This extension provides integer types of multiple sizes and supports
16125bd8deadSopenharmony_ci      implicit conversions from small integer types to 32- or 64-bit integer
16135bd8deadSopenharmony_ci      types of the same signedness, as well as float and double.  It also
16145bd8deadSopenharmony_ci      provides floating-point types of multiple sizes and supports implicit
16155bd8deadSopenharmony_ci      conversions from smaller to larger types.  Additionally, it supports
16165bd8deadSopenharmony_ci      conversion from 64-bit integer types to double.
16175bd8deadSopenharmony_ci
16185bd8deadSopenharmony_ci    (2) How do these implicit conversions impact binary operators?
16195bd8deadSopenharmony_ci
16205bd8deadSopenharmony_ci      RESOLVED:  For binary operators, we prefer converting to a common type
16215bd8deadSopenharmony_ci      that is as close as possible in size and type to the original
16225bd8deadSopenharmony_ci      expression.
16235bd8deadSopenharmony_ci
16245bd8deadSopenharmony_ci    (3) How do these implicit conversions impact function overloading rules?
16255bd8deadSopenharmony_ci
16265bd8deadSopenharmony_ci      RESOLVED:  We extend the preference rules in ARB_gpu_shader5 to account
16275bd8deadSopenharmony_ci      for the new data types, adding rules to:
16285bd8deadSopenharmony_ci
16295bd8deadSopenharmony_ci        * favor new "promotions" in integer/floating point types (previously,
16305bd8deadSopenharmony_ci          the only promotion was float-to-double)
16315bd8deadSopenharmony_ci
16325bd8deadSopenharmony_ci        * for promotions, favor conversion to the type closer in size (e.g.,
16335bd8deadSopenharmony_ci          prefer converting from int16_t to int over converting to int64_t)
16345bd8deadSopenharmony_ci
16355bd8deadSopenharmony_ci    (4) What should be done to distinguish between 32- and 64-bit integer
16365bd8deadSopenharmony_ci        constants?
16375bd8deadSopenharmony_ci
16385bd8deadSopenharmony_ci      RESOLVED:  We will use "L" and "UL" to identify signed and unsigned
16395bd8deadSopenharmony_ci      64-bit integer constants; the use of "L" matches a similar ("long")
16405bd8deadSopenharmony_ci      suffix in the C programming language.  C leaves the size of integer
16415bd8deadSopenharmony_ci      types implementation-dependent, and many implementations require an "LL"
16425bd8deadSopenharmony_ci      suffix to declare 64-bit integer constants.  With our size definitions,
16435bd8deadSopenharmony_ci      "L" will be considered sufficient to make an integer constant 64-bit.
16445bd8deadSopenharmony_ci
16455bd8deadSopenharmony_ci    (5) Should provide support for vertex attributes with 64-bit components,
16465bd8deadSopenharmony_ci        and if so, how should the support be provided in the OpenGL API?
16475bd8deadSopenharmony_ci
16485bd8deadSopenharmony_ci      RESOLVED:  Yes, this seems like useful functionality, particularly for
16495bd8deadSopenharmony_ci      applications wanting to provide double-precision or 64-bit integer data
16505bd8deadSopenharmony_ci      to shaders performing computations on such types.  We provide
16515bd8deadSopenharmony_ci      VertexAttribL* entry points for 64-bit components in the separate
16525bd8deadSopenharmony_ci      EXT_vertex_attrib_64bit and NV_vertex_attrib_64bit extensions, which
16535bd8deadSopenharmony_ci      should be supported on all implementations supporting this extension.
16545bd8deadSopenharmony_ci
16555bd8deadSopenharmony_ci    (6) Should we allow vertex attributes with 8- or 16-bit components in the
16565bd8deadSopenharmony_ci        shading language, and if so, how does it interact with the OpenGL API?
16575bd8deadSopenharmony_ci
16585bd8deadSopenharmony_ci      RESOLVED:  Yes, but we will use existing APIs to specify such
16595bd8deadSopenharmony_ci      attributes, which already typically allow 8- and 16-bit components on
16605bd8deadSopenharmony_ci      the API side.  Vertex attribute components (other than 64-bit ones)
16615bd8deadSopenharmony_ci      specified by the API will be converted from the type specified in the
16625bd8deadSopenharmony_ci      vertex attribute commands to the component type of the attribute.  For
16635bd8deadSopenharmony_ci      floating-point values, that may involve 16-to-32 bit conversion or vice
16645bd8deadSopenharmony_ci      versa.  For integer types, that may involve dropping all but the least
16655bd8deadSopenharmony_ci      significant bits of attribute components.
16665bd8deadSopenharmony_ci
16675bd8deadSopenharmony_ci    (7) Should we support uniforms with double or 64-bit attribute types, and
16685bd8deadSopenharmony_ci        if so, how?  Should we support uniforms with <32-bit components, and
16695bd8deadSopenharmony_ci        if so, how?
16705bd8deadSopenharmony_ci
16715bd8deadSopenharmony_ci      RESOLVED:  We will support uniforms of all component types, either in a
16725bd8deadSopenharmony_ci      buffer object (via OpenGL 3.1 or ARB_uniform_buffer_object) or in
16735bd8deadSopenharmony_ci      storage associated with the program.
16745bd8deadSopenharmony_ci
16755bd8deadSopenharmony_ci      When uniforms are stored in buffer object, they are stored using their
16765bd8deadSopenharmony_ci      native data types according to the pre-existing packing and layout
16775bd8deadSopenharmony_ci      rules.  Those rules were already written to be able to accommodate both
16785bd8deadSopenharmony_ci      the larger and smaller new data types.
16795bd8deadSopenharmony_ci
16805bd8deadSopenharmony_ci      Uniforms stored in program objects are loaded with Uniform* APIs.  There
16815bd8deadSopenharmony_ci      are no pre-existing uniform APIs accepting doubles or other "long"
16825bd8deadSopenharmony_ci      types, so there was no clear need to add an extra "L" to the name to
16835bd8deadSopenharmony_ci      distinguish from other APIs like we do with VertexAttribL* APIs.
16845bd8deadSopenharmony_ci
16855bd8deadSopenharmony_ci      Uniforms with 8- and 16- bit components are loaded with the "larger"
16865bd8deadSopenharmony_ci      Uniform*{i,ui,f} APIs; it didn't seem worth it to add numerous entry
16875bd8deadSopenharmony_ci      points to the APIs to handle all those new types.
16885bd8deadSopenharmony_ci
16895bd8deadSopenharmony_ci    (8) How do the uniform loading commands introduced by this extension
16905bd8deadSopenharmony_ci        interact similar commands added by NV_shader_buffer_load?
16915bd8deadSopenharmony_ci
16925bd8deadSopenharmony_ci      RESOLVED:  NV_shader_buffer_load provided the command Uniformui64NV to
16935bd8deadSopenharmony_ci      load pointer uniforms with a single 64-bit unsigned integer.  This
16945bd8deadSopenharmony_ci      extension provides vectors of 64-bit unsigned integers, so we needed
16955bd8deadSopenharmony_ci      Uniform{2,3,4}ui64NV commands.  We chose to provide a Uniform1ui64NV
16965bd8deadSopenharmony_ci      command, which will be functionally equivalent to Uniformui64NV.
16975bd8deadSopenharmony_ci
16985bd8deadSopenharmony_ci    (9) How will transform feedback work for capturing variables with double
16995bd8deadSopenharmony_ci        or 64-bit components?  Should we support transform feedback on
17005bd8deadSopenharmony_ci        variables with components with fewer than 32 bits?
17015bd8deadSopenharmony_ci
17025bd8deadSopenharmony_ci      RESOLVED:  Transform feedback will support variables with any component
17035bd8deadSopenharmony_ci      size.  Components with fewer than 32-bits are converted to their
17045bd8deadSopenharmony_ci      equivalent 32-bit types.
17055bd8deadSopenharmony_ci
17065bd8deadSopenharmony_ci      For doubles and variables with 64-bit components, each component
17075bd8deadSopenharmony_ci      captured will count as 64-bit values and occupy two components for the
17085bd8deadSopenharmony_ci      purpose of component counting rules.  This could be a problem for the
17095bd8deadSopenharmony_ci      SEPARATE_ATTRIBS mode, since the minimum component limit is four, which
17105bd8deadSopenharmony_ci      would not be sufficient to capture a dvec3 or dvec4.  However,
17115bd8deadSopenharmony_ci      implementations supporting this extension should also be able to support
17125bd8deadSopenharmony_ci      ARB_transform_feedback3, which extends INTERLEAVED_ATTRIBS mode to
17135bd8deadSopenharmony_ci      capture vertex attribute values interleaved into multiple buffers.  That
17145bd8deadSopenharmony_ci      functionality effectively obsoletes the SEPARATE_ATTRIBS mode, since it
17155bd8deadSopenharmony_ci      is a functional superset.
17165bd8deadSopenharmony_ci
17175bd8deadSopenharmony_ci      We considered support for capturing 8- and 16-bit values directly, which
17185bd8deadSopenharmony_ci      had a number of problems.  First, full byte addressing might impose both
17195bd8deadSopenharmony_ci      alignment issues (e.g., capturing a uint8_t followed by a float might
17205bd8deadSopenharmony_ci      misalign the float) and additional hardware implementation burdens.  One
17215bd8deadSopenharmony_ci      other option would be to pack multiple values into a 32-bit integer
17225bd8deadSopenharmony_ci      (e.g., f16vec2 would be packed with .x in the LSBs and .y in the MSBs).
17235bd8deadSopenharmony_ci      This could work, even with word addressing, but would require padding
17245bd8deadSopenharmony_ci      for odd sizes (e.g., f16vec2 padded to two words, with the second word
17255bd8deadSopenharmony_ci      holding only .z).  It would also have endianness issues; packed values
17265bd8deadSopenharmony_ci      would look like arrays of the corresponding smaller type on
17275bd8deadSopenharmony_ci      little-endian systems, but not on big-endian ones.
17285bd8deadSopenharmony_ci
17295bd8deadSopenharmony_ci    (10) What precision will be used for computation, storage, and inter-stage
17305bd8deadSopenharmony_ci         transfer of 8- and 16-bit component data types?
17315bd8deadSopenharmony_ci
17325bd8deadSopenharmony_ci      RESOLVED:  The components may be considered to occupy a full 32 bits for
17335bd8deadSopenharmony_ci      the purposes of input/output component count limits.  8- and 16-bit
17345bd8deadSopenharmony_ci      values should, however, be passed at that precision.
17355bd8deadSopenharmony_ci
17365bd8deadSopenharmony_ci    (11) Is the new support for non-constant texel offsets completely
17375bd8deadSopenharmony_ci         orthogonal?
17385bd8deadSopenharmony_ci
17395bd8deadSopenharmony_ci      RESOLVED:  No.  Non-constant offsets are not supported for the existing
17405bd8deadSopenharmony_ci      functions textureGradOffset() and textureProjGradOffset().
17415bd8deadSopenharmony_ci
17425bd8deadSopenharmony_ci    (12) Should we provide functions like intBitsToFloat() that operate on
17435bd8deadSopenharmony_ci         16-bit floating-point values?
17445bd8deadSopenharmony_ci
17455bd8deadSopenharmony_ci      RESOLVED:  Not in this extension.  Such conversions can be performed
17465bd8deadSopenharmony_ci      using the following code:
17475bd8deadSopenharmony_ci
17485bd8deadSopenharmony_ci        uint16_t float16BitsToUint16(float16_t v)
17495bd8deadSopenharmony_ci        {
17505bd8deadSopenharmony_ci          return uint16_t(packFloat2x16(f16vec2(v, 0));
17515bd8deadSopenharmony_ci        }
17525bd8deadSopenharmony_ci
17535bd8deadSopenharmony_ci        float16_t uint16BitsToFloat16(uint16_t v)
17545bd8deadSopenharmony_ci        {
17555bd8deadSopenharmony_ci          return unpackFloat2x16(uint(v)).x;
17565bd8deadSopenharmony_ci        }
17575bd8deadSopenharmony_ci
17585bd8deadSopenharmony_ci    (13) Should we provide distinct sized types for 32-bit integers and
17595bd8deadSopenharmony_ci         floats, and 64-bit floats?  Should we provide those types as aliases
17605bd8deadSopenharmony_ci         for existing unsized types?  Or should we provide no such types at
17615bd8deadSopenharmony_ci         all?
17625bd8deadSopenharmony_ci
17635bd8deadSopenharmony_ci      RESOLVED:  We will provide sized versions of these types, which are
17645bd8deadSopenharmony_ci      defined as completely equivalent to unsized types according to the
17655bd8deadSopenharmony_ci      following table:
17665bd8deadSopenharmony_ci
17675bd8deadSopenharmony_ci        unsized type     sized types
17685bd8deadSopenharmony_ci        -------------    ---------------
17695bd8deadSopenharmony_ci        int              int32_t
17705bd8deadSopenharmony_ci        uint             uint32_t
17715bd8deadSopenharmony_ci        float            float32_t
17725bd8deadSopenharmony_ci        double           float64_t
17735bd8deadSopenharmony_ci
17745bd8deadSopenharmony_ci      Vector types with sized and unsized components have equivalent
17755bd8deadSopenharmony_ci      relationships.
17765bd8deadSopenharmony_ci
17775bd8deadSopenharmony_ci      Note that the nominally "unsized" data types in the GLSL 1.30 spec are
17785bd8deadSopenharmony_ci      actually sized.  The specification explicitly defines signed and unsized
17795bd8deadSopenharmony_ci      integers (int, uint) to be 32-bit values.  It also defines
17805bd8deadSopenharmony_ci      floating-point values to "match the IEEE single precision floating-point
17815bd8deadSopenharmony_ci      definition for precision and dynamic range", which are also 32-bit
17825bd8deadSopenharmony_ci      values.
17835bd8deadSopenharmony_ci
17845bd8deadSopenharmony_ci      This type equivalence has minor implications on function overloading:
17855bd8deadSopenharmony_ci
17865bd8deadSopenharmony_ci        * You can't declare separate versions of a function with an "int"
17875bd8deadSopenharmony_ci          argument in one version and an "int32_t" argument in another.
17885bd8deadSopenharmony_ci
17895bd8deadSopenharmony_ci        * Because there is no implicit conversion between equivalent types, we
17905bd8deadSopenharmony_ci          will get an exact match if an argument is declared with one type
17915bd8deadSopenharmony_ci          (e.g., "int") in the caller and a textually different but equivalent
17925bd8deadSopenharmony_ci          type ("int32_t") in the function.
17935bd8deadSopenharmony_ci
17945bd8deadSopenharmony_ci      Note that the type equivalence also applies to API data type queries.
17955bd8deadSopenharmony_ci      For example, the type INT will be returned for a variable declared as
17965bd8deadSopenharmony_ci      "int32_t".
17975bd8deadSopenharmony_ci
17985bd8deadSopenharmony_ci    (14) What are functions like anyThreadNV() and allThreadsNV() good for?
17995bd8deadSopenharmony_ci
18005bd8deadSopenharmony_ci      NRESOLVED:  If an implementation performs SIMD thread execution,
18015bd8deadSopenharmony_ci      divergent branching may result in reduced performance if the "if" and
18025bd8deadSopenharmony_ci      "else" blocks of an "if" statement are executed sequentially.  For
18035bd8deadSopenharmony_ci      example, an algorithm may have both a "fast path" that performs a
18045bd8deadSopenharmony_ci      computation quickly for a subset of all cases and a "fast path" that
18055bd8deadSopenharmony_ci      performs a computation quickly but correctly.  When performing SIMD
18065bd8deadSopenharmony_ci      execution, code like the following:
18075bd8deadSopenharmony_ci
18085bd8deadSopenharmony_ci        if (condition) {
18095bd8deadSopenharmony_ci          result = do_fast_path(...);
18105bd8deadSopenharmony_ci        } else {
18115bd8deadSopenharmony_ci          result = do_slow_path(...);
18125bd8deadSopenharmony_ci        }
18135bd8deadSopenharmony_ci
18145bd8deadSopenharmony_ci      may end up executing *both* the fast and slow paths for a SIMD thread
18155bd8deadSopenharmony_ci      group if <condition> diverges, and may execute more slowly than simply
18165bd8deadSopenharmony_ci      executing the slow path unconditionally.  These functions allow code
18175bd8deadSopenharmony_ci      like:
18185bd8deadSopenharmony_ci
18195bd8deadSopenharmony_ci        if (allThreadsNV(condition)) {
18205bd8deadSopenharmony_ci          result = do_fast_path(...);
18215bd8deadSopenharmony_ci        } else {
18225bd8deadSopenharmony_ci          result = do_slow_path(...);
18235bd8deadSopenharmony_ci        }
18245bd8deadSopenharmony_ci
18255bd8deadSopenharmony_ci      that executes the fast path if and only if it can be used for *all*
18265bd8deadSopenharmony_ci      threads in the group.  For thread groups where <condition> diverges,
18275bd8deadSopenharmony_ci      this algorithm would unconditionally run the slow path, but would never
18285bd8deadSopenharmony_ci      run both in sequence.
18295bd8deadSopenharmony_ci
18305bd8deadSopenharmony_ci      There may be other cases where "voting" across shader invocations may be
18315bd8deadSopenharmony_ci      useful.  Note that we provide no control over how shader invocations may
18325bd8deadSopenharmony_ci      be packed within a SIMD thread group, unlike various "compute" APIs
18335bd8deadSopenharmony_ci      (CUDA, OpenCL).
18345bd8deadSopenharmony_ci
18355bd8deadSopenharmony_ci    (15) Can the 64-bit uniform APIs be used to load values for uniforms of
18365bd8deadSopenharmony_ci         type "bool", "bvec2", "bvec3", or "bvec4"?
18375bd8deadSopenharmony_ci
18385bd8deadSopenharmony_ci      RESOLVED:  No.  OpenGL 2.0 and beyond did allow "bool" variable to be
18395bd8deadSopenharmony_ci      set with Uniform*i* and Uniform*f APIs, and OpenGL 3.0 extended that
18405bd8deadSopenharmony_ci      support to Uniform*ui* for orthogonality.  But it seems pointless to
18415bd8deadSopenharmony_ci      extended this capability forward to 64-bit Uniform APIs as well.
18425bd8deadSopenharmony_ci
18435bd8deadSopenharmony_ci    (19) The ARB_tessellation_shader extension adds support for patch
18445bd8deadSopenharmony_ci         primitives that might survive to the transform feedback stage.  How
18455bd8deadSopenharmony_ci         are such primitives captured?
18465bd8deadSopenharmony_ci
18475bd8deadSopenharmony_ci      RESOLVED:  If patch primitives survive to the transform feedback stage,
18485bd8deadSopenharmony_ci      they are recorded on a patch-by-patch basis.  Incomplete patches are not
18495bd8deadSopenharmony_ci      recorded.  As with other primitive types, if the transform feedback
18505bd8deadSopenharmony_ci      buffers do not contain enough space to capture an entire patch, no
18515bd8deadSopenharmony_ci      vertices are recorded.
18525bd8deadSopenharmony_ci
18535bd8deadSopenharmony_ci      Note that the only way to get patch primitives all the way to transform
18545bd8deadSopenharmony_ci      feedback is to have tessellation evaluation and geometry shaders
18555bd8deadSopenharmony_ci      disabled; the output streams from both of those shader stages are
18565bd8deadSopenharmony_ci      collections of points, lines, or triangles.
18575bd8deadSopenharmony_ci
18585bd8deadSopenharmony_ci    (20) Previous transform feedback allowed capturing only fixed-size
18595bd8deadSopenharmony_ci         primitives; this extension supports variable-sized patches.  What
18605bd8deadSopenharmony_ci         interactions does this functionality have with transform feedback
18615bd8deadSopenharmony_ci         buffer overflow?
18625bd8deadSopenharmony_ci
18635bd8deadSopenharmony_ci      RESOLVED:  With fixed-size point, line, or triangle primitives, once any
18645bd8deadSopenharmony_ci      primitive fails to be recorded due to insufficient space, all subsequent
18655bd8deadSopenharmony_ci      primitives would also fail.  With variable-size patch primitives, the
18665bd8deadSopenharmony_ci      transform feedback stage might first receive a large patch that doesn't
18675bd8deadSopenharmony_ci      fit, followed by a smaller patch that could squeeze into the remaining
18685bd8deadSopenharmony_ci      space.
18695bd8deadSopenharmony_ci
18705bd8deadSopenharmony_ci      To allow for different types of implementation of this extension without
18715bd8deadSopenharmony_ci      requiring special-case handling of this corner case, we've chosen to
18725bd8deadSopenharmony_ci      leave this behavior undefined -- the smaller patch may or may not be
18735bd8deadSopenharmony_ci      recorded.
18745bd8deadSopenharmony_ci
18755bd8deadSopenharmony_ci
18765bd8deadSopenharmony_ciRevision History
18775bd8deadSopenharmony_ci
18785bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
18795bd8deadSopenharmony_ci    ----  --------  --------  -----------------------------------------
18805bd8deadSopenharmony_ci    11    03/07/17  mheyer    Update OpenGL ES interactions to clarify
18815bd8deadSopenharmony_ci                              that using a tessellation control shader
18825bd8deadSopenharmony_ci                              without a tessellation evaluation shader
18835bd8deadSopenharmony_ci                              is legal, and PATCHES can be sent past the
18845bd8deadSopenharmony_ci                              tessellation stage.
18855bd8deadSopenharmony_ci
18865bd8deadSopenharmony_ci    10    04/16/16  mheyer    Add OpenGL ES interactions (written before
18875bd8deadSopenharmony_ci                              revision 9, but not published)
18885bd8deadSopenharmony_ci
18895bd8deadSopenharmony_ci     9    02/19/16  pbrown    Clarify that non-constant offset vectors are
18905bd8deadSopenharmony_ci                              supported in textureGatherOffsets().
18915bd8deadSopenharmony_ci
18925bd8deadSopenharmony_ci     8    09/11/14  pbrown    Fix incorrect implicit conversions, which
18935bd8deadSopenharmony_ci                              follow the general pattern of little->big
18945bd8deadSopenharmony_ci                              and int->uint->float.  Thanks to Daniel
18955bd8deadSopenharmony_ci                              Rakos, author of similar functionality in
18965bd8deadSopenharmony_ci                              the AMD_gpu_shader_int64 spec.
18975bd8deadSopenharmony_ci
18985bd8deadSopenharmony_ci     7    11/08/10  pbrown    Fix typos in description of packFloat2x16 and
18995bd8deadSopenharmony_ci                              unpackFloat2x16.
19005bd8deadSopenharmony_ci
19015bd8deadSopenharmony_ci     6    03/23/10  pbrown    Update overview, dependencies, remove references
19025bd8deadSopenharmony_ci                              to old extension names.  Extend the function
19035bd8deadSopenharmony_ci                              overloading prioritization rules from
19045bd8deadSopenharmony_ci                              ARB_gpu_shader5 to account for new data types.
19055bd8deadSopenharmony_ci                              Major overhaul of the issues section to match
19065bd8deadSopenharmony_ci                              the refactoring done to produce ARB specs.
19075bd8deadSopenharmony_ci
19085bd8deadSopenharmony_ci     5    03/08/10  pbrown    Add interaction with EXT_vertex_attrib_64bit and
19095bd8deadSopenharmony_ci                              NV_vertex_attrib_integer_64bit; enabling this
19105bd8deadSopenharmony_ci                              extension automatically enables 64-bit floating-
19115bd8deadSopenharmony_ci                              point and integer vertex inputs.
19125bd8deadSopenharmony_ci
19135bd8deadSopenharmony_ci     4    03/01/10  pbrown    Fix prototype for GetUniformui64vNV.
19145bd8deadSopenharmony_ci
19155bd8deadSopenharmony_ci     3    01/14/10  pbrown    Fix with updated enum assignments.
19165bd8deadSopenharmony_ci
19175bd8deadSopenharmony_ci     2    12/08/09  pbrown    Add explicit component counting rules for
19185bd8deadSopenharmony_ci                              64-bit integer attributes similar to those
19195bd8deadSopenharmony_ci                              in the ARB_gpu_shader_fp64 spec.
19205bd8deadSopenharmony_ci
19215bd8deadSopenharmony_ci     1              pbrown    Internal revisions.
1922