15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    AMD_gpu_shader_int64
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_AMD_gpu_shader_int64
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Daniel Rakos, AMD (daniel.rakos 'at' amd.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Daniel Rakos, AMD
165bd8deadSopenharmony_ci    Graham Sellers, AMD
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciStatus
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    Shipping
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciVersion
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    Last Modified Date:         07/07/2014
255bd8deadSopenharmony_ci    Author Revision:            3
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciNumber
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    OpenGL Extension #451
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ciDependencies
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    This extension is written against the OpenGL 4.4 (Core Profile)
345bd8deadSopenharmony_ci    Specification.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    This extension is written against version 4.40 of the OpenGL Shading
375bd8deadSopenharmony_ci    Language Specification.
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    OpenGL 4.0 and GLSL 4.00 are required.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    This extension interacts with NV_gpu_shader5.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    This extension interacts with NV_shader_buffer_load.
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci    This extension interacts with EXT_direct_state_access.
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    This extension interacts with NV_vertex_attrib_integer_64bit.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    This extension interacts with EXT_shader_integer_mix.
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ciOverview
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    This extension was developed based on the NV_gpu_shader5 extension to
545bd8deadSopenharmony_ci    allow implementations supporting 64-bit integers to expose the feature
555bd8deadSopenharmony_ci    without the additional requirements that are present in NV_gpu_shader5.
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    The extension introduces the following features for all shader types:
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci      * support for 64-bit scalar and vector integer data types, including
605bd8deadSopenharmony_ci        uniform API, uniform buffer object, transform feedback, and shader
615bd8deadSopenharmony_ci        input and output support;
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci      * new built-in functions to pack and unpack 64-bit integer types into a
645bd8deadSopenharmony_ci        two-component 32-bit integer vector;
655bd8deadSopenharmony_ci
665bd8deadSopenharmony_ci      * new built-in functions to convert double-precision floating-point
675bd8deadSopenharmony_ci        values to or from their 64-bit integer bit encodings;
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci      * vector relational functions supporting comparisons of vectors of
705bd8deadSopenharmony_ci        64-bit integer types; and
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci      * common functions abs, sign, min, max, clamp, and mix supporting
735bd8deadSopenharmony_ci        arguments of 64-bit integer types.
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    This extension is designed to be a functional superset of the 64-bit
765bd8deadSopenharmony_ci    integer support introduced by NV_gpu_shader5 and to be source code
775bd8deadSopenharmony_ci    compatible with that, thus the new procedures, functions, and tokens
785bd8deadSopenharmony_ci    are identical to those found in that extension.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ciNew Procedures and Functions
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci    (The functions are identical to those defined in NV_gpu_shader5.)
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    void Uniform1i64NV(int location, int64EXT x);
865bd8deadSopenharmony_ci    void Uniform2i64NV(int location, int64EXT x, int64EXT y);
875bd8deadSopenharmony_ci    void Uniform3i64NV(int location, int64EXT x, int64EXT y, int64EXT z);
885bd8deadSopenharmony_ci    void Uniform4i64NV(int location, int64EXT x, int64EXT y, int64EXT z,
895bd8deadSopenharmony_ci                       int64EXT w);
905bd8deadSopenharmony_ci    void Uniform1i64vNV(int location, sizei count, const int64EXT *value);
915bd8deadSopenharmony_ci    void Uniform2i64vNV(int location, sizei count, const int64EXT *value);
925bd8deadSopenharmony_ci    void Uniform3i64vNV(int location, sizei count, const int64EXT *value);
935bd8deadSopenharmony_ci    void Uniform4i64vNV(int location, sizei count, const int64EXT *value);
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci    void Uniform1ui64NV(int location, uint64EXT x);
965bd8deadSopenharmony_ci    void Uniform2ui64NV(int location, uint64EXT x, uint64EXT y);
975bd8deadSopenharmony_ci    void Uniform3ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z);
985bd8deadSopenharmony_ci    void Uniform4ui64NV(int location, uint64EXT x, uint64EXT y, uint64EXT z,
995bd8deadSopenharmony_ci                       uint64EXT w);
1005bd8deadSopenharmony_ci    void Uniform1ui64vNV(int location, sizei count, const uint64EXT *value);
1015bd8deadSopenharmony_ci    void Uniform2ui64vNV(int location, sizei count, const uint64EXT *value);
1025bd8deadSopenharmony_ci    void Uniform3ui64vNV(int location, sizei count, const uint64EXT *value);
1035bd8deadSopenharmony_ci    void Uniform4ui64vNV(int location, sizei count, const uint64EXT *value);
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci    void GetUniformi64vNV(uint program, int location, int64EXT *params);
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    (The following function is also provided by NV_shader_buffer_load.)
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    void GetUniformui64vNV(uint program, int location, uint64EXT *params);
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci    (All of the following ProgramUniform* functions are supported if and only
1145bd8deadSopenharmony_ci     if EXT_direct_state_access is supported.)
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci    void ProgramUniform1i64NV(uint program, int location, int64EXT x);
1175bd8deadSopenharmony_ci    void ProgramUniform2i64NV(uint program, int location, int64EXT x,
1185bd8deadSopenharmony_ci                              int64EXT y);
1195bd8deadSopenharmony_ci    void ProgramUniform3i64NV(uint program, int location, int64EXT x, 
1205bd8deadSopenharmony_ci                              int64EXT y, int64EXT z);
1215bd8deadSopenharmony_ci    void ProgramUniform4i64NV(uint program, int location, int64EXT x, 
1225bd8deadSopenharmony_ci                              int64EXT y, int64EXT z, int64EXT w);
1235bd8deadSopenharmony_ci    void ProgramUniform1i64vNV(uint program, int location, sizei count,
1245bd8deadSopenharmony_ci                               const int64EXT *value);
1255bd8deadSopenharmony_ci    void ProgramUniform2i64vNV(uint program, int location, sizei count,
1265bd8deadSopenharmony_ci                               const int64EXT *value);
1275bd8deadSopenharmony_ci    void ProgramUniform3i64vNV(uint program, int location, sizei count,
1285bd8deadSopenharmony_ci                               const int64EXT *value);
1295bd8deadSopenharmony_ci    void ProgramUniform4i64vNV(uint program, int location, sizei count,
1305bd8deadSopenharmony_ci                               const int64EXT *value);
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    void ProgramUniform1ui64NV(uint program, int location, uint64EXT x);
1335bd8deadSopenharmony_ci    void ProgramUniform2ui64NV(uint program, int location, uint64EXT x, 
1345bd8deadSopenharmony_ci                               uint64EXT y);
1355bd8deadSopenharmony_ci    void ProgramUniform3ui64NV(uint program, int location, uint64EXT x, 
1365bd8deadSopenharmony_ci                               uint64EXT y, uint64EXT z);
1375bd8deadSopenharmony_ci    void ProgramUniform4ui64NV(uint program, int location, uint64EXT x, 
1385bd8deadSopenharmony_ci                               uint64EXT y, uint64EXT z, uint64EXT w);
1395bd8deadSopenharmony_ci    void ProgramUniform1ui64vNV(uint program, int location, sizei count,
1405bd8deadSopenharmony_ci                                const uint64EXT *value);
1415bd8deadSopenharmony_ci    void ProgramUniform2ui64vNV(uint program, int location, sizei count,
1425bd8deadSopenharmony_ci                                const uint64EXT *value);
1435bd8deadSopenharmony_ci    void ProgramUniform3ui64vNV(uint program, int location, sizei count,
1445bd8deadSopenharmony_ci                                const uint64EXT *value);
1455bd8deadSopenharmony_ci    void ProgramUniform4ui64vNV(uint program, int location, sizei count, 
1465bd8deadSopenharmony_ci                                const uint64EXT *value);
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ciNew Tokens
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci    Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and
1525bd8deadSopenharmony_ci    GetTransformFeedbackVarying:
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    (The tokens are identical to those defined in NV_gpu_shader5.)
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci        INT64_NV                                        0x140E
1575bd8deadSopenharmony_ci        UNSIGNED_INT64_NV                               0x140F
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci        INT8_NV                                         0x8FE0
1605bd8deadSopenharmony_ci        INT8_VEC2_NV                                    0x8FE1
1615bd8deadSopenharmony_ci        INT8_VEC3_NV                                    0x8FE2
1625bd8deadSopenharmony_ci        INT8_VEC4_NV                                    0x8FE3
1635bd8deadSopenharmony_ci        INT16_NV                                        0x8FE4
1645bd8deadSopenharmony_ci        INT16_VEC2_NV                                   0x8FE5
1655bd8deadSopenharmony_ci        INT16_VEC3_NV                                   0x8FE6
1665bd8deadSopenharmony_ci        INT16_VEC4_NV                                   0x8FE7
1675bd8deadSopenharmony_ci        INT64_VEC2_NV                                   0x8FE9
1685bd8deadSopenharmony_ci        INT64_VEC3_NV                                   0x8FEA
1695bd8deadSopenharmony_ci        INT64_VEC4_NV                                   0x8FEB
1705bd8deadSopenharmony_ci        UNSIGNED_INT8_NV                                0x8FEC
1715bd8deadSopenharmony_ci        UNSIGNED_INT8_VEC2_NV                           0x8FED
1725bd8deadSopenharmony_ci        UNSIGNED_INT8_VEC3_NV                           0x8FEE
1735bd8deadSopenharmony_ci        UNSIGNED_INT8_VEC4_NV                           0x8FEF
1745bd8deadSopenharmony_ci        UNSIGNED_INT16_NV                               0x8FF0
1755bd8deadSopenharmony_ci        UNSIGNED_INT16_VEC2_NV                          0x8FF1
1765bd8deadSopenharmony_ci        UNSIGNED_INT16_VEC3_NV                          0x8FF2
1775bd8deadSopenharmony_ci        UNSIGNED_INT16_VEC4_NV                          0x8FF3
1785bd8deadSopenharmony_ci        UNSIGNED_INT64_VEC2_NV                          0x8FF5
1795bd8deadSopenharmony_ci        UNSIGNED_INT64_VEC3_NV                          0x8FF6
1805bd8deadSopenharmony_ci        UNSIGNED_INT64_VEC4_NV                          0x8FF7
1815bd8deadSopenharmony_ci        FLOAT16_NV                                      0x8FF8
1825bd8deadSopenharmony_ci        FLOAT16_VEC2_NV                                 0x8FF9
1835bd8deadSopenharmony_ci        FLOAT16_VEC3_NV                                 0x8FFA
1845bd8deadSopenharmony_ci        FLOAT16_VEC4_NV                                 0x8FFB
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ciAdditions to Chapter 7 of the OpenGL 4.4 (Core Profile) Specification
1885bd8deadSopenharmony_ci(Program Objects)
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    Modify Section 7.3.1, Program Interfaces
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci    (add to Table 7.3, OpenGL Shading Language type tokens, p. 107)
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ci    +----------------------------+--------------+--------+--------+--------+
1955bd8deadSopenharmony_ci    | Type Name Token            | Keyword      | Attrib |  Xfb   | Buffer |
1965bd8deadSopenharmony_ci    +----------------------------+--------------+--------+--------+--------+
1975bd8deadSopenharmony_ci    | INT64_NV                   | int64_t      |   *    |   *    |   *    |
1985bd8deadSopenharmony_ci    | INT64_VEC2_NV              | i64vec2      |   *    |   *    |   *    |
1995bd8deadSopenharmony_ci    | INT64_VEC3_NV              | i64vec3      |   *    |   *    |   *    |
2005bd8deadSopenharmony_ci    | INT64_VEC4_NV              | i64vec4      |   *    |   *    |   *    |
2015bd8deadSopenharmony_ci    | UNSIGNED_INT64_NV          | uint64_t     |   *    |   *    |   *    |
2025bd8deadSopenharmony_ci    | UNSIGNED_INT64_VEC2_NV     | u64vec2      |   *    |   *    |   *    |
2035bd8deadSopenharmony_ci    | UNSIGNED_INT64_VEC3_NV     | u64vec3      |   *    |   *    |   *    |
2045bd8deadSopenharmony_ci    | UNSIGNED_INT64_VEC4_NV     | u64vec4      |   *    |   *    |   *    |
2055bd8deadSopenharmony_ci    +----------------------------+--------------+--------+--------+--------+
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci    Modify Section 7.6, Uniform Variables
2085bd8deadSopenharmony_ci
2095bd8deadSopenharmony_ci    (modify second paragraph on p. 120)
2105bd8deadSopenharmony_ci
2115bd8deadSopenharmony_ci        Scalar, vector, and matrix uniforms with double-precision components,
2125bd8deadSopenharmony_ci    and scalar and vector uniforms with 64-bit integer components will consume
2135bd8deadSopenharmony_ci    no more than twice the number of components of equivalent uniforms with
2145bd8deadSopenharmony_ci    single-precision components.
2155bd8deadSopenharmony_ci
2165bd8deadSopenharmony_ci
2175bd8deadSopenharmony_ci    Modify Section 7.6.1, Loading Uniform Variables
2185bd8deadSopenharmony_ci
2195bd8deadSopenharmony_ci    (add to the list of commands in first paragraph on p. 125)
2205bd8deadSopenharmony_ci
2215bd8deadSopenharmony_ci      void Uniform{1,2,3,4}{i64,ui64}NV(int location, T value);
2225bd8deadSopenharmony_ci      void Uniform{1,2,3,4}{i64,ui64}vNV(int location, T value);
2235bd8deadSopenharmony_ci
2245bd8deadSopenharmony_ci    (insert after third paragraph on p. 127)
2255bd8deadSopenharmony_ci
2265bd8deadSopenharmony_ci      The Uniform*i64{v}NV and Uniform*ui{v}NV commands will load count sets
2275bd8deadSopenharmony_ci    of one to four 64-bit signed or unsigned integer values into a uniform
2285bd8deadSopenharmony_ci    location defined as a 64-bit signed or unsigned integer scalar or vector
2295bd8deadSopenharmony_ci    types.
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci    Modify Section 7.6.2.1, Uniform Buffer Object Storage
2335bd8deadSopenharmony_ci
2345bd8deadSopenharmony_ci    (modify the first two bullets of the first paragraph on p. 130)
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci      * Members of type bool int, uint, float, double, int64_t, and uint64_t
2375bd8deadSopenharmony_ci        are respectively extracted from a buffer object by reading a single
2385bd8deadSopenharmony_ci        uint, int, uint, float, double, int64_t, or uint64_t value at the
2395bd8deadSopenharmony_ci        specified offset.
2405bd8deadSopenharmony_ci
2415bd8deadSopenharmony_ci      * Vectors with N elements with basic data types of bool, int, uint,
2425bd8deadSopenharmony_ci        float, double, int64_t, or uint64_t are extracted as N values in
2435bd8deadSopenharmony_ci        consecutive memory locations beginning at the specified offset, with
2445bd8deadSopenharmony_ci        components stored in order with the first (X) component at the
2455bd8deadSopenharmony_ci        lowest offset. The GL data type used for component extraction is
2465bd8deadSopenharmony_ci        derived according to the rules for scalar members above.
2475bd8deadSopenharmony_ci
2485bd8deadSopenharmony_ci
2495bd8deadSopenharmony_ci    Modify Section 7.13, Shader, Program, and Program Pipeline Queries
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    (add to the list of commands in last paragraph on p. 155)
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci      void GetUniformi64vNV(uint program, int location, int64* params)
2545bd8deadSopenharmony_ci      void GetUniformui64vNV(uint program, int location, uint64* params)
2555bd8deadSopenharmony_ci
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ciAdditions to Chapter 11 of the OpenGL 4.4 (Core Profile) Specification
2585bd8deadSopenharmony_ci(Programmable Vertex Processing)
2595bd8deadSopenharmony_ci
2605bd8deadSopenharmony_ci    Modify Section 11.1.1, Vertex Attributes
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci    (modify third sentence of second paragraph on p. 344)
2635bd8deadSopenharmony_ci
2645bd8deadSopenharmony_ci    ... hardware resources. For the purposes of this test, attribute variables
2655bd8deadSopenharmony_ci    of the type dvec3, dvec4, dmat2x3, dmat2x3, dmat3, dmat3x4, dmat4x3,
2665bd8deadSopenharmony_ci    dmat4, i64vec3, i64vec4, u64vec3, and u64vec4 may count as consuming twice
2675bd8deadSopenharmony_ci    as many attributes as equivalent single-precision types. While these types
2685bd8deadSopenharmony_ci    use the same number of generic attributes as their single-precision
2695bd8deadSopenharmony_ci    vectors of internal storage for each three- or four-component
2705bd8deadSopenharmony_ci    double-precision or 64-bit integer vector.
2715bd8deadSopenharmony_ci
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci    Modify Section 11.1.2.1, Output Variables
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci    (modify last sentence of fourth paragraph on p. 345)
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci    ... multiple components. Each component of variables declared as double-
2785bd8deadSopenharmony_ci    precision floating point scalars, vectors, or matrices, or declared as
2795bd8deadSopenharmony_ci    64-bit integer scalars or vectors may be counted as consuming two
2805bd8deadSopenharmony_ci    components.
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci    (modify third bullet of the first paragraph on p. 349)
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci      * any variable containing double-precision floating-point or 64-bit
2855bd8deadSopenharmony_ci        integer components
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci        - has an xfb_offset layout qualifier that is not a multiple of eight;
2885bd8deadSopenharmony_ci          or
2895bd8deadSopenharmony_ci        - is associated with a binding point with an xfb_stride layout
2905bd8deadSopenharmony_ci          qualifier that is not a multiple of eight;
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci    (modify second paragraph on p. 349)
2935bd8deadSopenharmony_ci
2945bd8deadSopenharmony_ci      For transform feedback purposes, each component of outputs declared as
2955bd8deadSopenharmony_ci    double-precision floating-point scalars, vectors, or matrices, or 64-bit
2965bd8deadSopenharmony_ci    integer scalars or vectors are considered to consume eight basic machine
2975bd8deadSopenharmony_ci    units, and each component of any other type is considered to consume four
2985bd8deadSopenharmony_ci    basic machine units.
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ciModifications to the OpenGL Shading Language Specification, Version 4.40
3025bd8deadSopenharmony_ci
3035bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
3045bd8deadSopenharmony_ci    language features described in this extension:
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci      #extension GL_AMD_gpu_shader_int64 : <behavior>
3075bd8deadSopenharmony_ci
3085bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.3.
3095bd8deadSopenharmony_ci
3105bd8deadSopenharmony_ci    New preprocessor #defines are added to the OpenGL Shading Language:
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ci      #define GL_AMD_gpu_shader_int64       1
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL Shading Language Specification (Basics)
3165bd8deadSopenharmony_ci
3175bd8deadSopenharmony_ci    Modify Section 3.6, Keywords
3185bd8deadSopenharmony_ci
3195bd8deadSopenharmony_ci    (add the following to the list of reserved keywords at p. 15)
3205bd8deadSopenharmony_ci
3215bd8deadSopenharmony_ci    int64_t  i64vec2  i64vec3  i64vec4  uint64_t  u64vec2  u64vec3  u64vec4
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci
3245bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL Shading Language Specification
3255bd8deadSopenharmony_ci(Variables and Types)
3265bd8deadSopenharmony_ci
3275bd8deadSopenharmony_ci    Modify Section 4.1, Basic Types
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ci    (add to the basic "Transparent Types" table, p. 19)
3305bd8deadSopenharmony_ci
3315bd8deadSopenharmony_ci    +-----------+------------------------------------------------------------+
3325bd8deadSopenharmony_ci    | Type      | Meaning                                                    |
3335bd8deadSopenharmony_ci    +-----------+------------------------------------------------------------+
3345bd8deadSopenharmony_ci    | int64_t   | a 64-bit signed integer                                    |
3355bd8deadSopenharmony_ci    | uint64_t  | a 64-bit unsigned integer                                  |
3365bd8deadSopenharmony_ci    | i64vec2   | a two-component 64-bit signed integer vector               |
3375bd8deadSopenharmony_ci    | i64vec3   | a three-component 64-bit signed integer vector             |
3385bd8deadSopenharmony_ci    | i64vec4   | a four-component 64-bit signed integer vector              |
3395bd8deadSopenharmony_ci    | u64vec2   | a two-component 64-bit unsigned integer vector             |
3405bd8deadSopenharmony_ci    | u64vec3   | a three-component 64-bit unsigned integer vector           |
3415bd8deadSopenharmony_ci    | u64vec4   | a four-component 64-bit unsigned integer vector            |
3425bd8deadSopenharmony_ci    +-----------+------------------------------------------------------------+
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ci
3455bd8deadSopenharmony_ci    Modify Section 4.1.3, Integers
3465bd8deadSopenharmony_ci
3475bd8deadSopenharmony_ci    (replace first paragraph of the section, p. 23)
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci    Signed and unsigned integer variables are fully supported. In this
3505bd8deadSopenharmony_ci    document, the term integer is meant to generally include both signed and
3515bd8deadSopenharmony_ci    unsigned integers, including both 32-bit and 64-bit integers. Unsigned
3525bd8deadSopenharmony_ci    integers of type uint, uvec2, uvec3, and uvec4 have exactly 32 bits of
3535bd8deadSopenharmony_ci    precision, while unsigned integers of type uint64_t, u64vec2, u64vec3, and
3545bd8deadSopenharmony_ci    u64vec4 have exactly 64 bits of precision. Signed integers of type int,
3555bd8deadSopenharmony_ci    ivec2, ivec3, and ivec4 have exactly 32 bits of precision, while signed
3565bd8deadSopenharmony_ci    integers of type int64_t, i64vec2, i64vec3, and i64vec4 have exactly
3575bd8deadSopenharmony_ci    64 bits of precision. Addition, subtraction, and shift operations
3585bd8deadSopenharmony_ci    resulting in overflow or underflow will not cause any exceptions, nor
3595bd8deadSopenharmony_ci    will they saturate, rather they will "wrap" to yield the low-order bits
3605bd8deadSopenharmony_ci    of the result. Divison and multiplication operations resulting in overflow
3615bd8deadSopenharmony_ci    or underflow will not cause any exception but will result in an undefined
3625bd8deadSopenharmony_ci    value.
3635bd8deadSopenharmony_ci
3645bd8deadSopenharmony_ci    (add after the first paragraph of the section, p. 23)
3655bd8deadSopenharmony_ci
3665bd8deadSopenharmony_ci    Variables with the types "int64_t" and "uint64_t" represent signed and
3675bd8deadSopenharmony_ci    unsigned integer values, respectively, with exactly 64 bits of precision.
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci    (modify grammar rule for "integer-suffix", p. 24)
3705bd8deadSopenharmony_ci
3715bd8deadSopenharmony_ci      integer-suffix: one of
3725bd8deadSopenharmony_ci        u U l L ul UL
3735bd8deadSopenharmony_ci
3745bd8deadSopenharmony_ci    (modify first sentence of second paragraph on p. 24)
3755bd8deadSopenharmony_ci
3765bd8deadSopenharmony_ci    No white space is allowed between the digits of an integer constant,
3775bd8deadSopenharmony_ci    including after the leading 0 or after the leading 0x or 0X of a constant,
3785bd8deadSopenharmony_ci    or before the suffix u, U, l, L, ul, or UL.
3795bd8deadSopenharmony_ci
3805bd8deadSopenharmony_ci    (modify third sentence of second paragraph on p. 24)
3815bd8deadSopenharmony_ci
3825bd8deadSopenharmony_ci    When the suffix u or U is present, the literal has type uint. When the
3835bd8deadSopenharmony_ci    suffix l or L is present, the literal has type int64_t. When the suffix
3845bd8deadSopenharmony_ci    ul or UL is present, the literal has type uint64_t. Otherwise, the type is
3855bd8deadSopenharmony_ci    int.
3865bd8deadSopenharmony_ci
3875bd8deadSopenharmony_ci
3885bd8deadSopenharmony_ci    Modify Section 4.1.10, Implicit Conversions
3895bd8deadSopenharmony_ci
3905bd8deadSopenharmony_ci    (modify table of implicit conversions on p. 33)
3915bd8deadSopenharmony_ci
3925bd8deadSopenharmony_ci    +----------------------+-------------------------------------------------+
3935bd8deadSopenharmony_ci    | Type of expression   | Can be implicitly converted to                  |
3945bd8deadSopenharmony_ci    +----------------------+-------------------------------------------------+
3955bd8deadSopenharmony_ci    | int                  | uint, int64_t, uint64_t, float, double          |
3965bd8deadSopenharmony_ci    | uint                 | uint64_t, float, double                         |
3975bd8deadSopenharmony_ci    | int64_t              | uint64_t, double                                |
3985bd8deadSopenharmony_ci    | uint64_t             | double                                          |
3995bd8deadSopenharmony_ci    | ivec2                | uvec2, i64vec2, u64vec2, vec2, dvec2            |
4005bd8deadSopenharmony_ci    | ivec3                | uvec3, i64vec3, u64vec3, vec3, dvec3            |
4015bd8deadSopenharmony_ci    | ivec4                | uvec4, i64vec4, u64vec4, vec4, dvec4            |
4025bd8deadSopenharmony_ci    | uvec2                | u64vec2, vec2, dvec2                            |
4035bd8deadSopenharmony_ci    | uvec3                | u64vec3, vec3, dvec3                            |
4045bd8deadSopenharmony_ci    | uvec4                | u64vec4, vec4, dvec4                            |
4055bd8deadSopenharmony_ci    | i64vec2              | u64vec2, dvec2                                  |
4065bd8deadSopenharmony_ci    | i64vec3              | u64vec3, dvec3                                  |
4075bd8deadSopenharmony_ci    | i64vec4              | u64vec4, dvec4                                  |
4085bd8deadSopenharmony_ci    | u64vec2              | dvec2                                           |
4095bd8deadSopenharmony_ci    | u64vec3              | dvec3                                           |
4105bd8deadSopenharmony_ci    | u64vec4              | dvec4                                           |
4115bd8deadSopenharmony_ci    +----------------------+-------------------------------------------------+
4125bd8deadSopenharmony_ci
4135bd8deadSopenharmony_ci
4145bd8deadSopenharmony_ci    Modify Section 4.3.6, Output Variables
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    (modify third and fourth sentence of second paragraph on p. 46)
4175bd8deadSopenharmony_ci
4185bd8deadSopenharmony_ci    ... in a fragment shader. Fragment outputs can only be float, single-
4195bd8deadSopenharmony_ci    precision floating-point vectors, signed or unsigned 32-bit integer
4205bd8deadSopenharmony_ci    vectors, or arrays of any these. It is a compile-time error to declare any
4215bd8deadSopenharmony_ci    double-precision type, 64-bit integer type, matrix, or structure as an
4225bd8deadSopenharmony_ci    output.
4235bd8deadSopenharmony_ci
4245bd8deadSopenharmony_ci
4255bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL Shading Language Specification
4265bd8deadSopenharmony_ci(Operators and Expressions)
4275bd8deadSopenharmony_ci
4285bd8deadSopenharmony_ci    Modify Section 5.4.1, Conversion and Scalar Constructors
4295bd8deadSopenharmony_ci
4305bd8deadSopenharmony_ci    (add after first list of constructor examples on p. 91)
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci      int64_t(double) // converts a double value to a 64-bit signed integer
4335bd8deadSopenharmony_ci      uint64_t(bool)  // converts a Boolean value to a 64-bit unsigned integer
4345bd8deadSopenharmony_ci
4355bd8deadSopenharmony_ci    (modify second sentence of first paragraph on p. 92)
4365bd8deadSopenharmony_ci
4375bd8deadSopenharmony_ci    ... is dropped. It is undefined to convert a negative floating-point value
4385bd8deadSopenharmony_ci    to an uint or uint64_t.
4395bd8deadSopenharmony_ci
4405bd8deadSopenharmony_ci    (replace third paragraph on p. 92)
4415bd8deadSopenharmony_ci
4425bd8deadSopenharmony_ci    The constructors int(uint) and int64_t(uint64_t) preserve the bit pattern
4435bd8deadSopenharmony_ci    in the argument, which will change the argument's value if its sign bit is
4445bd8deadSopenharmony_ci    set. The constructor uint(int) and uint64_t(int64_t) preserve the bit
4455bd8deadSopenharmony_ci    pattern in the argument, which will change its value if it is negative.
4465bd8deadSopenharmony_ci
4475bd8deadSopenharmony_ci
4485bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL Shading Language Specification
4495bd8deadSopenharmony_ci(Statements and Structure)
4505bd8deadSopenharmony_ci
4515bd8deadSopenharmony_ci    Modify Section 6.1, Function Defintions
4525bd8deadSopenharmony_ci
4535bd8deadSopenharmony_ci    (replace second rule in third paragraph on p. 106)
4545bd8deadSopenharmony_ci
4555bd8deadSopenharmony_ci      2. A match involving a conversion from a signed integer, unsigned
4565bd8deadSopenharmony_ci         integer, or floating-point type to a similar type having a larger
4575bd8deadSopenharmony_ci         number of bits is better than a match involving any other implicit
4585bd8deadSopenharmony_ci         conversion.
4595bd8deadSopenharmony_ci
4605bd8deadSopenharmony_ci
4615bd8deadSopenharmony_ciAdditions to Chapter 8 of the OpenGL Shading Language Specification
4625bd8deadSopenharmony_ci(Built-in Functions)
4635bd8deadSopenharmony_ci
4645bd8deadSopenharmony_ci    (insert after third sentence of last paragraph on p. 132)
4655bd8deadSopenharmony_ci
4665bd8deadSopenharmony_ci    ... genUType is used as the argument. Where the input arguments (and
4675bd8deadSopenharmony_ci    corresponding output) can be int64_t, i64vec2, i64vec3, i64vec4,
4685bd8deadSopenharmony_ci    genI64Type is used as the argument. Where the input arguments (and
4695bd8deadSopenharmony_ci    corresponding output) can be uint64_t, u64vec2, u64vec3, u64vec4,
4705bd8deadSopenharmony_ci    genU64Type is used as the argument.
4715bd8deadSopenharmony_ci
4725bd8deadSopenharmony_ci
4735bd8deadSopenharmony_ci    Modify Section 8.3, Common Functions
4745bd8deadSopenharmony_ci
4755bd8deadSopenharmony_ci    (add to the table of common functions on p. 136)
4765bd8deadSopenharmony_ci
4775bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
4785bd8deadSopenharmony_ci    | Syntax                                         | Desciption                                         |
4795bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
4805bd8deadSopenharmony_ci    | genI64Type abs(genI64Type x)                   | Returns x if x >= 0; otherwise it returns -x.      |
4815bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
4825bd8deadSopenharmony_ci    | genI64Type sign(genI64Type x)                  | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0.    |
4835bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
4845bd8deadSopenharmony_ci    | genI64Type min(genI64Type x,                   | Returns y if y < x; otherwise it returns x.        |
4855bd8deadSopenharmony_ci    |                genI64Type y)                   |                                                    |
4865bd8deadSopenharmony_ci    | genI64Type min(genI64Type x,                   |                                                    |
4875bd8deadSopenharmony_ci    |                int64_t y)                      |                                                    |
4885bd8deadSopenharmony_ci    | genU64Type min(genU64Type x,                   |                                                    |
4895bd8deadSopenharmony_ci    |                genU64Type y)                   |                                                    |
4905bd8deadSopenharmony_ci    | genU64Type min(genU64Type x,                   |                                                    |
4915bd8deadSopenharmony_ci    |                uint64_t y)                     |                                                    |
4925bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
4935bd8deadSopenharmony_ci    | genI64Type max(genI64Type x,                   | Returns y if x < y; otherwise it returns x.        |
4945bd8deadSopenharmony_ci    |                genI64Type y)                   |                                                    |
4955bd8deadSopenharmony_ci    | genI64Type max(genI64Type x,                   |                                                    |
4965bd8deadSopenharmony_ci    |                int64_t y)                      |                                                    |
4975bd8deadSopenharmony_ci    | genU64Type max(genU64Type x,                   |                                                    |
4985bd8deadSopenharmony_ci    |                genU64Type y)                   |                                                    |
4995bd8deadSopenharmony_ci    | genU64Type max(genU64Type x,                   |                                                    |
5005bd8deadSopenharmony_ci    |                uint64_t y)                     |                                                    |
5015bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
5025bd8deadSopenharmony_ci    | genI64Type clamp(genI64Type x,                 | Returns min(max(x, minVal), maxVal).               |
5035bd8deadSopenharmony_ci    |                  genI64Type minVal,            |                                                    |
5045bd8deadSopenharmony_ci    |                  genI64Type maxVal)            | Results are undefined if minVal > maxVal.          |
5055bd8deadSopenharmony_ci    | genI64Type clamp(genI64Type x,                 |                                                    |
5065bd8deadSopenharmony_ci    |                  int64_t minVal,               |                                                    |
5075bd8deadSopenharmony_ci    |                  int64_t maxVal)               |                                                    |
5085bd8deadSopenharmony_ci    | genU64Type clamp(genU64Type x,                 |                                                    |
5095bd8deadSopenharmony_ci    |                  genU64Type minVal,            |                                                    |
5105bd8deadSopenharmony_ci    |                  genU64Type maxVal)            |                                                    |
5115bd8deadSopenharmony_ci    | genU64Type clamp(genU64Type x,                 |                                                    |
5125bd8deadSopenharmony_ci    |                  uint64_t minVal,              |                                                    |
5135bd8deadSopenharmony_ci    |                  uint64_t maxVal)              |                                                    |
5145bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
5155bd8deadSopenharmony_ci    | genI64Type mix(genI64Type x,                   | Selects which vector each returned component comes |
5165bd8deadSopenharmony_ci    |                genI64Type y,                   | from. For a component of a that is false, the      |
5175bd8deadSopenharmony_ci    |                genBType a)                     | corresponding component of x is returned. For a    |
5185bd8deadSopenharmony_ci    | genU64Type mix(genU64Type x,                   | component of a that is true, the corresponding     |
5195bd8deadSopenharmony_ci    |                genU64Type y,                   | component of y is returned.                        |
5205bd8deadSopenharmony_ci    |                genBType a)                     |                                                    |
5215bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
5225bd8deadSopenharmony_ci    | genI64Type doubleBitsToInt64(genDType value)   | Returns a signed or unsigned 64-bit integer value  |
5235bd8deadSopenharmony_ci    | genU64Type doubleBitsToUint64(genDType value)  | representing the encoding of a double. The double  |
5245bd8deadSopenharmony_ci    |                                                | value's bit-level representation is preserved      |
5255bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
5265bd8deadSopenharmony_ci    | genDType int64BitsToDouble(genI64Type value)   | Returns a double value corresponding to a signed   |
5275bd8deadSopenharmony_ci    | genDType uint64BitsToDouble(genU64Type value)  | or unsigned integer encoding of a double. If a NaN |
5285bd8deadSopenharmony_ci    |                                                | is passed in, it will not signal, and the          |
5295bd8deadSopenharmony_ci    |                                                | resulting value is unspecified. If an Inf is       |
5305bd8deadSopenharmony_ci    |                                                | passed in, the resulting value is the              |
5315bd8deadSopenharmony_ci    |                                                | corresponding Inf.                                 |
5325bd8deadSopenharmony_ci    +------------------------------------------------+----------------------------------------------------+
5335bd8deadSopenharmony_ci
5345bd8deadSopenharmony_ci
5355bd8deadSopenharmony_ci    Rename Section 8.4, Floating-Point Pack and Unpack Functions to
5365bd8deadSopenharmony_ci    8.4, Floating-Point and Integer Pack and Unpack Functions
5375bd8deadSopenharmony_ci
5385bd8deadSopenharmony_ci
5395bd8deadSopenharmony_ci    Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions
5405bd8deadSopenharmony_ci
5415bd8deadSopenharmony_ci    (add to the table of pack and unpack functions on p. 141)
5425bd8deadSopenharmony_ci
5435bd8deadSopenharmony_ci    +-----------------------------------+------------------------------------------------------+
5445bd8deadSopenharmony_ci    | Syntax                            | Desciption                                           |
5455bd8deadSopenharmony_ci    +-----------------------------------+------------------------------------------------------+
5465bd8deadSopenharmony_ci    | int64_t packInt2x32(ivec2 v)      | Returns a signed or unsigned 64-bit integer obtained |
5475bd8deadSopenharmony_ci    | uint64_t packUint2x32(uvec2 v)    | by packing the components of a two-component signed  |
5485bd8deadSopenharmony_ci    |                                   | or unsigned integer vector, respectively. The first  |
5495bd8deadSopenharmony_ci    |                                   | vector component specifies the 32 least significant  |
5505bd8deadSopenharmony_ci    |                                   | bits; the second component specifies the 32 most     |
5515bd8deadSopenharmony_ci    |                                   | significant bits.                                    |
5525bd8deadSopenharmony_ci    +-----------------------------------+------------------------------------------------------+
5535bd8deadSopenharmony_ci    | ivec2 unpackInt2x32(int64_t v)    | Returns a signed or unsigned integer vector built    |
5545bd8deadSopenharmony_ci    | uvec2 unpackUint2x32(uint64_t v)  | from a 64-bit signed or unsigned integer scalar,     |
5555bd8deadSopenharmony_ci    |                                   | respectively. The first component of the vector      |
5565bd8deadSopenharmony_ci    |                                   | contains the 32 least significant bits of the input; |
5575bd8deadSopenharmony_ci    |                                   | the second component contains the 32 most            |
5585bd8deadSopenharmony_ci    |                                   | significant bits.                                    |
5595bd8deadSopenharmony_ci    +-----------------------------------+------------------------------------------------------+
5605bd8deadSopenharmony_ci
5615bd8deadSopenharmony_ci
5625bd8deadSopenharmony_ci    Modify Section, 8.7, Vector Relational Functions
5635bd8deadSopenharmony_ci
5645bd8deadSopenharmony_ci    (add to the table of placeholders at the top of p. 147)
5655bd8deadSopenharmony_ci
5665bd8deadSopenharmony_ci    +-------------+-----------------------------+
5675bd8deadSopenharmony_ci    | Placeholder | Specific Types Allowed      |
5685bd8deadSopenharmony_ci    +-------------+-----------------------------+
5695bd8deadSopenharmony_ci    | i64vec      | i64vec2, i64vec3, i64vec4   |
5705bd8deadSopenharmony_ci    | u64vec      | u64vec2, u64vec3, u64vec4   |
5715bd8deadSopenharmony_ci    +-------------+-----------------------------+
5725bd8deadSopenharmony_ci
5735bd8deadSopenharmony_ci    (add to the table of vector relational functions at the bottom of p. 147)
5745bd8deadSopenharmony_ci
5755bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5765bd8deadSopenharmony_ci    | Syntax                                    | Desciption                                    |
5775bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5785bd8deadSopenharmony_ci    | bvec lessThan(i64vec x, i64vec y)         | Returns the component-wise compare of x < y.  |
5795bd8deadSopenharmony_ci    | bvec lessThan(u64vec x, u64vec y)         |                                               |
5805bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5815bd8deadSopenharmony_ci    | bvec lessThanEqual(i64vec x, i64vec y)    | Returns the component-wise compare of x <= y. |
5825bd8deadSopenharmony_ci    | bvec lessThanEqual(u64vec x, u64vec y)    |                                               |
5835bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5845bd8deadSopenharmony_ci    | bvec greaterThan(i64vec x, i64vec y)      | Returns the component-wise compare of x > y.  |
5855bd8deadSopenharmony_ci    | bvec greaterThan(u64vec x, u64vec y)      |                                               |
5865bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5875bd8deadSopenharmony_ci    | bvec greaterThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x >= y. |
5885bd8deadSopenharmony_ci    | bvec greaterThanEqual(u64vec x, u64vec y) |                                               |
5895bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5905bd8deadSopenharmony_ci    | bvec equal(i64vec x, i64vec y)            | Returns the component-wise compare of x == y. |
5915bd8deadSopenharmony_ci    | bvec equal(u64vec x, u64vec y)            |                                               |
5925bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5935bd8deadSopenharmony_ci    | bvec notEqual(i64vec x, i64vec y)         | Returns the component-wise compare of x != y. |
5945bd8deadSopenharmony_ci    | bvec notEqual(u64vec x, u64vec y)         |                                               |
5955bd8deadSopenharmony_ci    +-------------------------------------------+-----------------------------------------------+
5965bd8deadSopenharmony_ci
5975bd8deadSopenharmony_ci
5985bd8deadSopenharmony_ci    Modify Section 9, Shading Language Grammar for Core Profile
5995bd8deadSopenharmony_ci
6005bd8deadSopenharmony_ci    (add to the list of tokens on p. 180)
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci      ...
6035bd8deadSopenharmony_ci      INT64 UINT64 I64VEC2 I64VEC3 I64VEC4 U64VEC2 U64VEC3 U64VEC4
6045bd8deadSopenharmony_ci      ...
6055bd8deadSopenharmony_ci      INT64CONSTANT UINT64CONSTANT
6065bd8deadSopenharmony_ci
6075bd8deadSopenharmony_ci    (add to the rule of "primary_expression" on p. 181)
6085bd8deadSopenharmony_ci
6095bd8deadSopenharmony_ci      primary_expression:
6105bd8deadSopenharmony_ci        ...
6115bd8deadSopenharmony_ci        INT64CONSTANT
6125bd8deadSopenharmony_ci        UINT64CONSTANT
6135bd8deadSopenharmony_ci        ...
6145bd8deadSopenharmony_ci
6155bd8deadSopenharmony_ci    (add to the rule of "type_specifier_nonarray" on p. 188)
6165bd8deadSopenharmony_ci
6175bd8deadSopenharmony_ci      type_specifier_nonarray:
6185bd8deadSopenharmony_ci        ...
6195bd8deadSopenharmony_ci        INT64
6205bd8deadSopenharmony_ci        UINT64
6215bd8deadSopenharmony_ci        ...
6225bd8deadSopenharmony_ci        I64VEC2
6235bd8deadSopenharmony_ci        I64VEC3
6245bd8deadSopenharmony_ci        I64VEC4
6255bd8deadSopenharmony_ci        U64VEC2
6265bd8deadSopenharmony_ci        U64VEC3
6275bd8deadSopenharmony_ci        U64VEC4
6285bd8deadSopenharmony_ci        ...
6295bd8deadSopenharmony_ci
6305bd8deadSopenharmony_ci
6315bd8deadSopenharmony_ciDependencies on NV_gpu_shader5
6325bd8deadSopenharmony_ci
6335bd8deadSopenharmony_ci    If the shader enables only NV_gpu_shader5, but not AMD_gpu_shader_int64
6345bd8deadSopenharmony_ci    then implicit conversions from int and uint types to int64_t and uint64_t
6355bd8deadSopenharmony_ci    types are not allowed. Also, the overloaded built-in functions abs,
6365bd8deadSopenharmony_ci    sign, min, max, clamp, and mix are not available.
6375bd8deadSopenharmony_ci
6385bd8deadSopenharmony_ci
6395bd8deadSopenharmony_ciDependencies on NV_shader_buffer_load
6405bd8deadSopenharmony_ci
6415bd8deadSopenharmony_ci    If NV_shader_buffer_load is supported, that specification should be edited
6425bd8deadSopenharmony_ci    as follows, to allow pointers to dereference the new data types added by
6435bd8deadSopenharmony_ci    this extension.
6445bd8deadSopenharmony_ci
6455bd8deadSopenharmony_ci    Modify "Section 2.20.X, Shader Memory Access" from NV_shader_buffer_load.
6465bd8deadSopenharmony_ci
6475bd8deadSopenharmony_ci    (add rules for loads of variables having the new data types from this
6485bd8deadSopenharmony_ci    extension to the list of bullets following "When a shader dereferences a
6495bd8deadSopenharmony_ci    pointer variable")
6505bd8deadSopenharmony_ci
6515bd8deadSopenharmony_ci    - Data of type int64_t and uint64_t are read from or written to memory as
6525bd8deadSopenharmony_ci      a signel 64-bit signed and unsigned integer value, respectively, at the
6535bd8deadSopenharmony_ci      specified GPU address.
6545bd8deadSopenharmony_ci
6555bd8deadSopenharmony_ci
6565bd8deadSopenharmony_ciDependencies on EXT_direct_state_access
6575bd8deadSopenharmony_ci
6585bd8deadSopenharmony_ci    If EXT_direct_state_access is supported, that specification should be
6595bd8deadSopenharmony_ci    edited as follows to include new ProgramUniform* functions.
6605bd8deadSopenharmony_ci
6615bd8deadSopenharmony_ci    (add to the list of ProgramUniform* commands)
6625bd8deadSopenharmony_ci
6635bd8deadSopenharmony_ci        void ProgramUniform{1,2,3,4}{i64,ui64}NV
6645bd8deadSopenharmony_ci            (uint program int location, T value);
6655bd8deadSopenharmony_ci        void ProgramUniform{1,2,3,4}{i64,ui64}vNV
6665bd8deadSopenharmony_ci            (uint program, int location, const T *value);
6675bd8deadSopenharmony_ci
6685bd8deadSopenharmony_ciDependencies on NV_vertex_attrib_integer_64bit
6695bd8deadSopenharmony_ci
6705bd8deadSopenharmony_ci    This extension only provides the ability to specify 64-bit integer input
6715bd8deadSopenharmony_ci    variables in a GLSL vertex shader, but does not provide a way to specify
6725bd8deadSopenharmony_ci    the values of the corresponding vertex attributes via the OpenGL API.
6735bd8deadSopenharmony_ci    The NV_vertex_attrib_integer_64bit extension exactly provides that
6745bd8deadSopenharmony_ci    functionality.
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci
6775bd8deadSopenharmony_ciDependencies on EXT_shader_integer_mix
6785bd8deadSopenharmony_ci
6795bd8deadSopenharmony_ci    If EXT_shader_integer_mix is not supported remove all references to the
6805bd8deadSopenharmony_ci    new overloaded built-in functions of mix.
6815bd8deadSopenharmony_ci
6825bd8deadSopenharmony_ci
6835bd8deadSopenharmony_ciErrors
6845bd8deadSopenharmony_ci
6855bd8deadSopenharmony_ci    None.
6865bd8deadSopenharmony_ci
6875bd8deadSopenharmony_ciNew State
6885bd8deadSopenharmony_ci
6895bd8deadSopenharmony_ci    None.
6905bd8deadSopenharmony_ci
6915bd8deadSopenharmony_ciNew Implementation Dependent State
6925bd8deadSopenharmony_ci
6935bd8deadSopenharmony_ci    None.
6945bd8deadSopenharmony_ci
6955bd8deadSopenharmony_ciIssues
6965bd8deadSopenharmony_ci
6975bd8deadSopenharmony_ci    (1) How the functionality in this extension different than the 64-bit
6985bd8deadSopenharmony_ci        integer support introduced by NV_gpu_shader5?
6995bd8deadSopenharmony_ci
7005bd8deadSopenharmony_ci      RESOLVED: This extension is designed to be source code compatible with
7015bd8deadSopenharmony_ci      the 64-bit integer support in NV_gpu_shader5. However, it is a
7025bd8deadSopenharmony_ci      functional superset of that, as it adds the following additional
7035bd8deadSopenharmony_ci      features:
7045bd8deadSopenharmony_ci
7055bd8deadSopenharmony_ci        * support for overloaded versions of the functions abs, sign, min,
7065bd8deadSopenharmony_ci          max, clamp, and mix that accept 64-bit integers as parameters.
7075bd8deadSopenharmony_ci
7085bd8deadSopenharmony_ci    (2) How do the implicit conversions impact binary operators?
7095bd8deadSopenharmony_ci
7105bd8deadSopenharmony_ci      RESOLVED: For binary operators, we prefer converting to a common type
7115bd8deadSopenharmony_ci      that is as close as possible in size and type to the original
7125bd8deadSopenharmony_ci      expression.
7135bd8deadSopenharmony_ci
7145bd8deadSopenharmony_ci    (3) How do the implicit conversions impact function overloading rules?
7155bd8deadSopenharmony_ci
7165bd8deadSopenharmony_ci      RESOLVED: We extend the preference rules in core OpenGL to account
7175bd8deadSopenharmony_ci      for the new data types, adding a rule to favor conversion from 32-bit
7185bd8deadSopenharmony_ci      integers to 64-bit integers over coversions to floating-point values.
7195bd8deadSopenharmony_ci
7205bd8deadSopenharmony_ci    (4) What should be done to distinguish between 32- and 64-bit integer
7215bd8deadSopenharmony_ci        constants?
7225bd8deadSopenharmony_ci
7235bd8deadSopenharmony_ci      RESOLVED: We will use "L" and "UL" to identify signed and unsigned
7245bd8deadSopenharmony_ci      64-bit integer constants; the use of "L" matches a similar ("long")
7255bd8deadSopenharmony_ci      suffix in the C programming language.  C leaves the size of integer
7265bd8deadSopenharmony_ci      types implementation-dependent, and many implementations require an "LL"
7275bd8deadSopenharmony_ci      suffix to declare 64-bit integer constants.  With our size definitions,
7285bd8deadSopenharmony_ci      "L" will be considered sufficient to make an integer constant 64-bit.
7295bd8deadSopenharmony_ci
7305bd8deadSopenharmony_ci    (5) Should provide support for vertex attributes with 64-bit components,
7315bd8deadSopenharmony_ci        and if so, how should the support be provided in the OpenGL API?
7325bd8deadSopenharmony_ci
7335bd8deadSopenharmony_ci      RESOLVED: Yes, but in order to specify 64-bit vertex attribute values
7345bd8deadSopenharmony_ci      in the OpenGL API support for NV_vertex_attrib_integer_64bit or a
7355bd8deadSopenharmony_ci      similar extension is also required.
7365bd8deadSopenharmony_ci
7375bd8deadSopenharmony_ci    (6) Should we support 64-bit integer uniforms in the default uniform
7385bd8deadSopenharmony_ci        block?
7395bd8deadSopenharmony_ci
7405bd8deadSopenharmony_ci      DISCUSSION: There isn't much value in extending the standalone uniform
7415bd8deadSopenharmony_ci      API, as uniform buffers provide a way more efficient way to feed
7425bd8deadSopenharmony_ci      uniforms to the shaders, but in order to achieve feature parity with
7435bd8deadSopenharmony_ci      the 64-bit integer support in NV_gpu_shader5 it might be favorable to
7445bd8deadSopenharmony_ci      add support for it.
7455bd8deadSopenharmony_ci
7465bd8deadSopenharmony_ci      RESOLVED: Yes, for compatibility with NV_gpu_shader5.
7475bd8deadSopenharmony_ci
7485bd8deadSopenharmony_ci    (7) Should we support 64-bit integer types as members of uniform blocks,
7495bd8deadSopenharmony_ci        shader storage buffer blocks, or as transform feedback varyings?
7505bd8deadSopenharmony_ci
7515bd8deadSopenharmony_ci      RESOLVED: Yes, support all of them. 64-bit integers will consume eight
7525bd8deadSopenharmony_ci      basic machine units just like double-precision floating-point variables.
7535bd8deadSopenharmony_ci
7545bd8deadSopenharmony_ci    (8) How do the uniform loading commands introduced by this extension
7555bd8deadSopenharmony_ci        interact similar commands added by NV_shader_buffer_load?
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci      RESOLVED: NV_shader_buffer_load provided the command Uniformui64NV to
7585bd8deadSopenharmony_ci      load pointer uniforms with a single 64-bit unsigned integer.  This
7595bd8deadSopenharmony_ci      extension provides vectors of 64-bit unsigned integers, so we needed
7605bd8deadSopenharmony_ci      Uniform{2,3,4}ui64NV commands.  We chose to provide a Uniform1ui64NV
7615bd8deadSopenharmony_ci      command, which will be functionally equivalent to Uniformui64NV.
7625bd8deadSopenharmony_ci
7635bd8deadSopenharmony_ci    (9) Should we provide distinct sized types for 32-bit integers, floats,
7645bd8deadSopenharmony_ci        and doubles?
7655bd8deadSopenharmony_ci
7665bd8deadSopenharmony_ci      RESOLVED: No. While NV_gpu_shader5 does add such types, it seems there
7675bd8deadSopenharmony_ci      isn't much value in adding those in this extension, especially because
7685bd8deadSopenharmony_ci      this extension strictly focuses on supporting 64-bit integers.
7695bd8deadSopenharmony_ci
7705bd8deadSopenharmony_ci    (10) Can the 64-bit uniform APIs be used to load values for uniforms of
7715bd8deadSopenharmony_ci         type "bool", "bvec2", "bvec3", or "bvec4"?
7725bd8deadSopenharmony_ci
7735bd8deadSopenharmony_ci      RESOLVED: No. OpenGL 2.0 and beyond did allow "bool" variable to be
7745bd8deadSopenharmony_ci      set with Uniform*i* and Uniform*f APIs, and OpenGL 3.0 extended that
7755bd8deadSopenharmony_ci      support to Uniform*ui* for orthogonality.  But it seems pointless to
7765bd8deadSopenharmony_ci      extended this capability forward to 64-bit Uniform APIs as well.
7775bd8deadSopenharmony_ci
7785bd8deadSopenharmony_ci    (11) There exists both an UNSIGNED_INT64_AMD and UNSIGNED_INT64_NV token
7795bd8deadSopenharmony_ci         with different values (the former existed earlier) so which one
7805bd8deadSopenharmony_ci         this extension should use?
7815bd8deadSopenharmony_ci
7825bd8deadSopenharmony_ci      DISCUSSION: No functions in this extension accept these values as
7835bd8deadSopenharmony_ci      inputs, they only should return one of these in various scenarios.
7845bd8deadSopenharmony_ci
7855bd8deadSopenharmony_ci      RESOLVED: This extension will return the value of UNSIGNED_INT64_NV to
7865bd8deadSopenharmony_ci      stay source code compatible with NV_gpu_shader5. However, future
7875bd8deadSopenharmony_ci      extensions that should accept any of these tokens as inputs should
7885bd8deadSopenharmony_ci      accept both of them.
7895bd8deadSopenharmony_ci
7905bd8deadSopenharmony_ciRevision History
7915bd8deadSopenharmony_ci
7925bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
7935bd8deadSopenharmony_ci    ----  --------  --------  -------------------------------------------------
7945bd8deadSopenharmony_ci     3    07/07/14  drakos    Fixed inconsistency in implicit conversion rules.
7955bd8deadSopenharmony_ci     2    31/04/14  gsellers  Ready to post.
7965bd8deadSopenharmony_ci     1    10/09/13  drakos    Initial revision.
797