15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_gpu_shader4
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_gpu_shader4
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Barthold Lichtenbelt, NVIDIA (blichtenbelt 'at' nvidia.com)
125bd8deadSopenharmony_ci    Pat Brown, NVIDIA (pbrown 'at' nvidia.com)
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciStatus
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    Multi vendor extension
175bd8deadSopenharmony_ci 
185bd8deadSopenharmony_ci    Shipping for GeForce 8 Series (November 2006) 
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ciVersion
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ci    Last Modified Date:         12/14/2009
235bd8deadSopenharmony_ci    Author revision:            16
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciNumber
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    326
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ciDependencies
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    OpenGL 2.0 is required.
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    This extension is written against the OpenGL 2.0 specification and version
345bd8deadSopenharmony_ci    1.10.59 of the OpenGL Shading Language specification.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    This extension trivially interacts with ARB_texture_rectangle.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    This extension trivially interacts with GL_EXT_texture_array.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    This extension trivially interacts with GL_EXT_texture_integer.
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    This extension trivially interacts with GL_EXT_geometry_shader4
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    This extension trivially interacts with GL_EXT_texture_buffer_object.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    NV_primitive_restart trivially affects the definition of this extension.
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    ARB_color_buffer_float affects the definition of this extension.
495bd8deadSopenharmony_ci    EXT_draw_instanced affects the definition of this extension.
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ciOverview
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    This extension provides a set of new features to the OpenGL Shading
545bd8deadSopenharmony_ci    Language and related APIs to support capabilities of new hardware. In
555bd8deadSopenharmony_ci    particular, this extension provides the following functionality:
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci       * New texture lookup functions are provided that allow shaders to
585bd8deadSopenharmony_ci         access individual texels using integer coordinates referring to the
595bd8deadSopenharmony_ci         texel location and level of detail. No filtering is performed. These
605bd8deadSopenharmony_ci         functions allow applications to use textures as one-, two-, and
615bd8deadSopenharmony_ci         three-dimensional arrays.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci       * New texture lookup functions are provided that allow shaders to query
645bd8deadSopenharmony_ci         the dimensions of a specific level-of-detail image of a texture
655bd8deadSopenharmony_ci         object.
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci       * New texture lookup functions variants are provided that allow shaders
685bd8deadSopenharmony_ci         to pass a constant integer vector used to offset the texel locations
695bd8deadSopenharmony_ci         used during the lookup to assist in custom texture filtering
705bd8deadSopenharmony_ci         operations.
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci       * New texture lookup functions are provided that allow shaders to
735bd8deadSopenharmony_ci         access one- and two-dimensional array textures. The second, or third,
745bd8deadSopenharmony_ci         coordinate is used to select the layer of the array to access.
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci       * New "Grad" texture lookup functions are provided that allow shaders
775bd8deadSopenharmony_ci         to explicitely pass in derivative values which are used by the GL to
785bd8deadSopenharmony_ci         compute the level-of-detail when performing a texture lookup.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci       * A new texture lookup function is provided to access a buffer texture.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci       * The existing absolute LOD texture lookup functions are no longer
835bd8deadSopenharmony_ci         restricted to the vertex shader only.
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci       * The ability to specify and use cubemap textures with a
865bd8deadSopenharmony_ci         DEPTH_COMPONENT internal format. This also enables shadow mapping on
875bd8deadSopenharmony_ci         cubemaps. The 'q' coordinate is used as the reference value for
885bd8deadSopenharmony_ci         comparisons. A set of new texture lookup functions is provided to
895bd8deadSopenharmony_ci         lookup into shadow cubemaps.
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci       * The ability to specify if varying variables are interpolated in a
925bd8deadSopenharmony_ci         non-perspective correct manner, if they are flat shaded or, if
935bd8deadSopenharmony_ci         multi-sampling, if centroid sampling should be performed.
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci       * Full signed integer and unsigned integer support in the OpenGL
965bd8deadSopenharmony_ci         Shading Language:
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci             - Integers are defined as 32 bit values using two's complement.
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci             - Unsigned integers and vectors thereof are added.
1015bd8deadSopenharmony_ci
1025bd8deadSopenharmony_ci             - New texture lookup functions are provided that return integer
1035bd8deadSopenharmony_ci               values. These functions are to be used in conjunction with new
1045bd8deadSopenharmony_ci               texture formats whose components are actual integers, rather
1055bd8deadSopenharmony_ci               than integers that encode a floating-point value. To support
1065bd8deadSopenharmony_ci               these lookup functions, new integer and unsigned-integer
1075bd8deadSopenharmony_ci               sampler types are introduced.
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci             - Integer bitwise operators are now enabled.
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci             - Several built-in functions and operators now operate on
1125bd8deadSopenharmony_ci               integers or vectors of integers.
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci             - New vertex attribute functions are added that load integer
1155bd8deadSopenharmony_ci               attribute data and can be referenced in a vertex shader as
1165bd8deadSopenharmony_ci               integer data.
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci             - New uniform loading commands are added to load unsigned integer
1195bd8deadSopenharmony_ci               data.
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci             - Varying variables can now be (unsigned) integers. If declared
1225bd8deadSopenharmony_ci               as such, they have to be flat shaded.
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci             - Fragment shaders can define their own output variables, and
1255bd8deadSopenharmony_ci               declare them to be of type floating-point, integer or unsigned
1265bd8deadSopenharmony_ci               integer. These variables are bound to a fragment color index
1275bd8deadSopenharmony_ci               with the new API command BindFragDataLocationEXT(), and directed
1285bd8deadSopenharmony_ci               to buffers using the existing DrawBuffer or DrawBuffers API
1295bd8deadSopenharmony_ci               commands.
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci       * Added new built-in functions truncate() and round() to the shading
1325bd8deadSopenharmony_ci         language.
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci       * A new built-in variable accessible from within vertex shaders that
1355bd8deadSopenharmony_ci         holds the index <i> implicitly passed to ArrayElement to specify the
1365bd8deadSopenharmony_ci         vertex. This is called the vertex ID.
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci       * A new built-in variable accessible from within fragment and geometry
1395bd8deadSopenharmony_ci         shaders that hold the index of the currently processed
1405bd8deadSopenharmony_ci         primitive. This is called the primitive ID.
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    This extension also briefly mentions a new shader type, called a geometry
1435bd8deadSopenharmony_ci    shader. A geometry shader is run after vertices are transformed, but
1445bd8deadSopenharmony_ci    before clipping. A geometry shader begins with a single primitive (point,
1455bd8deadSopenharmony_ci    line, triangle. It can read the attributes of any of the vertices in the
1465bd8deadSopenharmony_ci    primitive and use them to generate new primitives. A geometry shader has a
1475bd8deadSopenharmony_ci    fixed output primitive type (point, line strip, or triangle strip) and
1485bd8deadSopenharmony_ci    emits vertices to define a new primitive. Geometry shaders are discussed
1495bd8deadSopenharmony_ci    in detail in the GL_EXT_geometry_shader4 specification.
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ciNew Procedures and Functions
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    void VertexAttribI1iEXT(uint index, int x);
1545bd8deadSopenharmony_ci    void VertexAttribI2iEXT(uint index, int x, int y);
1555bd8deadSopenharmony_ci    void VertexAttribI3iEXT(uint index, int x, int y, int z);
1565bd8deadSopenharmony_ci    void VertexAttribI4iEXT(uint index, int x, int y, int z, int w);
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    void VertexAttribI1uiEXT(uint index, uint x);
1595bd8deadSopenharmony_ci    void VertexAttribI2uiEXT(uint index, uint x, uint y);
1605bd8deadSopenharmony_ci    void VertexAttribI3uiEXT(uint index, uint x, uint y, uint z);
1615bd8deadSopenharmony_ci    void VertexAttribI4uiEXT(uint index, uint x, uint y, uint z,
1625bd8deadSopenharmony_ci                            uint w);
1635bd8deadSopenharmony_ci
1645bd8deadSopenharmony_ci    void VertexAttribI1ivEXT(uint index, const int *v);
1655bd8deadSopenharmony_ci    void VertexAttribI2ivEXT(uint index, const int *v);
1665bd8deadSopenharmony_ci    void VertexAttribI3ivEXT(uint index, const int *v);
1675bd8deadSopenharmony_ci    void VertexAttribI4ivEXT(uint index, const int *v);
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    void VertexAttribI1uivEXT(uint index, const uint *v);
1705bd8deadSopenharmony_ci    void VertexAttribI2uivEXT(uint index, const uint *v);
1715bd8deadSopenharmony_ci    void VertexAttribI3uivEXT(uint index, const uint *v);
1725bd8deadSopenharmony_ci    void VertexAttribI4uivEXT(uint index, const uint *v);
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci    void VertexAttribI4bvEXT(uint index, const byte *v);
1755bd8deadSopenharmony_ci    void VertexAttribI4svEXT(uint index, const short *v);
1765bd8deadSopenharmony_ci    void VertexAttribI4ubvEXT(uint index, const ubyte *v);
1775bd8deadSopenharmony_ci    void VertexAttribI4usvEXT(uint index, const ushort *v);
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ci    void VertexAttribIPointerEXT(uint index, int size, enum type,
1805bd8deadSopenharmony_ci                                sizei stride, const void *pointer);
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci    void GetVertexAttribIivEXT(uint index, enum pname, int *params);
1835bd8deadSopenharmony_ci    void GetVertexAttribIuivEXT(uint index, enum pname,
1845bd8deadSopenharmony_ci                               uint *params);
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci    void Uniform1uiEXT(int location, uint v0);
1875bd8deadSopenharmony_ci    void Uniform2uiEXT(int location, uint v0, uint v1);
1885bd8deadSopenharmony_ci    void Uniform3uiEXT(int location, uint v0, uint v1, uint v2);
1895bd8deadSopenharmony_ci    void Uniform4uiEXT(int location, uint v0, uint v1, uint v2,
1905bd8deadSopenharmony_ci                      uint v3);
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci    void Uniform1uivEXT(int location, sizei count, const uint *value);
1935bd8deadSopenharmony_ci    void Uniform2uivEXT(int location, sizei count, const uint *value);
1945bd8deadSopenharmony_ci    void Uniform3uivEXT(int location, sizei count, const uint *value);
1955bd8deadSopenharmony_ci    void Uniform4uivEXT(int location, sizei count, const uint *value);
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci    void GetUniformuivEXT(uint program, int location, uint *params);
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci    void BindFragDataLocationEXT(uint program, uint colorNumber,
2005bd8deadSopenharmony_ci                                const char *name);
2015bd8deadSopenharmony_ci    int GetFragDataLocationEXT(uint program, const char *name);
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ciNew Tokens
2045bd8deadSopenharmony_ci
2055bd8deadSopenharmony_ci    Accepted by the <pname> parameters of GetVertexAttribdv,
2065bd8deadSopenharmony_ci    GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIuivEXT and
2075bd8deadSopenharmony_ci    GetVertexAttribIivEXT:
2085bd8deadSopenharmony_ci
2095bd8deadSopenharmony_ci      VERTEX_ATTRIB_ARRAY_INTEGER_EXT                    0x88FD
2105bd8deadSopenharmony_ci
2115bd8deadSopenharmony_ci    Returned by the <type> parameter of GetActiveUniform:
2125bd8deadSopenharmony_ci
2135bd8deadSopenharmony_ci      SAMPLER_1D_ARRAY_EXT                               0x8DC0
2145bd8deadSopenharmony_ci      SAMPLER_2D_ARRAY_EXT                               0x8DC1
2155bd8deadSopenharmony_ci      SAMPLER_BUFFER_EXT                                 0x8DC2
2165bd8deadSopenharmony_ci      SAMPLER_1D_ARRAY_SHADOW_EXT                        0x8DC3
2175bd8deadSopenharmony_ci      SAMPLER_2D_ARRAY_SHADOW_EXT                        0x8DC4
2185bd8deadSopenharmony_ci      SAMPLER_CUBE_SHADOW_EXT                            0x8DC5
2195bd8deadSopenharmony_ci      UNSIGNED_INT                                       0x1405
2205bd8deadSopenharmony_ci      UNSIGNED_INT_VEC2_EXT                              0x8DC6
2215bd8deadSopenharmony_ci      UNSIGNED_INT_VEC3_EXT                              0x8DC7
2225bd8deadSopenharmony_ci      UNSIGNED_INT_VEC4_EXT                              0x8DC8
2235bd8deadSopenharmony_ci      INT_SAMPLER_1D_EXT                                 0x8DC9
2245bd8deadSopenharmony_ci      INT_SAMPLER_2D_EXT                                 0x8DCA
2255bd8deadSopenharmony_ci      INT_SAMPLER_3D_EXT                                 0x8DCB
2265bd8deadSopenharmony_ci      INT_SAMPLER_CUBE_EXT                               0x8DCC
2275bd8deadSopenharmony_ci      INT_SAMPLER_2D_RECT_EXT                            0x8DCD
2285bd8deadSopenharmony_ci      INT_SAMPLER_1D_ARRAY_EXT                           0x8DCE
2295bd8deadSopenharmony_ci      INT_SAMPLER_2D_ARRAY_EXT                           0x8DCF
2305bd8deadSopenharmony_ci      INT_SAMPLER_BUFFER_EXT                             0x8DD0
2315bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_1D_EXT                        0x8DD1
2325bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_2D_EXT                        0x8DD2
2335bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_3D_EXT                        0x8DD3
2345bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_CUBE_EXT                      0x8DD4
2355bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_2D_RECT_EXT                   0x8DD5
2365bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT                  0x8DD6
2375bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT                  0x8DD7
2385bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_BUFFER_EXT                    0x8DD8
2395bd8deadSopenharmony_ci
2405bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
2415bd8deadSopenharmony_ci    and GetDoublev:
2425bd8deadSopenharmony_ci
2435bd8deadSopenharmony_ci      MIN_PROGRAM_TEXEL_OFFSET_EXT                       0x8904
2445bd8deadSopenharmony_ci      MAX_PROGRAM_TEXEL_OFFSET_EXT                       0x8905
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL
2475bd8deadSopenharmony_ciOperation)
2485bd8deadSopenharmony_ci
2495bd8deadSopenharmony_ci    Modify Section 2.7 "Vertex Specification", p.20
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    Insert before last paragraph, p.22:
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci    The VertexAttrib* commands described so far should not be used to load
2545bd8deadSopenharmony_ci    data for vertex attributes declared as signed or unsigned integers or
2555bd8deadSopenharmony_ci    vectors thereof in a vertex shader. If they are used to load signed or
2565bd8deadSopenharmony_ci    unsigned integer vertex attributes, the value in those attributes are
2575bd8deadSopenharmony_ci    undefined. Instead use the commands
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ci      void VertexAttribI[1234]{i,ui}EXT(uint index, T values);
2605bd8deadSopenharmony_ci      void VertexAttribI[1234]{i,ui}vEXT(uint index, T values);
2615bd8deadSopenharmony_ci      void VertexAttribI4{b,s,ub,us}vEXT(uint index, T values);
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci    to specify fixed-point attributes that are not converted to
2645bd8deadSopenharmony_ci    floating-point. These attributes can be accessed in vertex shaders that
2655bd8deadSopenharmony_ci    declare attributes as signed or unsigned integers or vectors.  The
2665bd8deadSopenharmony_ci    VertexAttribI4* commands extend the data passed in to a full signed or
2675bd8deadSopenharmony_ci    unsigned integer. If a VertexAttribI* command is used that does not match
2685bd8deadSopenharmony_ci    the type of the attribute declared in a vertex shader, the values in the
2695bd8deadSopenharmony_ci    attributes are undefined. This means that the unsigned versions of the
2705bd8deadSopenharmony_ci    VertexAttribI* commands need to be used to load data for unsigned integer
2715bd8deadSopenharmony_ci    vertex attributes or vectors, and the signed versions of the
2725bd8deadSopenharmony_ci    VertexAttribI* commands for signed integer vertex attributes or
2735bd8deadSopenharmony_ci    vectors. Note that this also means that the VertexAttribI* commands should
2745bd8deadSopenharmony_ci    not be used to load data for a vertex attribute declared as a float, float
2755bd8deadSopenharmony_ci    vector or matrix, otherwise their values are undefined.
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci    Insert at end of function list, p.24:
2785bd8deadSopenharmony_ci
2795bd8deadSopenharmony_ci    void VertexAttribIPointerEXT(uint index, int size, enum type,
2805bd8deadSopenharmony_ci                                sizei stride, const void *pointer);
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci    (modify last paragraph, p.24) The <index> parameter in the
2835bd8deadSopenharmony_ci    VertexAttribPointer and VertexAttribIPointerEXT commands identify the
2845bd8deadSopenharmony_ci    generic vertex attribute array being described. The error INVALID_VALUE is
2855bd8deadSopenharmony_ci    generated if <index> is greater than or equal to
2865bd8deadSopenharmony_ci    MAX_VERTEX_ATTRIBS. Generic attribute arrays with integer <type> arguments
2875bd8deadSopenharmony_ci    can be handled in one of three ways:  converted to float by normalizing to
2885bd8deadSopenharmony_ci    [0,1] or [-1,1] as specified in table 2.9, converted directly to float, or
2895bd8deadSopenharmony_ci    left as integers. Data for an array specified by VertexAttribPointer will
2905bd8deadSopenharmony_ci    be converted to floating-point by normalizing if the <normalized>
2915bd8deadSopenharmony_ci    parameter is TRUE, and converted directly to floating-point
2925bd8deadSopenharmony_ci    otherwise. Data for an array specified by VertexAttribIPointerEXT will
2935bd8deadSopenharmony_ci    always be left as integer values.
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci    (modify Table 2.4, p. 25)
2965bd8deadSopenharmony_ci                                       Integer
2975bd8deadSopenharmony_ci    Command                   Sizes    Handling      Types
2985bd8deadSopenharmony_ci    ----------------------    -------  ---------     -----------------
2995bd8deadSopenharmony_ci    VertexPointer             2,3,4    cast          ...
3005bd8deadSopenharmony_ci    NormalPointer             3        normalize     ...
3015bd8deadSopenharmony_ci    ColorPointer              3,4      normalize     ...
3025bd8deadSopenharmony_ci    SecondaryColorPointer     3        normalize     ...
3035bd8deadSopenharmony_ci    IndexPointer              1        cast          ...
3045bd8deadSopenharmony_ci    FogCoordPointer           1        n/a           ...
3055bd8deadSopenharmony_ci    TexCoordPointer           1,2,3,4  cast          ...
3065bd8deadSopenharmony_ci    EdgeFlagPointer           1        integer       ...
3075bd8deadSopenharmony_ci    VertexAttribPointer       1,2,3,4  flag          ...
3085bd8deadSopenharmony_ci    VertexAttribIPointerEXT   1,2,3,4  integer       byte, ubyte,
3095bd8deadSopenharmony_ci                                                     short, ushort,
3105bd8deadSopenharmony_ci                                                     int, uint
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ci    Table 2.4:  Vertex array sizes (values per vertex) and data types.  The
3135bd8deadSopenharmony_ci    "integer handling" column indicates how fixed-point data types are
3145bd8deadSopenharmony_ci    handled: "cast" means that they converted to floating-point directly,
3155bd8deadSopenharmony_ci    "normalize" means that they are converted to floating-point by normalizing
3165bd8deadSopenharmony_ci    to [0,1] (for unsigned types) or [-1,1] (for signed types), "integer"
3175bd8deadSopenharmony_ci    means that they remain as integer values, and "flag" means that either
3185bd8deadSopenharmony_ci    "cast" or "normalized" applies, depending on the setting of the
3195bd8deadSopenharmony_ci    <normalized> flag in VertexAttribPointer.
3205bd8deadSopenharmony_ci
3215bd8deadSopenharmony_ci    (modify end of pseudo-code, pp. 27-28)
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci      for (j = 1; j < genericAttributes; j++) {
3245bd8deadSopenharmony_ci        if (generic vertex attribute j array enabled) {
3255bd8deadSopenharmony_ci          if (generic vertex attribute j array is a pure integer array)
3265bd8deadSopenharmony_ci          {
3275bd8deadSopenharmony_ci            VertexAttribI[size][type]vEXT(j, generic vertex attribute j
3285bd8deadSopenharmony_ci                                            array element i);
3295bd8deadSopenharmony_ci          } else if (generic vertex attribute j array normalization
3305bd8deadSopenharmony_ci                     flag is set and <type> is not FLOAT or DOUBLE) {
3315bd8deadSopenharmony_ci            VertexAttrib[size]N[type]v(j, generic verex attribute j
3325bd8deadSopenharmony_ci                                          array element i);
3335bd8deadSopenharmony_ci          } else {
3345bd8deadSopenharmony_ci            VertexAttrib[size][type]v(j, generic verex attribute j
3355bd8deadSopenharmony_ci                                         array element i);
3365bd8deadSopenharmony_ci          }
3375bd8deadSopenharmony_ci        }
3385bd8deadSopenharmony_ci      }
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci      if (generic vertex attribute 0 array enabled) {
3415bd8deadSopenharmony_ci        if (generic vertex attribute 0 array is a pure integer array) {
3425bd8deadSopenharmony_ci          VertexAttribI[size][type]vEXT(0, generic verex attribute 0
3435bd8deadSopenharmony_ci                                          array element i);
3445bd8deadSopenharmony_ci        } else if (generic vertex attribute 0 array normalization flag
3455bd8deadSopenharmony_ci                   is set and <type> is not FLOAT or DOUBLE) {
3465bd8deadSopenharmony_ci         VertexAttrib[size]N[type]v(0, generic verex attribute 0
3475bd8deadSopenharmony_ci                                       array element i);
3485bd8deadSopenharmony_ci        } else {
3495bd8deadSopenharmony_ci          VertexAttrib[size][type]v(0, generic verex attribute 0
3505bd8deadSopenharmony_ci                                       array element i);
3515bd8deadSopenharmony_ci        }
3525bd8deadSopenharmony_ci      }
3535bd8deadSopenharmony_ci
3545bd8deadSopenharmony_ci    Modify section 2.14.7, "Flatshading", p. 69
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci    Add a new paragraph at the end of the section on p. 70 as follows:
3575bd8deadSopenharmony_ci
3585bd8deadSopenharmony_ci    If a vertex or geometry shader is active, the flat shading control
3595bd8deadSopenharmony_ci    described so far applies to the built-in varying variables gl_FrontColor,
3605bd8deadSopenharmony_ci    gl_BackColor, gl_FrontSecondaryColor and gl_BackSecondaryColor. Through
3615bd8deadSopenharmony_ci    the OpenGL Shading Language varying qualifier flat any vertex attribute
3625bd8deadSopenharmony_ci    can be flagged to be flat-shaded. See the OpenGL Shading Language
3635bd8deadSopenharmony_ci    Specification section 4.3.6 for more information.
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci    Modify section 2.14.8, "Color and Associated Data Clipping", p. 71
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ci    Add to the end of this section:
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci    For vertex shader varying variables specified to be interpolated without
3705bd8deadSopenharmony_ci    perspective correction (using the noperspective keyword), the value of t
3715bd8deadSopenharmony_ci    used to obtain the varying value associated with P will be adjusted to
3725bd8deadSopenharmony_ci    produce results that vary linearly in screen space.
3735bd8deadSopenharmony_ci
3745bd8deadSopenharmony_ci    Modify section 2.15.3, "Shader Variables", page 75
3755bd8deadSopenharmony_ci
3765bd8deadSopenharmony_ci    Add the following new return types to the description of GetActiveUniform
3775bd8deadSopenharmony_ci    on p. 81.
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ci      SAMPLER_1D_ARRAY_EXT,
3805bd8deadSopenharmony_ci      SAMPLER_2D_ARRAY_EXT,
3815bd8deadSopenharmony_ci      SAMPLER_1D_ARRAY_SHADOW_EXT,
3825bd8deadSopenharmony_ci      SAMPLER_2D_ARRAY_SHADOW_EXT,
3835bd8deadSopenharmony_ci      SAMPLER_CUBE_SHADOW_EXT,
3845bd8deadSopenharmony_ci      SAMPLER_BUFFER_EXT,
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci      INT_SAMPLER_1D_EXT,
3875bd8deadSopenharmony_ci      INT_SAMPLER_2D_EXT,
3885bd8deadSopenharmony_ci      INT_SAMPLER_3D_EXT,
3895bd8deadSopenharmony_ci      INT_SAMPLER_CUBE_EXT,
3905bd8deadSopenharmony_ci      INT_SAMPLER_2D_RECT_EXT,
3915bd8deadSopenharmony_ci      INT_SAMPLER_1D_ARRAY_EXT,
3925bd8deadSopenharmony_ci      INT_SAMPLER_2D_ARRAY_EXT,
3935bd8deadSopenharmony_ci      INT_SAMPLER_BUFFER_EXT,
3945bd8deadSopenharmony_ci
3955bd8deadSopenharmony_ci      UNSIGNED_INT,
3965bd8deadSopenharmony_ci      UNSIGNED_INT_VEC2_EXT,
3975bd8deadSopenharmony_ci      UNSIGNED_INT_VEC3_EXT,
3985bd8deadSopenharmony_ci      UNSIGNED_INT_VEC4_EXT,
3995bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_1D_EXT,
4005bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_2D_EXT,
4015bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_3D_EXT,
4025bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_CUBE_EXT,
4035bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_2D_RECT_EXT,
4045bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT,
4055bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT,
4065bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_BUFFER_EXT.
4075bd8deadSopenharmony_ci  
4085bd8deadSopenharmony_ci    Add the following uniform loading command prototypes on p. 81 as follows:
4095bd8deadSopenharmony_ci
4105bd8deadSopenharmony_ci      void Uniform{1234}uiEXT(int location, T value);
4115bd8deadSopenharmony_ci      void Uniform{1234}uivEXT(int location, sizei count, T value);
4125bd8deadSopenharmony_ci
4135bd8deadSopenharmony_ci    (add the following paragraph to the description of the above
4145bd8deadSopenharmony_ci    commands)
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    The Uniform*ui{v} commands will load count sets of one to four unsigned
4175bd8deadSopenharmony_ci    integer values into a uniform location defined as a unsigned integer, an
4185bd8deadSopenharmony_ci    unsigned integer vector, an array of unsigned integers or an array of
4195bd8deadSopenharmony_ci    unsigned integer vectors.
4205bd8deadSopenharmony_ci
4215bd8deadSopenharmony_ci    (change the first sentence of the last paragraph as follows)
4225bd8deadSopenharmony_ci
4235bd8deadSopenharmony_ci    When loading values for a uniform declared as a Boolean, the Uniform*i{v},
4245bd8deadSopenharmony_ci    Uniform*ui{v} and Uniform*f{v} set of commands can be used to load boolean
4255bd8deadSopenharmony_ci    values.
4265bd8deadSopenharmony_ci
4275bd8deadSopenharmony_ci    Modify section 2.15.4 Shader execution, p. 84.
4285bd8deadSopenharmony_ci
4295bd8deadSopenharmony_ci    Add a new section "2.15.4.1 Shader Only Texturing" before the sub-
4305bd8deadSopenharmony_ci    section "Texture Access" on p. 85
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci    This section describes texture functionality that is only accessible
4335bd8deadSopenharmony_ci    through vertex, geometry or fragment shaders. Also refer to the OpenGL
4345bd8deadSopenharmony_ci    Shading Language Specification, section 8.7 and Section 3.8 of the OpenGL
4355bd8deadSopenharmony_ci    2.0 specification.
4365bd8deadSopenharmony_ci
4375bd8deadSopenharmony_ci    Note: For unextended OpenGL 2.0 and the OpenGL Shading Language version
4385bd8deadSopenharmony_ci    1.20, all supported texture internal formats store unsigned integer values
4395bd8deadSopenharmony_ci    but return floating-point results in the range [0, 1] and are considered
4405bd8deadSopenharmony_ci    unsigned "normalized" integers.  The ARB_texture_float extension
4415bd8deadSopenharmony_ci    introduces floating-point internal format where components are both stored
4425bd8deadSopenharmony_ci    and returned as floating-point values, and are not clamped. The
4435bd8deadSopenharmony_ci    EXT_texture_integer extension introduces formats that store either signed
4445bd8deadSopenharmony_ci    or unsigned integer values.
4455bd8deadSopenharmony_ci
4465bd8deadSopenharmony_ci    This extension defines additional OpenGL Shading Language texture lookup
4475bd8deadSopenharmony_ci    functions, see section 8.7 of the OpenGL Shading Language, that return
4485bd8deadSopenharmony_ci    either signed or unsigned integer values if the internal format of the
4495bd8deadSopenharmony_ci    texture is signed or unsigned, respectively.
4505bd8deadSopenharmony_ci
4515bd8deadSopenharmony_ci    Texel Fetches
4525bd8deadSopenharmony_ci
4535bd8deadSopenharmony_ci    The OpenGL Shading Language texel fetch functions provide the ability to
4545bd8deadSopenharmony_ci    extract a single texel from a specified texture image.  The integer
4555bd8deadSopenharmony_ci    coordinates passed to the texel fetch functions are used directly as the
4565bd8deadSopenharmony_ci    texel coordinates (i, j, k) into the texture image. This in turn means the
4575bd8deadSopenharmony_ci    texture image is point-sampled (no filtering is performed).
4585bd8deadSopenharmony_ci
4595bd8deadSopenharmony_ci    The level of detail accessed is computed by adding the specified
4605bd8deadSopenharmony_ci    level-of-detail parameter <lod> to the base level of the texture,
4615bd8deadSopenharmony_ci    level_base.
4625bd8deadSopenharmony_ci
4635bd8deadSopenharmony_ci    The texel fetch functions can not perform depth comparisons or access cube
4645bd8deadSopenharmony_ci    maps. Unlike filtered texel accesses, texel fetches do not support LOD
4655bd8deadSopenharmony_ci    clamping or any texture wrap mode, and require a mipmapped minification
4665bd8deadSopenharmony_ci    filter to access any level of detail other than the base level.
4675bd8deadSopenharmony_ci
4685bd8deadSopenharmony_ci    The results of the texel fetch are undefined:
4695bd8deadSopenharmony_ci
4705bd8deadSopenharmony_ci       * if the computed LOD is less than the texture's base level
4715bd8deadSopenharmony_ci         (level_base) or greater than the maximum level (level_max),
4725bd8deadSopenharmony_ci
4735bd8deadSopenharmony_ci       * if the computed LOD is not the texture's base level and the texture's
4745bd8deadSopenharmony_ci         minification filter is NEAREST or LINEAR,
4755bd8deadSopenharmony_ci
4765bd8deadSopenharmony_ci       * if the layer specified for array textures is negative or greater than
4775bd8deadSopenharmony_ci         the number of layers in the array texture,
4785bd8deadSopenharmony_ci
4795bd8deadSopenharmony_ci       * if the texel at (i,j,k) coordinates refer to a border texel outside
4805bd8deadSopenharmony_ci         the defined extents of the specified LOD, where
4815bd8deadSopenharmony_ci
4825bd8deadSopenharmony_ci                i < -b_s, j < -b_s, k < -b_s,
4835bd8deadSopenharmony_ci                i >= w_s - b_s, j >= h_s - b_s, or k >= d_s - b_s,
4845bd8deadSopenharmony_ci
4855bd8deadSopenharmony_ci         where the size parameters (w_s, h_s, d_s, and b_s) refer to the
4865bd8deadSopenharmony_ci         width, height, depth, and border size of the image, as in equations
4875bd8deadSopenharmony_ci         3.15, 3.16, and 3.17, or
4885bd8deadSopenharmony_ci
4895bd8deadSopenharmony_ci       . if the texture being accessed is not complete (or cube complete for
4905bd8deadSopenharmony_ci         cubemaps).
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_ci    Texture Size Query
4935bd8deadSopenharmony_ci
4945bd8deadSopenharmony_ci    The OpenGL Shading Language texture size functions provide the ability to
4955bd8deadSopenharmony_ci    query the size of a texture image. The LOD value <lod> passed in as an
4965bd8deadSopenharmony_ci    argument to the texture size functions is added to the level_base of the
4975bd8deadSopenharmony_ci    texture to determine a texture image level.  The dimensions of that image
4985bd8deadSopenharmony_ci    level, excluding a possible border, are then returned. If the computed
4995bd8deadSopenharmony_ci    texture image level is outside the range [level_base, level_max], the
5005bd8deadSopenharmony_ci    results are undefined. When querying the size of an array texture, both
5015bd8deadSopenharmony_ci    the dimensions and the layer count are returned. Note that buffer textures
5025bd8deadSopenharmony_ci    do not support mipmapping, therefore the previous lod discussion does not
5035bd8deadSopenharmony_ci    apply to buffer textures
5045bd8deadSopenharmony_ci
5055bd8deadSopenharmony_ci    Make the section "Texture Access" a subsection of 2.15.4.1
5065bd8deadSopenharmony_ci
5075bd8deadSopenharmony_ci    Modify the first paragraph on p. 86 as follows:
5085bd8deadSopenharmony_ci
5095bd8deadSopenharmony_ci    Texture lookups involving textures with depth component data can either
5105bd8deadSopenharmony_ci    return the depth data directly or return the results of a comparison with
5115bd8deadSopenharmony_ci    the R value (see section 3.8.14) used to perform the lookup. The
5125bd8deadSopenharmony_ci    comparison operation is requested in the shader by using any of the shadow
5135bd8deadSopenharmony_ci    sampler and in the texture using the TEXTURE COMPARE MODE parameter. These
5145bd8deadSopenharmony_ci    requests must be consistent; the results of a texture lookup are undefined
5155bd8deadSopenharmony_ci    if:
5165bd8deadSopenharmony_ci
5175bd8deadSopenharmony_ci       * The sampler used in a texture lookup function is not one of the
5185bd8deadSopenharmony_ci         shadow sampler types, and the texture object's internal format is
5195bd8deadSopenharmony_ci         DEPTH COMPONENT, and the TEXTURE COMPARE MODE is not NONE.
5205bd8deadSopenharmony_ci
5215bd8deadSopenharmony_ci       * The sampler used in a texture lookup function is one of the shadow
5225bd8deadSopenharmony_ci         sampler types, and the texture object's internal format is DEPTH
5235bd8deadSopenharmony_ci         COMPONENT, and the TEXTURE COMPARE MODE is NONE.
5245bd8deadSopenharmony_ci
5255bd8deadSopenharmony_ci       * The sampler used in a texture lookup function is one of the shadow
5265bd8deadSopenharmony_ci         sampler types, and the texture object's internal format is not DEPTH
5275bd8deadSopenharmony_ci         COMPONENT.
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci    Add a new section "2.15.4.2 Shader Inputs" before "Position
5305bd8deadSopenharmony_ci    Invariance" on p. 86
5315bd8deadSopenharmony_ci
5325bd8deadSopenharmony_ci    Besides having access to vertex attributes and uniform variables,
5335bd8deadSopenharmony_ci    vertex shaders can access the read-only built-in variables
5345bd8deadSopenharmony_ci    gl_VertexID and gl_InstanceID. The gl_VertexID variable holds the
5355bd8deadSopenharmony_ci    integer index <i> implicitly passed to ArrayElement() to specify
5365bd8deadSopenharmony_ci    the vertex. The variable gl_InstanceID holds the integer index of
5375bd8deadSopenharmony_ci    the current primitive in an instanced draw call.  See also section
5385bd8deadSopenharmony_ci    7.1 of the OpenGL Shading Language Specification.
5395bd8deadSopenharmony_ci
5405bd8deadSopenharmony_ci    Add a new section "2.15.4.3 Shader Outputs"
5415bd8deadSopenharmony_ci
5425bd8deadSopenharmony_ci    A vertex shader can write to built-in as well as user-defined varying
5435bd8deadSopenharmony_ci    variables. These values are expected to be interpolated across the
5445bd8deadSopenharmony_ci    primitive it outputs, unless they are specified to be flat shaded. Refer
5455bd8deadSopenharmony_ci    to section 2.15.3 and the OpenGL Shading Language specification sections
5465bd8deadSopenharmony_ci    4.3.6, 7.1 and 7.6 for more detail.
5475bd8deadSopenharmony_ci
5485bd8deadSopenharmony_ci    The built-in output variables gl_FrontColor, gl_BackColor,
5495bd8deadSopenharmony_ci    gl_FrontSecondaryColor, and gl_BackSecondaryColor hold the front and back
5505bd8deadSopenharmony_ci    colors for the primary and secondary colors for the current vertex.
5515bd8deadSopenharmony_ci
5525bd8deadSopenharmony_ci    The built-in output variable gl_TexCoord[] is an array and holds the set
5535bd8deadSopenharmony_ci    of texture coordinates for the current vertex.
5545bd8deadSopenharmony_ci
5555bd8deadSopenharmony_ci    The built-in output variable gl_FogFragCoord is used as the "c" value, as
5565bd8deadSopenharmony_ci    described in section 3.10 "Fog" of the OpenGL 2.0 specification.
5575bd8deadSopenharmony_ci
5585bd8deadSopenharmony_ci    The built-in special variable gl_Position is intended to hold the
5595bd8deadSopenharmony_ci    homogeneous vertex position. Writing gl_Position is optional.
5605bd8deadSopenharmony_ci
5615bd8deadSopenharmony_ci    The built-in special variable gl_ClipVertex holds the vertex coordinate
5625bd8deadSopenharmony_ci    used in the clipping stage, as described in section 2.12 "Clipping" of the
5635bd8deadSopenharmony_ci    OpenGL 2.0 specification.
5645bd8deadSopenharmony_ci
5655bd8deadSopenharmony_ci    The built in special variable gl_PointSize, if written, holds the size of
5665bd8deadSopenharmony_ci    the point to be rasterized, measured in pixels.
5675bd8deadSopenharmony_ci
5685bd8deadSopenharmony_ci    Number section "Position Invariance", "Validation" and "Undefined
5695bd8deadSopenharmony_ci    Behavior" as sections 2.15.4.4, 2.15.4.5, and 2.15.4.6 respectively.
5705bd8deadSopenharmony_ci
5715bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
5725bd8deadSopenharmony_ci
5735bd8deadSopenharmony_ci    Modify Section 3.8.1, Texture Image Specification, p. 150
5745bd8deadSopenharmony_ci
5755bd8deadSopenharmony_ci    (modify 4th paragraph, p. 151 -- add cubemaps to the list of texture
5765bd8deadSopenharmony_ci    targets that can be used with DEPTH_COMPONENT textures)
5775bd8deadSopenharmony_ci
5785bd8deadSopenharmony_ci    Textures with a base internal format of DEPTH_COMPONENT are supported by
5795bd8deadSopenharmony_ci    texture image specification commands only if <target> is TEXTURE_1D,
5805bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_CUBE_MAP, TEXTURE_RECTANGLE_ARB, PROXY_TEXTURE_1D,
5815bd8deadSopenharmony_ci    PROXY_TEXTURE_2D, PROXY_TEXTURE_CUBE_MAP, or
5825bd8deadSopenharmony_ci    PROXY_TEXTURE_RECTANGLE_ARB. Using this format in conjunction with any
5835bd8deadSopenharmony_ci    other target will result in an INVALID_OPERATION error.
5845bd8deadSopenharmony_ci
5855bd8deadSopenharmony_ci
5865bd8deadSopenharmony_ci    Delete Section 3.8.7, Texture Wrap Modes.  (The language in this section
5875bd8deadSopenharmony_ci    is folded into updates to the following section, and is no longer needed
5885bd8deadSopenharmony_ci    here.)
5895bd8deadSopenharmony_ci
5905bd8deadSopenharmony_ci
5915bd8deadSopenharmony_ci    Modify Section 3.8.8, Texture Minification:
5925bd8deadSopenharmony_ci
5935bd8deadSopenharmony_ci    (replace the last paragraph, p. 171):  Let s(x,y) be the function that
5945bd8deadSopenharmony_ci    associates an s texture coordinate with each set of window coordinates
5955bd8deadSopenharmony_ci    (x,y) that lie within a primitive; define t(x,y) and r(x,y) analogously.
5965bd8deadSopenharmony_ci    Let
5975bd8deadSopenharmony_ci
5985bd8deadSopenharmony_ci      u(x,y) = w_t * s(x,y) + offsetu_shader,
5995bd8deadSopenharmony_ci      v(x,y) = h_t * t(x,y) + offsetv_shader, 
6005bd8deadSopenharmony_ci      w(x,y) = d_t * r(x,y) + offsetw_shader, and
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci    where w_t, h_t, and d_t are as defined by equations 3.15, 3.16, and 3.17
6035bd8deadSopenharmony_ci    with w_s, h_s, and d_s equal to the width, height, and depth of the image
6045bd8deadSopenharmony_ci    array whose level is level_base.  (offsetu_shader, offsetv_shader,
6055bd8deadSopenharmony_ci    offsetw_shader) is the texel offset specified in the OpenGL Shading
6065bd8deadSopenharmony_ci    Language texture lookup functions that support offsets. If the texture
6075bd8deadSopenharmony_ci    function used does not support offsets, or for fixed-function texture
6085bd8deadSopenharmony_ci    accesses, all three shader offsets are taken to be zero.  For
6095bd8deadSopenharmony_ci    fixed-function texture accesses, all three shader offsets are taken to be
6105bd8deadSopenharmony_ci    zero.  For a one-dimensional texture, define v(x,y) == 0 and w(x,y) === 0;
6115bd8deadSopenharmony_ci    for two-dimensional textures, define w(x,y) == 0.
6125bd8deadSopenharmony_ci
6135bd8deadSopenharmony_ci    After u(x,y), v(x,y), and w(x,y) are generated, they are clamped if the
6145bd8deadSopenharmony_ci    corresponding texture wrap modes are CLAMP or MIRROR_CLAMP_EXT.  Let
6155bd8deadSopenharmony_ci
6165bd8deadSopenharmony_ci      u'(x,y) = clamp(u(x,y), 0, w_t),      if TEXTURE_WRAP_S is CLAMP
6175bd8deadSopenharmony_ci                clamp(u(x,y), -w_t, w_t),   if TEXTURE_WRAP_S is
6185bd8deadSopenharmony_ci                                              MIRROR_CLAMP_EXT, or
6195bd8deadSopenharmony_ci                u(x,y),                     otherwise
6205bd8deadSopenharmony_ci      v'(x,y) = clamp(v(x,y), 0, w_t),      if TEXTURE_WRAP_T is CLAMP
6215bd8deadSopenharmony_ci                clamp(v(x,y), -w_t, w_t),   if TEXTURE_WRAP_T is
6225bd8deadSopenharmony_ci                                              MIRROR_CLAMP_EXT, or
6235bd8deadSopenharmony_ci                v(x,y),                     otherwise
6245bd8deadSopenharmony_ci      w'(x,y) = clamp(w(x,y), 0, w_t),      if TEXTURE_WRAP_R is CLAMP
6255bd8deadSopenharmony_ci                clamp(w(x,y), -w_t, w_t),   if TEXTURE_WRAP_R is
6265bd8deadSopenharmony_ci                                              MIRROR_CLAMP_EXT, or
6275bd8deadSopenharmony_ci                w(x,y),                     otherwise,
6285bd8deadSopenharmony_ci
6295bd8deadSopenharmony_ci    where clamp(<a>,<b>,<c>) returns <b> if <a> is less than <b>, <c> if a is
6305bd8deadSopenharmony_ci    greater than <c>, and <a> otherwise.
6315bd8deadSopenharmony_ci
6325bd8deadSopenharmony_ci    (start a new paragraph with "For a polygon, rho is given at a fragment
6335bd8deadSopenharmony_ci    with window coordinates...", and then continue with the original spec
6345bd8deadSopenharmony_ci    text.)
6355bd8deadSopenharmony_ci
6365bd8deadSopenharmony_ci    (replace text starting with the last paragraph on p. 172, continuing to
6375bd8deadSopenharmony_ci    the end of p. 174)
6385bd8deadSopenharmony_ci
6395bd8deadSopenharmony_ci    When lambda indicates minification, the value assigned to
6405bd8deadSopenharmony_ci    TEXTURE_MIN_FILTER is used to determine how the texture value for a
6415bd8deadSopenharmony_ci    fragment is selected.
6425bd8deadSopenharmony_ci
6435bd8deadSopenharmony_ci    When TEXTURE_MIN_FILTER is NEAREST, the texel in the image array of level
6445bd8deadSopenharmony_ci    level_base that is nearest (in Manhattan distance) to that specified by
6455bd8deadSopenharmony_ci    (s,t,r) is obtained.  Let i, j, and k be integers such that:
6465bd8deadSopenharmony_ci
6475bd8deadSopenharmony_ci      i = apply_wrap(floor(u'(x,y))),
6485bd8deadSopenharmony_ci      j = apply_wrap(floor(v'(x,y))), and
6495bd8deadSopenharmony_ci      k = apply_wrap(floor(w'(x,y))),
6505bd8deadSopenharmony_ci
6515bd8deadSopenharmony_ci    where the coordinate returned by apply_wrap() is as defined by Table X.19.
6525bd8deadSopenharmony_ci    The values of i, j, and k are then modified according to the texture wrap
6535bd8deadSopenharmony_ci    modes, as described in Table 3.19, to produce new values (i', j', and k').
6545bd8deadSopenharmony_ci    For a three-dimensional texture, the texel at location (i,j,k) becomes the
6555bd8deadSopenharmony_ci    texture value.  For a two-dimensional texture, k is irrelevant, and the
6565bd8deadSopenharmony_ci    texel at location (i,j) becomes the texture value.  For a one-dimensional
6575bd8deadSopenharmony_ci    texture, j and k are irrelevant, and the texel at location i becomes the
6585bd8deadSopenharmony_ci    texture value.
6595bd8deadSopenharmony_ci
6605bd8deadSopenharmony_ci      Wrap mode                   Result
6615bd8deadSopenharmony_ci      --------------------------  ------------------------------------------
6625bd8deadSopenharmony_ci      CLAMP_TO_EDGE               clamp(coord, 0, size-1)
6635bd8deadSopenharmony_ci      CLAMP_TO_BORDER             clamp(coord, -1, size)
6645bd8deadSopenharmony_ci      CLAMP                       { clamp(coord, 0, size-1), 
6655bd8deadSopenharmony_ci                                  {         for NEAREST filtering
6665bd8deadSopenharmony_ci                                  { clamp(coord, -1, size), 
6675bd8deadSopenharmony_ci                                  {         for LINEAR filtering
6685bd8deadSopenharmony_ci      REPEAT                      mod(coord, size)
6695bd8deadSopenharmony_ci      MIRROR_CLAMP_TO_EDGE_EXT    clamp(mirror(coord), 0, size-1)
6705bd8deadSopenharmony_ci      MIRROR_CLAMP_TO_BORDER_EXT  clamp(mirror(size), 0, size)
6715bd8deadSopenharmony_ci      MIRROR_CLAMP_EXT            { clamp(mirror(coord), 0, size-1), 
6725bd8deadSopenharmony_ci                                  {         for NEAREST filtering
6735bd8deadSopenharmony_ci                                  { clamp(mirror(size), 0, size), 
6745bd8deadSopenharmony_ci                                  {         for LINEAR filtering
6755bd8deadSopenharmony_ci      MIRRORED_REPEAT             (size-1) - mirror(mod(coord, 2*size)-size)
6765bd8deadSopenharmony_ci
6775bd8deadSopenharmony_ci      Table X.19:  Texel location wrap mode application.  mod(<a>,<b>) is
6785bd8deadSopenharmony_ci      defined to return <a>-<b>*floor(<a>/<b>), and mirror(<a>) is defined to
6795bd8deadSopenharmony_ci      return <a> if <a> is greater than or equal to zero or -(1+<a>)
6805bd8deadSopenharmony_ci      otherwise.  The values of "wrap mode" and size are TEXTURE_WRAP_S and
6815bd8deadSopenharmony_ci      w_t, TEXTURE_WRAP_T and h_t, and TEXTURE_WRAP_R and d_t, for i, j, and k
6825bd8deadSopenharmony_ci      coordinates, respectively.  The coordinate clamp and MIRROR_CLAMP_EXT
6835bd8deadSopenharmony_ci      depends on the filtering mode (NEAREST or LINEAR).
6845bd8deadSopenharmony_ci
6855bd8deadSopenharmony_ci    If the selected (i,j,k), (i,j), or i location refers to a border texel
6865bd8deadSopenharmony_ci    that satisfies any of the following conditions:
6875bd8deadSopenharmony_ci
6885bd8deadSopenharmony_ci      i < -b_s,
6895bd8deadSopenharmony_ci      j < -b_s, 
6905bd8deadSopenharmony_ci      k < -b_s, 
6915bd8deadSopenharmony_ci      i >= w_t + b_s, 
6925bd8deadSopenharmony_ci      j >= h_t + b_s, or
6935bd8deadSopenharmony_ci      j >= d_t + b_s,
6945bd8deadSopenharmony_ci 
6955bd8deadSopenharmony_ci    then the border values defined by TEXTURE_BORDER_COLOR are used in place
6965bd8deadSopenharmony_ci    of the non-existent texel. If the texture contains color components, the
6975bd8deadSopenharmony_ci    values of TEXTURE_BORDER_COLOR are interpreted as an RGBA color to match
6985bd8deadSopenharmony_ci    the texture's internal format in a manner consistent with table 3.15. If
6995bd8deadSopenharmony_ci    the texture contains depth components, the first component of
7005bd8deadSopenharmony_ci    TEXTURE_BORDER_COLOR is interpreted as a depth value.
7015bd8deadSopenharmony_ci
7025bd8deadSopenharmony_ci    When TEXTURE_MIN_FILTER is LINEAR, a 2x2x2 cube of texels in the image
7035bd8deadSopenharmony_ci    array of level level_base is selected.  Let:
7045bd8deadSopenharmony_ci
7055bd8deadSopenharmony_ci      i_0   = apply_wrap(floor(u' - 0.5)),
7065bd8deadSopenharmony_ci      j_0   = apply_wrap(floor(v' - 0.5)),
7075bd8deadSopenharmony_ci      k_0   = apply_wrap(floor(w' - 0.5)),
7085bd8deadSopenharmony_ci      i_1   = apply_wrap(floor(u' - 0.5) + 1),
7095bd8deadSopenharmony_ci      j_1   = apply_wrap(floor(v' - 0.5) + 1),
7105bd8deadSopenharmony_ci      k_1   = apply_wrap(floor(w' - 0.5) + 1),
7115bd8deadSopenharmony_ci      alpha = frac(u' - 0.5),
7125bd8deadSopenharmony_ci      beta  = frac(v' - 0.5),
7135bd8deadSopenharmony_ci      gamma = frac(w' - 0.5),
7145bd8deadSopenharmony_ci
7155bd8deadSopenharmony_ci    where frac(<x>) denotes the fractional part of <x>.
7165bd8deadSopenharmony_ci
7175bd8deadSopenharmony_ci    For a three-dimensional texture, the texture value tau is found as...
7185bd8deadSopenharmony_ci
7195bd8deadSopenharmony_ci    (replace last paragraph, p.174) For any texel in the equation above that
7205bd8deadSopenharmony_ci    refers to a border texel outside the defined range of the image, the texel
7215bd8deadSopenharmony_ci    value is taken from the texture border color as with NEAREST filtering.
7225bd8deadSopenharmony_ci
7235bd8deadSopenharmony_ci    modify the last paragraph of section 3.8.8, p. 175, as follows:
7245bd8deadSopenharmony_ci
7255bd8deadSopenharmony_ci    The rules for NEAREST or LINEAR filtering are then applied to the selected
7265bd8deadSopenharmony_ci    array. Specifically, the coordinate (u,v,w) is computed as in equation
7275bd8deadSopenharmony_ci    3.20a, with w_s, h_s, and d_s equal to the width, height, and depth of the
7285bd8deadSopenharmony_ci    image array whose level is 'd'.
7295bd8deadSopenharmony_ci
7305bd8deadSopenharmony_ci    Modify the second paragraph on p. 176
7315bd8deadSopenharmony_ci
7325bd8deadSopenharmony_ci    The rules for NEAREST or LINEAR filtering are then applied to each of the
7335bd8deadSopenharmony_ci    selected arrays, yielding two corresponding texture valutes Tau1 and
7345bd8deadSopenharmony_ci    Tau2. Specifically, for level d1, the coordinate (u,v,w) is computed as in
7355bd8deadSopenharmony_ci    equation 3.20a, with w_s, h_s, and d_s equal to the width, height, and
7365bd8deadSopenharmony_ci    depth of the image array whose level is 'd1'. For level d2 the coordinate
7375bd8deadSopenharmony_ci    (u', v', w') is computed as in equation 3.20a, with w_s, h_s, and d_s
7385bd8deadSopenharmony_ci    equal to the width, height, and depth of the image array whose level is
7395bd8deadSopenharmony_ci    'd2'.
7405bd8deadSopenharmony_ci
7415bd8deadSopenharmony_ci    Modify the first paragraph of section 3.8.9 "Texture Magnification" as
7425bd8deadSopenharmony_ci    follows:
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci    When lambda indicates magnification, the value assigned to
7455bd8deadSopenharmony_ci    TEXTURE_MAG_FILTER determines how the texture value is obtained. There are
7465bd8deadSopenharmony_ci    two possible values for TEXTURE_MAG_FILTER: NEAREST and LINEAR.  NEAREST
7475bd8deadSopenharmony_ci    behaves exactly as NEAREST for TEXTURE_MIN_FILTER and LINEAR behaves
7485bd8deadSopenharmony_ci    exactly as LINEAR for TEXTURE_MIN_FILTER, as described in the previous
7495bd8deadSopenharmony_ci    section, including the wrapping calculations. The level-of-detail
7505bd8deadSopenharmony_ci    level_base texture array is always used for magnification.
7515bd8deadSopenharmony_ci
7525bd8deadSopenharmony_ci    Modify Section 3.8.14, Texture Comparison Modes (p. 185)
7535bd8deadSopenharmony_ci
7545bd8deadSopenharmony_ci    (modify 2nd paragraph, p. 188, indicating that the Q texture coordinate is
7555bd8deadSopenharmony_ci    used for depth comparisons on cubemap textures)
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci    Let D_t be the depth texture value, in the range [0, 1].  For
7585bd8deadSopenharmony_ci    fixed-function texture lookups, let R be the interpolated <r> texture
7595bd8deadSopenharmony_ci    coordinate, clamped to the range [0, 1].  For texture lookups generated by
7605bd8deadSopenharmony_ci    an OpenGL Shading Language lookup function, let R be the reference value
7615bd8deadSopenharmony_ci    for depth comparisons provided in the lookup function, also clamped to [0,
7625bd8deadSopenharmony_ci    1].  Then the effective texture value L_t, I_t, or A_t is computed as
7635bd8deadSopenharmony_ci    follows:
7645bd8deadSopenharmony_ci
7655bd8deadSopenharmony_ci    Modify section 3.11, Fragment Shaders, p. 193
7665bd8deadSopenharmony_ci
7675bd8deadSopenharmony_ci    Modify the third paragraph on p. 194 as follows:
7685bd8deadSopenharmony_ci
7695bd8deadSopenharmony_ci    Additionally, when a vertex shader is active, it may define one or more
7705bd8deadSopenharmony_ci    varying variables (see section 2.15.3 and the OpenGL Shading Language
7715bd8deadSopenharmony_ci    Specification). These values are, if not flat shaded, interpolated across
7725bd8deadSopenharmony_ci    the primitive being rendered. The results of these interpolations are
7735bd8deadSopenharmony_ci    available when varying variables of the same name are defined in the
7745bd8deadSopenharmony_ci    fragment shader.
7755bd8deadSopenharmony_ci
7765bd8deadSopenharmony_ci    Add the following paragraph to the end of section 3.11.1, p. 194
7775bd8deadSopenharmony_ci
7785bd8deadSopenharmony_ci    A fragment shader can also write to varying out variables. Values written
7795bd8deadSopenharmony_ci    to these variables are used in the subsequent per-fragment operations.
7805bd8deadSopenharmony_ci    Varying out variables can be used to write floating-point, integer or
7815bd8deadSopenharmony_ci    unsigned integer values destined for buffers attached to a framebuffer
7825bd8deadSopenharmony_ci    object, or destined for color buffers attached to the default
7835bd8deadSopenharmony_ci    framebuffer. The subsection 'Shader Outputs' of the next section describes
7845bd8deadSopenharmony_ci    API how to direct these values to buffers.
7855bd8deadSopenharmony_ci
7865bd8deadSopenharmony_ci    Add a new paragraph at the beginning of the section "Texture
7875bd8deadSopenharmony_ci    Access", p. 194
7885bd8deadSopenharmony_ci
7895bd8deadSopenharmony_ci    Section 2.15.4.1 describes texture lookup functionality accessible to a
7905bd8deadSopenharmony_ci    vertex shader. The texel fetch and texture size query functionality
7915bd8deadSopenharmony_ci    described there also applies to fragment shaders.
7925bd8deadSopenharmony_ci
7935bd8deadSopenharmony_ci    Modify the second paragraph on p. 195 as follows:
7945bd8deadSopenharmony_ci
7955bd8deadSopenharmony_ci    Texture lookups involving textures with depth component data can either
7965bd8deadSopenharmony_ci    return the depth data directly or return the results of a comparison with
7975bd8deadSopenharmony_ci    the R value (see section 3.8.14) used to perform the lookup. The
7985bd8deadSopenharmony_ci    comparison operation is requested in the shader by using any of the shadow
7995bd8deadSopenharmony_ci    sampler and in the texture using the TEXTURE COMPARE MODE parameter. These
8005bd8deadSopenharmony_ci    requests must be consistent; the results of a texture lookup are undefined
8015bd8deadSopenharmony_ci    if:
8025bd8deadSopenharmony_ci
8035bd8deadSopenharmony_ci       * The sampler used in a texture lookup function is not one of the
8045bd8deadSopenharmony_ci         shadow sampler types, and the texture object's internal format is
8055bd8deadSopenharmony_ci         DEPTH COMPONENT, and the TEXTURE COMPARE MODE is not NONE.
8065bd8deadSopenharmony_ci
8075bd8deadSopenharmony_ci       * The sampler used in a texture lookup function is one of the shadow
8085bd8deadSopenharmony_ci         sampler types, and the texture object's internal format is DEPTH
8095bd8deadSopenharmony_ci         COMPONENT, and the TEXTURE COMPARE MODE is NONE.
8105bd8deadSopenharmony_ci
8115bd8deadSopenharmony_ci       * The sampler used in a texture lookup function is one of the shadow
8125bd8deadSopenharmony_ci         sampler types, and the texture object's internal format is not DEPTH
8135bd8deadSopenharmony_ci         COMPONENT.
8145bd8deadSopenharmony_ci
8155bd8deadSopenharmony_ci    Add the following paragraph to the section Shader Inputs, p. 196
8165bd8deadSopenharmony_ci
8175bd8deadSopenharmony_ci    If a geometry shader is active, the built-in variable gl_PrimitiveID
8185bd8deadSopenharmony_ci    contains the ID value emitted by the geometry shader for the provoking
8195bd8deadSopenharmony_ci    vertex. If no geometry shader is active, gl_PrimitiveID is filled with the
8205bd8deadSopenharmony_ci    number of primitives processed by the rasterizer since the last time Begin
8215bd8deadSopenharmony_ci    was called (directly or indirectly via vertex array functions).  The first
8225bd8deadSopenharmony_ci    primitive generated after a Begin is numbered zero, and the primitive ID
8235bd8deadSopenharmony_ci    counter is incremented after every individual point, line, or polygon
8245bd8deadSopenharmony_ci    primitive is processed.  For polygons drawn in point or line mode, the
8255bd8deadSopenharmony_ci    primitive ID counter is incremented only once, even though multiple points
8265bd8deadSopenharmony_ci    or lines may be drawn.  For QUADS and QUAD_STRIP primitives that are
8275bd8deadSopenharmony_ci    decomposed into triangles, the primitive ID is incremented after each
8285bd8deadSopenharmony_ci    complete quad is processed.  For POLYGON primitives, the primitive ID
8295bd8deadSopenharmony_ci    counter is undefined.  The primitive ID is undefined for fragments
8305bd8deadSopenharmony_ci    generated by DrawPixels or Bitmap. Restarting a primitive topology using
8315bd8deadSopenharmony_ci    the primitive restart index has no effect on the primitive ID counter.
8325bd8deadSopenharmony_ci
8335bd8deadSopenharmony_ci    Modify the first paragraph of the section Shader Outputs, p. 196 as
8345bd8deadSopenharmony_ci    follows
8355bd8deadSopenharmony_ci
8365bd8deadSopenharmony_ci    The OpenGL Shading Language specification describes the values that may be
8375bd8deadSopenharmony_ci    output by a fragment shader. These outputs are split into two
8385bd8deadSopenharmony_ci    categories. User-defined varying out variables and built-in variables. The
8395bd8deadSopenharmony_ci    built-in variables are gl_FragColor, gl_FragData[n], and gl_FragDepth. If
8405bd8deadSopenharmony_ci    fragment clamping is enabled, the final fragment color values or the final
8415bd8deadSopenharmony_ci    fragment data values or the final varying out variable values written by a
8425bd8deadSopenharmony_ci    fragment shader are clamped to the range [0,1] and then may be converted
8435bd8deadSopenharmony_ci    to fixed-point as described in section 2.14.9. Only user-defined varying
8445bd8deadSopenharmony_ci    out variables declared as a floating-point type are clamped and may be
8455bd8deadSopenharmony_ci    converted. If fragment clamping is disabled, the final fragment color
8465bd8deadSopenharmony_ci    values or the final fragment data values or the final varying output
8475bd8deadSopenharmony_ci    variable values are not modified. The final fragment depth written...
8485bd8deadSopenharmony_ci
8495bd8deadSopenharmony_ci    Modify the second paragraph of the section Shader Outputs, p. 196
8505bd8deadSopenharmony_ci    as follows
8515bd8deadSopenharmony_ci
8525bd8deadSopenharmony_ci    ...A fragment shader may not statically assign values to more than one of
8535bd8deadSopenharmony_ci    gl_FragColor, gl_FragData or any user-defined varying output variable. In
8545bd8deadSopenharmony_ci    this case, a compile or link error will result. A shader statically...
8555bd8deadSopenharmony_ci
8565bd8deadSopenharmony_ci    Add the following to the end of the section Shader Outputs, p. 197
8575bd8deadSopenharmony_ci
8585bd8deadSopenharmony_ci    The values of user-defined varying out variables are directed to a color
8595bd8deadSopenharmony_ci    buffer in a two step process. First the varying out variable is bound to a
8605bd8deadSopenharmony_ci    fragment color by using its number. The GL will assign a number to each
8615bd8deadSopenharmony_ci    varying out variable, unless overridden by the command
8625bd8deadSopenharmony_ci    BindFragDataLocationEXT(). The number of the fragment color assigned for
8635bd8deadSopenharmony_ci    each user-defined varying out variable can be queried with
8645bd8deadSopenharmony_ci    GetFragDataLocationEXT(). Next, the DrawBuffer or DrawBuffers commands (see
8655bd8deadSopenharmony_ci    section 4.2.1) direct each fragment color to a particular buffer.
8665bd8deadSopenharmony_ci
8675bd8deadSopenharmony_ci    The binding of a user-defined varying out variable to a fragment color
8685bd8deadSopenharmony_ci    number can be specified explicitly. The command
8695bd8deadSopenharmony_ci
8705bd8deadSopenharmony_ci        void BindFragDataLocationEXT(uint program, uint colorNumber,
8715bd8deadSopenharmony_ci                                     const char *name);
8725bd8deadSopenharmony_ci
8735bd8deadSopenharmony_ci    specifies that the varying out variable name in program should be bound to
8745bd8deadSopenharmony_ci    fragment color colorNumber when the program is next linked. If name was
8755bd8deadSopenharmony_ci    bound previously, its assigned binding is replaced with colorNumber. name
8765bd8deadSopenharmony_ci    must be a null terminated string.  The error INVALID_VALUE is generated if
8775bd8deadSopenharmony_ci    colorNumber is equal or greater than MAX_DRAW_BUFFERS.
8785bd8deadSopenharmony_ci    BindFragDataLocationEXT has no effect until the program is linked. In
8795bd8deadSopenharmony_ci    particular, it doesn't modify the bindings of varying out variables in a
8805bd8deadSopenharmony_ci    program that has already been linked. The error INVALID OPERATION is
8815bd8deadSopenharmony_ci    generated if name starts with the reserved "gl_" prefix.
8825bd8deadSopenharmony_ci
8835bd8deadSopenharmony_ci    When a program is linked, any varying out variables without a binding
8845bd8deadSopenharmony_ci    specified through BindFragDataLocationEXT will automatically be bound to
8855bd8deadSopenharmony_ci    fragment colors by the GL. Such bindings can be queried using the command
8865bd8deadSopenharmony_ci    GetFragDataLocationEXT.  LinkProgram will fail if the assigned binding of a
8875bd8deadSopenharmony_ci    varying out variable would cause the GL to reference a non-existant
8885bd8deadSopenharmony_ci    fragment color number (one greater than or equal to MAX DRAW_BUFFERS).
8895bd8deadSopenharmony_ci    LinkProgram will also fail if more than one varying out variable is bound
8905bd8deadSopenharmony_ci    to the same number. This type of aliasing is not allowed.
8915bd8deadSopenharmony_ci
8925bd8deadSopenharmony_ci    BindFragDataLocationEXT may be issued before any shader objects are
8935bd8deadSopenharmony_ci    attached to a program object. Hence it is allowed to bind any name (except
8945bd8deadSopenharmony_ci    a name starting with "gl_") to a color number, including a name that is
8955bd8deadSopenharmony_ci    never used as a varying out variable in any fragment shader
8965bd8deadSopenharmony_ci    object. Assigned bindings for variables that do not exist are ignored.
8975bd8deadSopenharmony_ci
8985bd8deadSopenharmony_ci    After a program object has been linked successfully, the bindings of
8995bd8deadSopenharmony_ci    varying out variable names to color numbers can be queried. The command
9005bd8deadSopenharmony_ci
9015bd8deadSopenharmony_ci        int GetFragDataLocationEXT(uint program, const char *name);
9025bd8deadSopenharmony_ci
9035bd8deadSopenharmony_ci    returns the number of the fragment color that the varying out variable
9045bd8deadSopenharmony_ci    name was bound to when the program object program was last linked. name
9055bd8deadSopenharmony_ci    must be a null terminated string. If program has not been successfully
9065bd8deadSopenharmony_ci    linked, the error INVALID OPERATION is generated. If name is not a varying
9075bd8deadSopenharmony_ci    out variable, or if an error occurs, -1 will be returned.
9085bd8deadSopenharmony_ci
9095bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
9105bd8deadSopenharmony_ciOperations and the Frame Buffer)
9115bd8deadSopenharmony_ci
9125bd8deadSopenharmony_ci    Modify Section 4.2.1, Selecting a Buffer for Writing (p. 212)
9135bd8deadSopenharmony_ci
9145bd8deadSopenharmony_ci    (modify next-to-last paragraph, p. 213) If a fragment shader writes to
9155bd8deadSopenharmony_ci    gl_FragColor, DrawBuffers specifies a set of draw buffers into which the
9165bd8deadSopenharmony_ci    single fragment color defined by gl_FragColor is written.  If a fragment
9175bd8deadSopenharmony_ci    shader writes to gl_FragData or a user-defined varying out variable,
9185bd8deadSopenharmony_ci    DrawBuffers specifies a set of draw buffers into which each of the
9195bd8deadSopenharmony_ci    multiple output colors defined by these variables are separately written.
9205bd8deadSopenharmony_ci    If a fragment shader writes to neither gl_FragColor, nor gl FragData, nor
9215bd8deadSopenharmony_ci    any user-defined varying out variables, the values of the fragment colors
9225bd8deadSopenharmony_ci    following shader execution are undefined, and may differ for each fragment
9235bd8deadSopenharmony_ci    color.
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
9265bd8deadSopenharmony_ci
9275bd8deadSopenharmony_ci    Change section 5.4 Display Lists, p. 237
9285bd8deadSopenharmony_ci
9295bd8deadSopenharmony_ci    Add the commands VertexAttribIPointerEXT and BindFragDataLocationEXT to
9305bd8deadSopenharmony_ci    the list of commands that are not compiled into a display list, but
9315bd8deadSopenharmony_ci    executed immediately, under "Program and Shader Objects", p. 241
9325bd8deadSopenharmony_ci
9335bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and State
9345bd8deadSopenharmony_ciRequests)
9355bd8deadSopenharmony_ci
9365bd8deadSopenharmony_ci    Modify section 6.1.14 "Shader and Program Queries", p. 256
9375bd8deadSopenharmony_ci
9385bd8deadSopenharmony_ci    Modify 2nd paragraph, p.259:
9395bd8deadSopenharmony_ci
9405bd8deadSopenharmony_ci    Add the following to the list of GetVertexAttrib* commands:
9415bd8deadSopenharmony_ci
9425bd8deadSopenharmony_ci      void GetVertexAttribIivEXT(uint index, enum pname, int *params);
9435bd8deadSopenharmony_ci      void GetVertexAttribIuivEXT(uint index, enum pname, uint *params);
9445bd8deadSopenharmony_ci
9455bd8deadSopenharmony_ci    obtain the...  <pname> must be one of VERTEX_ATTRIB_ARRAY_ENABLED ,.,
9465bd8deadSopenharmony_ci    VERTEX_ATTRIB_ARRAY_NORMALIZED, VERTEX_ATTRIB_ARRAY_INTEGER_EXT, or
9475bd8deadSopenharmony_ci    CURRENT_VERTEX_ATTRIB.  ...
9485bd8deadSopenharmony_ci
9495bd8deadSopenharmony_ci    Split 3rd paragraph, p.259
9505bd8deadSopenharmony_ci
9515bd8deadSopenharmony_ci    ... The size, stride, type, normalized flag, and unconverted integer flag
9525bd8deadSopenharmony_ci    are set by the commands VertexAttribPointer and VertexAttribIPointerEXT.
9535bd8deadSopenharmony_ci    The normalized flag is always set to FALSE by by VertexAttribIPointerEXT.
9545bd8deadSopenharmony_ci    The unconverted integer flag is always set to FALSE by VertexAttribPointer
9555bd8deadSopenharmony_ci    and TRUE by VertexAttribIPointerEXT.
9565bd8deadSopenharmony_ci
9575bd8deadSopenharmony_ci    The query CURRENT_VERTEX_ATTRIB returns the current value for the generic
9585bd8deadSopenharmony_ci    attribute <index>.  GetVertexAttribdv and GetVertexAttribfv read and
9595bd8deadSopenharmony_ci    return the current attribute values as floating-point values;
9605bd8deadSopenharmony_ci    GetVertexAttribiv reads them as floating-point values and converts them
9615bd8deadSopenharmony_ci    to integer values; GetVertexAttribIivEXT reads and returns them as
9625bd8deadSopenharmony_ci    integers; GetVertexAttribIuivEXT reads and returns them as unsigned
9635bd8deadSopenharmony_ci    integers.  The results of the query are undefined if the current attribute
9645bd8deadSopenharmony_ci    values are read using one data type but were specified using a different
9655bd8deadSopenharmony_ci    one. The error INVALID_OPERATION is generated if <index> is zero.
9665bd8deadSopenharmony_ci
9675bd8deadSopenharmony_ci    Change the prototypes in the first paragraph on page 260 as
9685bd8deadSopenharmony_ci    follows:
9695bd8deadSopenharmony_ci
9705bd8deadSopenharmony_ci      void GetUniformfv(uint program, int location, float *params);
9715bd8deadSopenharmony_ci      void GetUniformiv(uint program, int location, int *params);
9725bd8deadSopenharmony_ci      void GetUniformuivEXT(uint program, int location, uint *params);
9735bd8deadSopenharmony_ci
9745bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 2.0 Specification (Invariance)
9755bd8deadSopenharmony_ci
9765bd8deadSopenharmony_ci    None.
9775bd8deadSopenharmony_ci
9785bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
9795bd8deadSopenharmony_ci
9805bd8deadSopenharmony_ci    None.
9815bd8deadSopenharmony_ci
9825bd8deadSopenharmony_ciInteractions with GL_ARB_color_buffer_float
9835bd8deadSopenharmony_ci
9845bd8deadSopenharmony_ci    If the GL_ARB_color_buffer_float extension is not supported then any
9855bd8deadSopenharmony_ci    reference to fragment clamping in section 3.11.2 "Shader Execution" needs
9865bd8deadSopenharmony_ci    to be deleted.
9875bd8deadSopenharmony_ci
9885bd8deadSopenharmony_ciInteractions with GL_ARB_texture_rectangle
9895bd8deadSopenharmony_ci
9905bd8deadSopenharmony_ci    If the GL_ARB_texture_rectangle extension is not supported then all
9915bd8deadSopenharmony_ci    references to texture lookup functions with 'Rect' in the name need to be
9925bd8deadSopenharmony_ci    deleted.
9935bd8deadSopenharmony_ci
9945bd8deadSopenharmony_ciInteractions with GL_EXT_texture_array
9955bd8deadSopenharmony_ci
9965bd8deadSopenharmony_ci    If the GL_EXT_texture_array extension is not supported, all references to
9975bd8deadSopenharmony_ci    one- and two-dimensional array texture sampler types (e.g.,
9985bd8deadSopenharmony_ci    sampler1DArray, sampler2DArray) and the texture lookup functions that use
9995bd8deadSopenharmony_ci    them need to be deleted.
10005bd8deadSopenharmony_ci
10015bd8deadSopenharmony_ciInteractions with GL_EXT_geometry_shader4
10025bd8deadSopenharmony_ci
10035bd8deadSopenharmony_ci    If the GL_EXT_geometry_shader4 extension is not supported, all references
10045bd8deadSopenharmony_ci    to a geometry shader need to be deleted.
10055bd8deadSopenharmony_ci
10065bd8deadSopenharmony_ciInteractions with GL_NV_primitive_restart
10075bd8deadSopenharmony_ci
10085bd8deadSopenharmony_ci    The spec describes the behavior that primitive restart does not affect the
10095bd8deadSopenharmony_ci    primitive ID counter, including for POLYGON primitives (where one could
10105bd8deadSopenharmony_ci    argue that the restart index starts a new primitive without a new Begin to
10115bd8deadSopenharmony_ci    reset the count). If NV_primitive_restart is not supported, references to
10125bd8deadSopenharmony_ci    that extension in the discussion of the primitive ID counter should be
10135bd8deadSopenharmony_ci    removed.
10145bd8deadSopenharmony_ci
10155bd8deadSopenharmony_ci    If NV_primitive_restart is supported, index values causing a primitive
10165bd8deadSopenharmony_ci    restart are not considered as specifying an End command, followed by
10175bd8deadSopenharmony_ci    another Begin. Primitive restart is therefore not guaranteed to
10185bd8deadSopenharmony_ci    immediately update material properties when a vertex shader is active. The
10195bd8deadSopenharmony_ci    spec language on p.64 of the OpenGL 2.0 specification says "changes are
10205bd8deadSopenharmony_ci    not guaranteed to update material parameters, defined in table 2.11, until
10215bd8deadSopenharmony_ci    the following End command."
10225bd8deadSopenharmony_ci
10235bd8deadSopenharmony_ciInteractions with EXT_texture_integer
10245bd8deadSopenharmony_ci
10255bd8deadSopenharmony_ci    If the EXT_texture_integer spec is not supported, the discussion about
10265bd8deadSopenharmony_ci    this spec in section 2.15.4.1 needs to be removed. All texture lookup
10275bd8deadSopenharmony_ci    functions that return integers or unsigned integers, as discussed in
10285bd8deadSopenharmony_ci    section 8.7 of the OpenGL Shading Language specification, also need to be
10295bd8deadSopenharmony_ci    removed.
10305bd8deadSopenharmony_ci
10315bd8deadSopenharmony_ciInteractions with EXT_texture_buffer_object
10325bd8deadSopenharmony_ci
10335bd8deadSopenharmony_ci    If EXT_texture_buffer_object is not supported, references to buffer
10345bd8deadSopenharmony_ci    textures, as well as the texelFetchBuffer and texelSizeBuffer lookup
10355bd8deadSopenharmony_ci    functions and samplerBuffer types, need to be removed.
10365bd8deadSopenharmony_ci
10375bd8deadSopenharmony_ciInteractions with EXT_draw_instanced
10385bd8deadSopenharmony_ci
10395bd8deadSopenharmony_ci    If EXT_draw_instanced is not supported, the value of gl_InstanceID
10405bd8deadSopenharmony_ci    is always zero.
10415bd8deadSopenharmony_ci
10425bd8deadSopenharmony_ciGLX Protocol
10435bd8deadSopenharmony_ci
10445bd8deadSopenharmony_ci    The following rendering commands are sent to the server as part of a
10455bd8deadSopenharmony_ci    glXRender request:
10465bd8deadSopenharmony_ci
10475bd8deadSopenharmony_ci    Uniform1uiEXT
10485bd8deadSopenharmony_ci
10495bd8deadSopenharmony_ci        2           12               rendering command length
10505bd8deadSopenharmony_ci        2           269              rendering command opcode
10515bd8deadSopenharmony_ci        4           INT32            location
10525bd8deadSopenharmony_ci        4           CARD32           v0
10535bd8deadSopenharmony_ci
10545bd8deadSopenharmony_ci    Uniform2uiEXT
10555bd8deadSopenharmony_ci
10565bd8deadSopenharmony_ci        2           16               rendering command length
10575bd8deadSopenharmony_ci        2           270              rendering command opcode
10585bd8deadSopenharmony_ci        4           INT32            location
10595bd8deadSopenharmony_ci        4           CARD32           v0
10605bd8deadSopenharmony_ci        4           CARD32           v1
10615bd8deadSopenharmony_ci
10625bd8deadSopenharmony_ci    Uniform3uiEXT
10635bd8deadSopenharmony_ci
10645bd8deadSopenharmony_ci        2           20               rendering command length
10655bd8deadSopenharmony_ci        2           271              rendering command opcode
10665bd8deadSopenharmony_ci        4           INT32            location
10675bd8deadSopenharmony_ci        4           CARD32           v0
10685bd8deadSopenharmony_ci        4           CARD32           v1
10695bd8deadSopenharmony_ci        4           CARD32           v2
10705bd8deadSopenharmony_ci
10715bd8deadSopenharmony_ci    Uniform4uiEXT
10725bd8deadSopenharmony_ci
10735bd8deadSopenharmony_ci        2           24               rendering command length
10745bd8deadSopenharmony_ci        2           272              rendering command opcode
10755bd8deadSopenharmony_ci        4           INT32            location
10765bd8deadSopenharmony_ci        4           CARD32           v0
10775bd8deadSopenharmony_ci        4           CARD32           v1
10785bd8deadSopenharmony_ci        4           CARD32           v2
10795bd8deadSopenharmony_ci        4           CARD32           v3
10805bd8deadSopenharmony_ci
10815bd8deadSopenharmony_ci    BindFragDataLocationEXT
10825bd8deadSopenharmony_ci
10835bd8deadSopenharmony_ci        2           12+n+p           rendering command length
10845bd8deadSopenharmony_ci        2           273              rendering command opcode
10855bd8deadSopenharmony_ci        4           CARD32           program
10865bd8deadSopenharmony_ci        4           CARD32           color
10875bd8deadSopenharmony_ci        n           LISTofBYTE       name, n = strlen(name) + 1
10885bd8deadSopenharmony_ci        p                            padding, p=pad(n)
10895bd8deadSopenharmony_ci
10905bd8deadSopenharmony_ci    The following rendering commands are sent sent to the server as part
10915bd8deadSopenharmony_ci    of a glXRender request or as a glXRenderLarge request.
10925bd8deadSopenharmony_ci
10935bd8deadSopenharmony_ci    Uniform1uivEXT
10945bd8deadSopenharmony_ci
10955bd8deadSopenharmony_ci        2           12+count*4       rendering command length
10965bd8deadSopenharmony_ci        2           274              rendering command opcode
10975bd8deadSopenharmony_ci        4           INT32            location
10985bd8deadSopenharmony_ci        4           CARD32           count
10995bd8deadSopenharmony_ci        4*count     LISTofCARD32     value
11005bd8deadSopenharmony_ci
11015bd8deadSopenharmony_ci    If the command is encoded in a glXRenderLarge request, the
11025bd8deadSopenharmony_ci    command opcode and command length fields above are expanded to
11035bd8deadSopenharmony_ci    4 bytes each:
11045bd8deadSopenharmony_ci
11055bd8deadSopenharmony_ci        4           16+count*4       rendering command length
11065bd8deadSopenharmony_ci        4           274              rendering command opcode
11075bd8deadSopenharmony_ci
11085bd8deadSopenharmony_ci    Uniform2uivEXT
11095bd8deadSopenharmony_ci
11105bd8deadSopenharmony_ci        2           12+count*4*2     rendering command length
11115bd8deadSopenharmony_ci        2           275              rendering command opcode
11125bd8deadSopenharmony_ci        4           INT32            location
11135bd8deadSopenharmony_ci        4           CARD32           count
11145bd8deadSopenharmony_ci        2*4*count   LISTofCARD32     value
11155bd8deadSopenharmony_ci
11165bd8deadSopenharmony_ci    If the command is encoded in a glXRenderLarge request, the
11175bd8deadSopenharmony_ci    command opcode and command length fields above are expanded to
11185bd8deadSopenharmony_ci    4 bytes each:
11195bd8deadSopenharmony_ci
11205bd8deadSopenharmony_ci        4           16+count*4*2     rendering command length
11215bd8deadSopenharmony_ci        4           275              rendering command opcode
11225bd8deadSopenharmony_ci
11235bd8deadSopenharmony_ci    Uniform3uivEXT
11245bd8deadSopenharmony_ci
11255bd8deadSopenharmony_ci        2           12+count*4*3     rendering command length
11265bd8deadSopenharmony_ci        2           276              rendering command opcode
11275bd8deadSopenharmony_ci        4           INT32            location
11285bd8deadSopenharmony_ci        4           CARD32           count
11295bd8deadSopenharmony_ci        3*4*count   LISTofCARD32     value
11305bd8deadSopenharmony_ci
11315bd8deadSopenharmony_ci    If the command is encoded in a glXRenderLarge request, the
11325bd8deadSopenharmony_ci    command opcode and command length fields above are expanded to
11335bd8deadSopenharmony_ci    4 bytes each:
11345bd8deadSopenharmony_ci
11355bd8deadSopenharmony_ci        4           16+count*4       rendering command length
11365bd8deadSopenharmony_ci        4           276              rendering command opcode
11375bd8deadSopenharmony_ci
11385bd8deadSopenharmony_ci    Uniform4uivEXT
11395bd8deadSopenharmony_ci
11405bd8deadSopenharmony_ci        2           12+count*4*4     rendering command length
11415bd8deadSopenharmony_ci        2           277              rendering command opcode
11425bd8deadSopenharmony_ci        4           INT32            location
11435bd8deadSopenharmony_ci        4           CARD32           count
11445bd8deadSopenharmony_ci        4*4*count   LISTofCARD32     value
11455bd8deadSopenharmony_ci
11465bd8deadSopenharmony_ci    If the command is encoded in a glXRenderLarge request, the
11475bd8deadSopenharmony_ci    command opcode and command length fields above are expanded to
11485bd8deadSopenharmony_ci    4 bytes each:
11495bd8deadSopenharmony_ci
11505bd8deadSopenharmony_ci        4           16+count*4*4     rendering command length
11515bd8deadSopenharmony_ci        4           277              rendering command opcode
11525bd8deadSopenharmony_ci
11535bd8deadSopenharmony_ci    The following non-rendering commands are added.
11545bd8deadSopenharmony_ci
11555bd8deadSopenharmony_ci    GetUniformuivEXT
11565bd8deadSopenharmony_ci
11575bd8deadSopenharmony_ci        1           CARD8            opcode (X assigned)
11585bd8deadSopenharmony_ci        1           182              GLX opcode
11595bd8deadSopenharmony_ci        2           4                request length
11605bd8deadSopenharmony_ci        4           GLX_CONTEXT_TAG  context tag
11615bd8deadSopenharmony_ci        4           CARD32           program
11625bd8deadSopenharmony_ci        4           INT32            location
11635bd8deadSopenharmony_ci      =>
11645bd8deadSopenharmony_ci        1           1                reply
11655bd8deadSopenharmony_ci        1                            unused
11665bd8deadSopenharmony_ci        2           CARD16           sequence number
11675bd8deadSopenharmony_ci        4           m                reply length, m = (n == 1 ? 0 : n)
11685bd8deadSopenharmony_ci        4           CARD32           unused
11695bd8deadSopenharmony_ci        4           CARD32           n
11705bd8deadSopenharmony_ci
11715bd8deadSopenharmony_ci        if  (n = 1) this follows:
11725bd8deadSopenharmony_ci
11735bd8deadSopenharmony_ci        4           CARD32           params
11745bd8deadSopenharmony_ci        12                           unused
11755bd8deadSopenharmony_ci
11765bd8deadSopenharmony_ci        otherwise this follows:
11775bd8deadSopenharmony_ci
11785bd8deadSopenharmony_ci        16          CARD32           unused
11795bd8deadSopenharmony_ci        4*n         CARD32           params
11805bd8deadSopenharmony_ci
11815bd8deadSopenharmony_ci    Note that n may be zero, indicating that a GL error occured.
11825bd8deadSopenharmony_ci
11835bd8deadSopenharmony_ci    GetFragDataLocationEXT
11845bd8deadSopenharmony_ci
11855bd8deadSopenharmony_ci        1           CARD8            opcode (X assigned)
11865bd8deadSopenharmony_ci        1           183              GLX opcode
11875bd8deadSopenharmony_ci        2           3+(n+p)/4        request length
11885bd8deadSopenharmony_ci        4           GLX_CONTEXT_TAG  context tag
11895bd8deadSopenharmony_ci        4           CARD32           program
11905bd8deadSopenharmony_ci        n           LISTofBYTE       name, n = strlen(name) + 1
11915bd8deadSopenharmony_ci        p                            padding, p=pad(n)
11925bd8deadSopenharmony_ci      =>
11935bd8deadSopenharmony_ci        1           1                reply
11945bd8deadSopenharmony_ci        1                            unused
11955bd8deadSopenharmony_ci        2           CARD16           sequence number
11965bd8deadSopenharmony_ci        4           0                reply length
11975bd8deadSopenharmony_ci        4           CARD32           retval
11985bd8deadSopenharmony_ci        20                           unused
11995bd8deadSopenharmony_ci
12005bd8deadSopenharmony_ci    GLX protocol for following commands is defined in the
12015bd8deadSopenharmony_ci    NV_vertex_program4 extension:
12025bd8deadSopenharmony_ci
12035bd8deadSopenharmony_ci        VertexAttribI1iEXT, VertexAttribI2iEXT, VertexAttribI3iEXT,
12045bd8deadSopenharmony_ci        VertexAttribI4iEXT, VertexAttribI1uiEXT, VertexAttribI2uiEXT,
12055bd8deadSopenharmony_ci        VertexAttribI3uiEXT, VertexAttribI4uiEXT, VertexAttribI1ivEXT,
12065bd8deadSopenharmony_ci        VertexAttribI2ivEXT, VertexAttribI3ivEXT, VertexAttribI4ivEXT,
12075bd8deadSopenharmony_ci        VertexAttribI1uivEXT, VertexAttribI2uivEXT, VertexAttribI3uivEXT,
12085bd8deadSopenharmony_ci        VertexAttribI4uivEXT, VertexAttribI4bvEXT, VertexAttribI4svEXT,
12095bd8deadSopenharmony_ci        VertexAttribI4ubvEXT, VertexAttribI4usvEXT, GetVertexAttribIivEXT,
12105bd8deadSopenharmony_ci        GetVertexAttribIuivEXT
12115bd8deadSopenharmony_ci
12125bd8deadSopenharmony_ci    VertexAttribIPointerEXT is an entirely client-side command.
12135bd8deadSopenharmony_ci
12145bd8deadSopenharmony_ciErrors
12155bd8deadSopenharmony_ci
12165bd8deadSopenharmony_ci    The error INVALID_VALUE is generated by BindFragDataLocationEXT() if
12175bd8deadSopenharmony_ci    colorNumber is equal or greater than MAX_DRAW_BUFFERS.
12185bd8deadSopenharmony_ci
12195bd8deadSopenharmony_ci    The error INVALID OPERATION is generated by BindFragDataLocationEXT() if
12205bd8deadSopenharmony_ci    name starts with the reserved "gl_" prefix.
12215bd8deadSopenharmony_ci
12225bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated by BindFragDataLocationEXT() or
12235bd8deadSopenharmony_ci    GetFragDataLocationEXT if program is not the name of a program object.
12245bd8deadSopenharmony_ci
12255bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated by GetFragDataLocationEXT() if
12265bd8deadSopenharmony_ci    program has not been successfully linked.
12275bd8deadSopenharmony_ci
12285bd8deadSopenharmony_ciNew State
12295bd8deadSopenharmony_ci
12305bd8deadSopenharmony_ci    (add to table 6.7, p. 268)
12315bd8deadSopenharmony_ci                                                 Initial
12325bd8deadSopenharmony_ci    Get Value            Type    Get Command     Value   Description          Sec.    Attribute
12335bd8deadSopenharmony_ci    ---------            ----    --------------- ------- -------------------- ----    ---------
12345bd8deadSopenharmony_ci    VERTEX_ATTRIB_ARRAY  16+xB   GetVertexAttrib FALSE   vertex attrib array  2.8     vertex-array
12355bd8deadSopenharmony_ci      INTEGER_EXT                                        has unconverted ints
12365bd8deadSopenharmony_ci
12375bd8deadSopenharmony_ciNew Implementation Dependent State
12385bd8deadSopenharmony_ci
12395bd8deadSopenharmony_ci                                                             Minimum
12405bd8deadSopenharmony_ci    Get Value                         Type  Get Command       Value   Description           Sec.   Attrib
12415bd8deadSopenharmony_ci    --------------------------------  ----  ---------------  -------  --------------------- ------ ------
12425bd8deadSopenharmony_ci    MIN_PROGRAM_TEXEL_OFFSET_EXT      Z     GetIntegerv        -8     minimum texel offset  2.x.4.4  -
12435bd8deadSopenharmony_ci                                                                      allowed in lookup
12445bd8deadSopenharmony_ci    MAX_PROGRAM_TEXEL_OFFSET_EXT      Z     GetIntegerv        +7     maximum texel offset  2.x.4.4  -
12455bd8deadSopenharmony_ci                                                                      allowed in lookup
12465bd8deadSopenharmony_ci
12475bd8deadSopenharmony_ciModifications to The OpenGL Shading Language Specification, Version 1.10.59
12485bd8deadSopenharmony_ci
12495bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
12505bd8deadSopenharmony_ci    language features described in this extension:
12515bd8deadSopenharmony_ci
12525bd8deadSopenharmony_ci      #extension GL_EXT_gpu_shader4 : <behavior>
12535bd8deadSopenharmony_ci
12545bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.3.
12555bd8deadSopenharmony_ci
12565bd8deadSopenharmony_ci    A new preprocessor #define is added to the OpenGL Shading Language:
12575bd8deadSopenharmony_ci
12585bd8deadSopenharmony_ci      #define GL_EXT_gpu_shader4 1
12595bd8deadSopenharmony_ci
12605bd8deadSopenharmony_ci    Add to section 3.6 "Keywords"
12615bd8deadSopenharmony_ci
12625bd8deadSopenharmony_ci    Add the following keywords:
12635bd8deadSopenharmony_ci
12645bd8deadSopenharmony_ci      noperspective, flat, centroid
12655bd8deadSopenharmony_ci
12665bd8deadSopenharmony_ci    Remove the unsigned keyword from the list of keywords reserved for future
12675bd8deadSopenharmony_ci    use, and add it to the list of keywords.
12685bd8deadSopenharmony_ci
12695bd8deadSopenharmony_ci    The following new vector types are added:
12705bd8deadSopenharmony_ci
12715bd8deadSopenharmony_ci      uvec2, uvec3, uvec4
12725bd8deadSopenharmony_ci
12735bd8deadSopenharmony_ci    The following new sampler types are added:
12745bd8deadSopenharmony_ci
12755bd8deadSopenharmony_ci      sampler1DArray, sampler2DArray, sampler1DArrayShadow,
12765bd8deadSopenharmony_ci      sampler2DArrayShadow, samplerCubeShadow
12775bd8deadSopenharmony_ci
12785bd8deadSopenharmony_ci      isampler1D, isampler2D, isampler3D, isamplerCube, isampler2DRect,
12795bd8deadSopenharmony_ci      isampler1DArray, isampler2DArray
12805bd8deadSopenharmony_ci
12815bd8deadSopenharmony_ci      usampler1D, usampler2D, usampler3D, usamplerCube, usampler2DRect,
12825bd8deadSopenharmony_ci      usampler1DArray, usampler2DArray
12835bd8deadSopenharmony_ci
12845bd8deadSopenharmony_ci      samplerBuffer, isamplerBuffer, usamplerBuffer
12855bd8deadSopenharmony_ci
12865bd8deadSopenharmony_ci    Add to section 4.1 "Basic Types"
12875bd8deadSopenharmony_ci
12885bd8deadSopenharmony_ci    Break the table in this section up in several tables. The first table
12895bd8deadSopenharmony_ci    4.1.1 is named "scalar, vector and matrix data types". It includes the
12905bd8deadSopenharmony_ci    first row through the 'mat4" row.
12915bd8deadSopenharmony_ci
12925bd8deadSopenharmony_ci    Add the following to the first section of this table:
12935bd8deadSopenharmony_ci
12945bd8deadSopenharmony_ci      unsigned int           An unsigned integer
12955bd8deadSopenharmony_ci      uvec2                  A two-component unsigned integer vector
12965bd8deadSopenharmony_ci      uvec3                  A three-component unsigned integer vector
12975bd8deadSopenharmony_ci      uvec4                  A four-component unsigned integer vector
12985bd8deadSopenharmony_ci
12995bd8deadSopenharmony_ci    Break out the sampler types in a separate table, and name that table 4.1.2
13005bd8deadSopenharmony_ci    "default sampler types". Add the following sampler types to this new
13015bd8deadSopenharmony_ci    table:
13025bd8deadSopenharmony_ci
13035bd8deadSopenharmony_ci      sampler1DArray         handle for accessing a 1D array texture
13045bd8deadSopenharmony_ci      sampler2DArray         handle for accessing a 2D array texture
13055bd8deadSopenharmony_ci      sampler1DArrayShadow   handle for accessing a 1D array depth texture
13065bd8deadSopenharmony_ci                             with comparison
13075bd8deadSopenharmony_ci      sampler2DArrayShadow   handle for accessing a 2D array depth texture
13085bd8deadSopenharmony_ci                             with comparison
13095bd8deadSopenharmony_ci      samplerBuffer          handle for accessing a buffer texture
13105bd8deadSopenharmony_ci
13115bd8deadSopenharmony_ci    Add a table 4.1.3 called "integer sampler types":
13125bd8deadSopenharmony_ci
13135bd8deadSopenharmony_ci      isampler1D             handle for accessing an integer 1D texture
13145bd8deadSopenharmony_ci      isampler2D             handle for accessing an integer 2D texture
13155bd8deadSopenharmony_ci      isampler3D             handle for accessing an integer 3D texture
13165bd8deadSopenharmony_ci      isamplerCube           handle for accessing an integer cube map texture
13175bd8deadSopenharmony_ci      isampler2DRect         handle for accessing an integer rectangle texture
13185bd8deadSopenharmony_ci      isampler1DArray        handle for accessing an integer 1D array texture
13195bd8deadSopenharmony_ci      isampler2DArray        handle for accessing an integer 2D array texture
13205bd8deadSopenharmony_ci      isamplerBuffer         handle for accessing an integer buffer texture
13215bd8deadSopenharmony_ci
13225bd8deadSopenharmony_ci    Add a table 4.1.4 called "unsigned integer sampler types":
13235bd8deadSopenharmony_ci
13245bd8deadSopenharmony_ci      usampler1D             handle for accessing an unsigned integer 
13255bd8deadSopenharmony_ci                             1D texture
13265bd8deadSopenharmony_ci      usampler2D             handle for accessing an unsigned integer
13275bd8deadSopenharmony_ci                             2D texture
13285bd8deadSopenharmony_ci      usampler3D             handle for accessing an unsigned integer
13295bd8deadSopenharmony_ci                             3D texture
13305bd8deadSopenharmony_ci      usamplerCube           handle for accessing an unsigned integer
13315bd8deadSopenharmony_ci                             cube map texture
13325bd8deadSopenharmony_ci      usampler2DRect         handle for accessing an unsigned integer
13335bd8deadSopenharmony_ci                             rectangle texture
13345bd8deadSopenharmony_ci      usampler1DArray        handle for accessing an unsigned integer 1D
13355bd8deadSopenharmony_ci                             array texture 
13365bd8deadSopenharmony_ci      usampler2DArray        handle for accessing an unsigned integer 2D
13375bd8deadSopenharmony_ci                             array texture
13385bd8deadSopenharmony_ci      usamplerBuffer         handle for accessing an unsigned integer
13395bd8deadSopenharmony_ci                             buffer texture
13405bd8deadSopenharmony_ci
13415bd8deadSopenharmony_ci    Change section 4.1.3 "Integers"
13425bd8deadSopenharmony_ci
13435bd8deadSopenharmony_ci    Remove the first two paragraphs and replace with the following:
13445bd8deadSopenharmony_ci
13455bd8deadSopenharmony_ci    Signed, as well as unsigned integers, are fully supported.  Integers hold
13465bd8deadSopenharmony_ci    whole numbers. Integers have at least 32 bits of precision, including a
13475bd8deadSopenharmony_ci    sign bit. Signed integers are stored using a two's complement
13485bd8deadSopenharmony_ci    representation.
13495bd8deadSopenharmony_ci
13505bd8deadSopenharmony_ci    Integers are declared and optionally initialized with integer expressions
13515bd8deadSopenharmony_ci    as in the following example:
13525bd8deadSopenharmony_ci
13535bd8deadSopenharmony_ci        int i, j = 42;
13545bd8deadSopenharmony_ci        unsigned int k = 3u;
13555bd8deadSopenharmony_ci
13565bd8deadSopenharmony_ci    Literal integer constants can be expressed in decimal (base 10), octal
13575bd8deadSopenharmony_ci    (base 8), or hexadecimal (base 16) as follows.
13585bd8deadSopenharmony_ci
13595bd8deadSopenharmony_ci          integer-constant:
13605bd8deadSopenharmony_ci                decimal-constant integer-suffix_opt
13615bd8deadSopenharmony_ci                octal-constant integer-suffix_opt
13625bd8deadSopenharmony_ci                hexadecimal-constant integer-suffix_opt
13635bd8deadSopenharmony_ci
13645bd8deadSopenharmony_ci          integer-suffix:  one of
13655bd8deadSopenharmony_ci                u U
13665bd8deadSopenharmony_ci
13675bd8deadSopenharmony_ci    Change section 4.3 "Type Qualifiers"
13685bd8deadSopenharmony_ci
13695bd8deadSopenharmony_ci    Change the "varying" and "out" qualifier as follows:
13705bd8deadSopenharmony_ci
13715bd8deadSopenharmony_ci    varying - linkage between a vertex shader and fragment shader, or between
13725bd8deadSopenharmony_ci    a fragment shader and the back end of the OpenGL pipeline.
13735bd8deadSopenharmony_ci
13745bd8deadSopenharmony_ci    out - for function parameters passed back out of a function, but not
13755bd8deadSopenharmony_ci    initialized for use when passed in. Also for output varying variables
13765bd8deadSopenharmony_ci    (fragment only).
13775bd8deadSopenharmony_ci
13785bd8deadSopenharmony_ci    In the qualifier table, add the following sub-qualifiers under the varying
13795bd8deadSopenharmony_ci    qualifier:
13805bd8deadSopenharmony_ci
13815bd8deadSopenharmony_ci      flat varying
13825bd8deadSopenharmony_ci      noperspective varying
13835bd8deadSopenharmony_ci      centroid varying
13845bd8deadSopenharmony_ci
13855bd8deadSopenharmony_ci    Change section 4.3.4 "Attribute"
13865bd8deadSopenharmony_ci
13875bd8deadSopenharmony_ci    Change the sentence:
13885bd8deadSopenharmony_ci
13895bd8deadSopenharmony_ci    The attribute qualifier can be used only with the data types float, vec2,
13905bd8deadSopenharmony_ci    vec3, vec4, mat2, mat3, and mat4.
13915bd8deadSopenharmony_ci
13925bd8deadSopenharmony_ci    To:
13935bd8deadSopenharmony_ci
13945bd8deadSopenharmony_ci    The attribute qualifier can be used only with the data types int, ivec2,
13955bd8deadSopenharmony_ci    ivec3, ivec4, unsigned int, uvec2, uvec3, uvec4, float, vec2, vec3, vec4,
13965bd8deadSopenharmony_ci    mat2, mat3, and mat4.
13975bd8deadSopenharmony_ci
13985bd8deadSopenharmony_ci    Change the fourth paragraph to:
13995bd8deadSopenharmony_ci
14005bd8deadSopenharmony_ci    It is expected that graphics hardware will have a small number of fixed
14015bd8deadSopenharmony_ci    locations for passing vertex attributes. Therefore, the OpenGL Shading
14025bd8deadSopenharmony_ci    language defines each non-matrix attribute variable as having space for up
14035bd8deadSopenharmony_ci    to four integer or floating-point values (i.e., a vec4, ivec4 or
14045bd8deadSopenharmony_ci    uvec4). There is an implementation dependent limit on the number of
14055bd8deadSopenharmony_ci    attribute variables that can be used and if this is exceeded it will cause
14065bd8deadSopenharmony_ci    a link error. (Declared attribute variables that are not used do not count
14075bd8deadSopenharmony_ci    against this limit.) A scalar attribute counts the same amount against
14085bd8deadSopenharmony_ci    this limit as a vector of size four, so applications may want to consider
14095bd8deadSopenharmony_ci    packing groups of four unrelated scalar attributes together into a vector
14105bd8deadSopenharmony_ci    to better utilize the capabilities of the underlying hardware. A mat4
14115bd8deadSopenharmony_ci    attribute will...
14125bd8deadSopenharmony_ci
14135bd8deadSopenharmony_ci    Change section 4.3.6 "Varying"
14145bd8deadSopenharmony_ci
14155bd8deadSopenharmony_ci    Change the first paragraph to:
14165bd8deadSopenharmony_ci
14175bd8deadSopenharmony_ci    Varying variables provide the interface between the vertex shader, the
14185bd8deadSopenharmony_ci    fragment shader, and the fixed functionality between the vertex and
14195bd8deadSopenharmony_ci    fragment shader, as well as the interface from the fragment shader to the
14205bd8deadSopenharmony_ci    back-end of the OpenGL pipeline.
14215bd8deadSopenharmony_ci
14225bd8deadSopenharmony_ci    The vertex shader will compute values per vertex (such as color, texture
14235bd8deadSopenharmony_ci    coordinates, etc.) and write them to variables declared with the varying
14245bd8deadSopenharmony_ci    qualifier. A vertex shader may also read varying variables, getting back
14255bd8deadSopenharmony_ci    the same values it has written. Reading a varying variable in a vertex
14265bd8deadSopenharmony_ci    shader returns undefined values if it is read before being written.
14275bd8deadSopenharmony_ci
14285bd8deadSopenharmony_ci    The fragment shader will compute values per fragment and write them to
14295bd8deadSopenharmony_ci    variables declared with the varying out qualifier. A fragment shader may
14305bd8deadSopenharmony_ci    also read varying variables, getting back the same result it has
14315bd8deadSopenharmony_ci    written. Reading a varying variable in a fragment shader returns undefined
14325bd8deadSopenharmony_ci    values if it is read before being written.
14335bd8deadSopenharmony_ci
14345bd8deadSopenharmony_ci    Varying variables may be written more than once. If so, the last value
14355bd8deadSopenharmony_ci    assigned is the one used.
14365bd8deadSopenharmony_ci
14375bd8deadSopenharmony_ci    Change the second paragraph to:
14385bd8deadSopenharmony_ci
14395bd8deadSopenharmony_ci    Varying variables that are set per vertex are interpolated by default in a
14405bd8deadSopenharmony_ci    perspective-correct manner over the primitive being rendered, unless the
14415bd8deadSopenharmony_ci    varying is further qualified with noperspective. Interpolation in a
14425bd8deadSopenharmony_ci    perspective correct manner is specified in equations 3.6 and 3.8 in the
14435bd8deadSopenharmony_ci    OpenGL 2.0 specification. When noperspective is specified, interpolation
14445bd8deadSopenharmony_ci    must be linear in screen space, as described in equation 3.7 and the
14455bd8deadSopenharmony_ci    approximation that follows equation 3.8.
14465bd8deadSopenharmony_ci
14475bd8deadSopenharmony_ci    If single-sampling, the value is interpolated to the pixel's center, and
14485bd8deadSopenharmony_ci    the centroid qualifier, if present, is ignored. If multi-sampling, and the
14495bd8deadSopenharmony_ci    varying is not qualified with centroid, then the value must be
14505bd8deadSopenharmony_ci    interpolated to the pixel's center, or anywhere within the pixel, or to
14515bd8deadSopenharmony_ci    one of the pixel's samples. If multi-sampling and the varying is qualified
14525bd8deadSopenharmony_ci    with centroid, then the value must be interpolated to a point that lies in
14535bd8deadSopenharmony_ci    both the pixel and in the primitive being rendered, or to one of the
14545bd8deadSopenharmony_ci    pixel's samples that falls within the primitive.
14555bd8deadSopenharmony_ci
14565bd8deadSopenharmony_ci    [NOTE: Language for centroid sampling taken from the GLSL 1.20.4
14575bd8deadSopenharmony_ci    specification]
14585bd8deadSopenharmony_ci
14595bd8deadSopenharmony_ci    Varying variables, set per vertex, can be computed on a per-primitive
14605bd8deadSopenharmony_ci    basis (flat shading), or interpolated over a line or polygon primitive
14615bd8deadSopenharmony_ci    (smooth shading). By default, a varying variable is smooth shaded, unless
14625bd8deadSopenharmony_ci    the varying is further qualified with flat. When smooth shading, the
14635bd8deadSopenharmony_ci    varying is interpolated over the primitive. When flat shading, the varying
14645bd8deadSopenharmony_ci    is constant over the primitive, and is taken from the single provoking
14655bd8deadSopenharmony_ci    vertex of the primitive, as described in Section 2.14.7 of the OpenGL 2.0
14665bd8deadSopenharmony_ci    specification.
14675bd8deadSopenharmony_ci
14685bd8deadSopenharmony_ci    Change the fourth paragraph to:
14695bd8deadSopenharmony_ci
14705bd8deadSopenharmony_ci    The type and any qualifications (flat, noperspective, centroid) of varying
14715bd8deadSopenharmony_ci    variables with the same name declared in both the vertex and fragment
14725bd8deadSopenharmony_ci    shaders must match, otherwise the link command will fail. Note that
14735bd8deadSopenharmony_ci    built-in varying variables, which have names starting with "gl_", can not
14745bd8deadSopenharmony_ci    be further qualified with flat, noperspective or centroid. The flat
14755bd8deadSopenharmony_ci    keyword cannot be used together with either the noperspective or centroid
14765bd8deadSopenharmony_ci    keywords to further qualify a single varying variable, otherwise a compile
14775bd8deadSopenharmony_ci    error will occur. When using the keywords centroid, flat or noperspective,
14785bd8deadSopenharmony_ci    it must immediately precede the varying keyword.  When using both centroid
14795bd8deadSopenharmony_ci    and noperspective keywords, either one can be specified first. Only those
14805bd8deadSopenharmony_ci    varying variables used (i.e.  read) in the fragment shader must be written
14815bd8deadSopenharmony_ci    to by the vertex shader; declaring superfluous varying variables in the
14825bd8deadSopenharmony_ci    vertex shader is permissible. Varying out variables, set per fragment, can
14835bd8deadSopenharmony_ci    not be further qualified with flat, noperspective or centroid.
14845bd8deadSopenharmony_ci
14855bd8deadSopenharmony_ci    Fragment shaders output values to the back-end of the OpenGL pipeline
14865bd8deadSopenharmony_ci    using either user-defined varying out variables or built-in variables, as
14875bd8deadSopenharmony_ci    described in section 7.2, unless the discard keyword is executed. If the
14885bd8deadSopenharmony_ci    back-end of the OpenGL pipeline consumes a user-defined varying out
14895bd8deadSopenharmony_ci    variable and an execution of a fragment shader does not write a value to
14905bd8deadSopenharmony_ci    that variable, then the value consumed is undefined. If the back-end of
14915bd8deadSopenharmony_ci    the OpenGL pipeline consumes a varying out variable and a fragment shader
14925bd8deadSopenharmony_ci    either writes values into less components of the variable, or if the
14935bd8deadSopenharmony_ci    variable is declared to have less components, than needed, the values of
14945bd8deadSopenharmony_ci    the missing component(s) are undefined. The OpenGL specification, section
14955bd8deadSopenharmony_ci    3.x.x, describes API to route varying output variables to color buffers.
14965bd8deadSopenharmony_ci
14975bd8deadSopenharmony_ci    Add the following examples:
14985bd8deadSopenharmony_ci
14995bd8deadSopenharmony_ci      noperspective varying float temperature;
15005bd8deadSopenharmony_ci      flat varying vec3 myColor;
15015bd8deadSopenharmony_ci      centroid varying vec2 myTexCoord;
15025bd8deadSopenharmony_ci      centroid noperspective varying vec2 myTexCoord;
15035bd8deadSopenharmony_ci      varying out ivec3 foo;
15045bd8deadSopenharmony_ci
15055bd8deadSopenharmony_ci    Change the third paragraph on p. 25 as follows:
15065bd8deadSopenharmony_ci
15075bd8deadSopenharmony_ci    The "varying" qualifier can be used only with the data types float, vec2,
15085bd8deadSopenharmony_ci    vec3, vec4, mat2, mat3, and mat4, int, ivec2, ivec3, ivec4, unsigned int,
15095bd8deadSopenharmony_ci    uvec2, uvec3, uvec4 or arrays of these.  Structures cannot be varying. If
15105bd8deadSopenharmony_ci    the varying is declared as one of the integer or unsigned integer data
15115bd8deadSopenharmony_ci    type variants, then it has to also be qualified as being flat shaded,
15125bd8deadSopenharmony_ci    otherwise a compile error will occur.
15135bd8deadSopenharmony_ci
15145bd8deadSopenharmony_ci    The "varying out" qualifier can be used only with the data types float,
15155bd8deadSopenharmony_ci    vec2, vec3, vec4, int, ivec2, ivec3, ivec4, unsigned int, uvec2, uvec3 or
15165bd8deadSopenharmony_ci    uvec4. Structures or arrays cannot be declared as varying out.
15175bd8deadSopenharmony_ci
15185bd8deadSopenharmony_ci    Change section 5.1 "Operators"
15195bd8deadSopenharmony_ci
15205bd8deadSopenharmony_ci    Remove the "reserved" qualifications from the following operator
15215bd8deadSopenharmony_ci    precedence table entries:
15225bd8deadSopenharmony_ci
15235bd8deadSopenharmony_ci      Precedence          Operator class
15245bd8deadSopenharmony_ci      ----------          -----------------------------------
15255bd8deadSopenharmony_ci          3               (tilde is reserved)
15265bd8deadSopenharmony_ci          4               (modulus reserved)
15275bd8deadSopenharmony_ci          6               bit-wise shift (reserved)
15285bd8deadSopenharmony_ci          9               bit-wise and (reserved)
15295bd8deadSopenharmony_ci         10               bit-wise exclusive or (reserved)
15305bd8deadSopenharmony_ci         11               bit-wise inclusive or (reserved)
15315bd8deadSopenharmony_ci         16               (modulus, shift, and bit-wise are reserved)
15325bd8deadSopenharmony_ci
15335bd8deadSopenharmony_ci    Change section 5.8 "Assignments"
15345bd8deadSopenharmony_ci
15355bd8deadSopenharmony_ci    Change the first bullet from:
15365bd8deadSopenharmony_ci
15375bd8deadSopenharmony_ci       * The arithmetic assignments add into (+=)..
15385bd8deadSopenharmony_ci
15395bd8deadSopenharmony_ci    To:
15405bd8deadSopenharmony_ci
15415bd8deadSopenharmony_ci       * The arithmetic assignments add into (+=), subtract from (-
15425bd8deadSopenharmony_ci         =), multiply into (*=), and divide into (/=) as well as the
15435bd8deadSopenharmony_ci         assignments modulus into (%=), left shift by (<<=), right
15445bd8deadSopenharmony_ci         shift by (>>=), and into (&=), inclusive or into (|=),
15455bd8deadSopenharmony_ci         exclusive or into (^=). The expression
15465bd8deadSopenharmony_ci
15475bd8deadSopenharmony_ci    Delete the last bullet in this paragraph.
15485bd8deadSopenharmony_ci
15495bd8deadSopenharmony_ci    Remove the second bullet in the section starting with: The assignments
15505bd8deadSopenharmony_ci    modulus into..
15515bd8deadSopenharmony_ci
15525bd8deadSopenharmony_ci    Change section 5.9 "Expressions"
15535bd8deadSopenharmony_ci
15545bd8deadSopenharmony_ci    Change the bullet: The operator modulus (%) is reserved for future
15555bd8deadSopenharmony_ci    use to:
15565bd8deadSopenharmony_ci
15575bd8deadSopenharmony_ci    * The arithmetic operator % that operates on signed or unsigned integer
15585bd8deadSopenharmony_ci      typed expressions (including vectors). The two operands must be of the
15595bd8deadSopenharmony_ci      same type, or one can be a signed or unsigned integer scalar and the
15605bd8deadSopenharmony_ci      other a signed or unsigned integer vector.  If the second operand is
15615bd8deadSopenharmony_ci      zero, results are undefined. If one operand is scalar and the other is a
15625bd8deadSopenharmony_ci      vector, the scalar is applied component-wise to the vector, resulting in
15635bd8deadSopenharmony_ci      the same type as the vector. If both operands are non-negative, then the
15645bd8deadSopenharmony_ci      remainder is non-negative. Results are undefined if one, or both,
15655bd8deadSopenharmony_ci      operands are negative.
15665bd8deadSopenharmony_ci
15675bd8deadSopenharmony_ci    Change the last bullet: "Operators and (&), or (|), exclusive or (^), not
15685bd8deadSopenharmony_ci    (~), right-shift (>>), left shift (<<). These operators are reserved for
15695bd8deadSopenharmony_ci    future use." To the following bullets:
15705bd8deadSopenharmony_ci
15715bd8deadSopenharmony_ci    * The one's complement operator ~. The operand must be of type signed or
15725bd8deadSopenharmony_ci      unsigned integer (including vectors), and the result is the one's
15735bd8deadSopenharmony_ci      complement of its operand. If the operand is a vector, the operator is
15745bd8deadSopenharmony_ci      applied component-wise to the vector. If the operand is unsigned, the
15755bd8deadSopenharmony_ci      result is computed by subtracting the value from the largest unsigned
15765bd8deadSopenharmony_ci      integer value. If the operand is signed, the result is computed by
15775bd8deadSopenharmony_ci      converting the operand to an unsigned integer, applying ~, and
15785bd8deadSopenharmony_ci      converting back to a signed integer.
15795bd8deadSopenharmony_ci
15805bd8deadSopenharmony_ci    * The shift operators << and >>. For both operators, the operands must be
15815bd8deadSopenharmony_ci      of type signed or unsigned integer (including vectors). If the first
15825bd8deadSopenharmony_ci      operand is a scalar, the second operand has to be a scalar as well. The
15835bd8deadSopenharmony_ci      result is undefined if the right operand is negative, or greater than or
15845bd8deadSopenharmony_ci      equal to the number of bits in the left expression's type. The value of
15855bd8deadSopenharmony_ci      E1 << E2 is E1 (interpreted as a bit pattern) left-shifted by E2
15865bd8deadSopenharmony_ci      bits. The value of E1 >> E2 is E1 right-shifted by E2 bit positions.  If
15875bd8deadSopenharmony_ci      E1 is a signed integer, the right-shift will extend the sign bit. If E1
15885bd8deadSopenharmony_ci      is an unsigned integer, the right-shift will zero-extend.
15895bd8deadSopenharmony_ci
15905bd8deadSopenharmony_ci    * The bitwise AND operator &. The operands must be of type signed or
15915bd8deadSopenharmony_ci      unsigned integer (including vectors). The two operands must be of the
15925bd8deadSopenharmony_ci      same type, or one can be a signed or unsigned integer scalar and the
15935bd8deadSopenharmony_ci      other a signed or unsigned integer vector. If one operand is a scalar
15945bd8deadSopenharmony_ci      and the other a vector, the scalar is applied component-wise to the
15955bd8deadSopenharmony_ci      vector, resulting in the same type as the vector. The result is the
15965bd8deadSopenharmony_ci      bitwise AND function of the operands.
15975bd8deadSopenharmony_ci
15985bd8deadSopenharmony_ci    * The bitwise exclusive OR operator ^. The operands must be of type signed
15995bd8deadSopenharmony_ci      or unsigned integer (including vectors). The two operands must be of the
16005bd8deadSopenharmony_ci      same type, or one can be a signed or unsigned integer scalar and the
16015bd8deadSopenharmony_ci      other a signed or unsigned integer vector. If one operand is a scalar
16025bd8deadSopenharmony_ci      and the other a vector, the scalar is applied component-wise to the
16035bd8deadSopenharmony_ci      vector, resulting in the same type as the vector. The result is the
16045bd8deadSopenharmony_ci      bitwise exclusive OR function of the operands.
16055bd8deadSopenharmony_ci
16065bd8deadSopenharmony_ci    * The bitwise inclusive OR operator |. The operands must be of type signed
16075bd8deadSopenharmony_ci      or unsigned integer (including vectors). The two operands must be of the
16085bd8deadSopenharmony_ci      same type, or one can be a signed or unsigned integer scalar and the
16095bd8deadSopenharmony_ci      other a signed or unsigned integer vector. If one operand is a scalar
16105bd8deadSopenharmony_ci      and the other a vector, the scalar is applied component-wise to the
16115bd8deadSopenharmony_ci      vector, resulting in the same type as the vector.  The result is the
16125bd8deadSopenharmony_ci      bitwise inclusive OR function of the operands.
16135bd8deadSopenharmony_ci
16145bd8deadSopenharmony_ci    Change Section 7.1 "Vertex Shader Special Variables"
16155bd8deadSopenharmony_ci
16165bd8deadSopenharmony_ci    Add the following definition to the list of built-in variable definitions:
16175bd8deadSopenharmony_ci
16185bd8deadSopenharmony_ci          int gl_VertexID   // read-only
16195bd8deadSopenharmony_ci          int gl_InstanceID // read-only
16205bd8deadSopenharmony_ci
16215bd8deadSopenharmony_ci    Add the following paragraph at the end of the section:
16225bd8deadSopenharmony_ci
16235bd8deadSopenharmony_ci    The variable gl_VertexID is available as a read-only variable from within
16245bd8deadSopenharmony_ci    vertex shaders and holds the integer index <i> implicitly passed to
16255bd8deadSopenharmony_ci    ArrayElement() to specify the vertex. The value of gl_VertexID is defined
16265bd8deadSopenharmony_ci    if and only if:
16275bd8deadSopenharmony_ci
16285bd8deadSopenharmony_ci      * the vertex comes from a vertex array command that specifies a complete
16295bd8deadSopenharmony_ci        primitive (e.g. DrawArrays, DrawElements),
16305bd8deadSopenharmony_ci
16315bd8deadSopenharmony_ci      * all enabled vertex arrays have non-zero buffer object bindings, and
16325bd8deadSopenharmony_ci
16335bd8deadSopenharmony_ci      * the vertex does not come from a display list, even if the display list
16345bd8deadSopenharmony_ci        was compiled using DrawArrays / DrawElements with data sourced from
16355bd8deadSopenharmony_ci        buffer objects.
16365bd8deadSopenharmony_ci
16375bd8deadSopenharmony_ci    The variable gl_InstanceID is availale as a read-only variable from within
16385bd8deadSopenharmony_ci    vertex shaders and holds holds the integer index of the current primitive
16395bd8deadSopenharmony_ci    in an instanced draw call (DrawArraysInstancedEXT,
16405bd8deadSopenharmony_ci    DrawElementsInstancedEXT). If the current primitive does not come from an
16415bd8deadSopenharmony_ci    instanced draw call, the value of gl_InstanceID is zero.
16425bd8deadSopenharmony_ci
16435bd8deadSopenharmony_ci    Change Section 7.2 "Fragment Shader Special Variables"
16445bd8deadSopenharmony_ci
16455bd8deadSopenharmony_ci    Change the 8th and 9th paragraphs on p. 43 as follows:
16465bd8deadSopenharmony_ci
16475bd8deadSopenharmony_ci    If a shader statically assigns a value to gl_FragColor, it may not assign
16485bd8deadSopenharmony_ci    a value to any element of gl_FragData nor to any user-defined varying
16495bd8deadSopenharmony_ci    output variable (section 4.3.6). If a shader statically writes a value to
16505bd8deadSopenharmony_ci    any element of gl_FragData, it may not assign a value to gl_FragColor nor
16515bd8deadSopenharmony_ci    to any user-defined varying output variable. That is, a shader may assign
16525bd8deadSopenharmony_ci    values to either gl_FragColor, gl_FragData, or any user-defined varying
16535bd8deadSopenharmony_ci    output variable, but not to a combination of the three options.
16545bd8deadSopenharmony_ci
16555bd8deadSopenharmony_ci    If a shader executes the discard keyword, the fragment is discarded, and
16565bd8deadSopenharmony_ci    the values of gl_FragDepth, gl_FragColor, gl_FragData and any user-defined
16575bd8deadSopenharmony_ci    varying output variables become irrelevant.
16585bd8deadSopenharmony_ci
16595bd8deadSopenharmony_ci    Add the following paragraph to the top of p. 44:
16605bd8deadSopenharmony_ci
16615bd8deadSopenharmony_ci    The variable gl_PrimitiveID is available as a read-only variable from
16625bd8deadSopenharmony_ci    within fragment shaders and holds the id of the currently processed
16635bd8deadSopenharmony_ci    primitive. Section 3.11, subsection "Shader Inputs" of the OpenGL 2.0
16645bd8deadSopenharmony_ci    specification describes what value it holds based on the primitive type.
16655bd8deadSopenharmony_ci
16665bd8deadSopenharmony_ci    Add the following prototype to the list of built-in variables accessible
16675bd8deadSopenharmony_ci    from a fragment shader:
16685bd8deadSopenharmony_ci
16695bd8deadSopenharmony_ci         int gl_PrimitiveID;
16705bd8deadSopenharmony_ci
16715bd8deadSopenharmony_ci    Change Chapter 8, sixth paragraph on page 50:
16725bd8deadSopenharmony_ci
16735bd8deadSopenharmony_ci    Change the sentence:
16745bd8deadSopenharmony_ci
16755bd8deadSopenharmony_ci    When the built-in functions are specified below, where the input arguments
16765bd8deadSopenharmony_ci    (and corresponding output)can be float, vec2, vec3, or vec4, genType is
16775bd8deadSopenharmony_ci    used as the argument.
16785bd8deadSopenharmony_ci
16795bd8deadSopenharmony_ci    To:
16805bd8deadSopenharmony_ci
16815bd8deadSopenharmony_ci    When the built-in functions are specified below, where the input arguments
16825bd8deadSopenharmony_ci    (and corresponding output) can be float, vec2, vec3, or vec4, genType is
16835bd8deadSopenharmony_ci    used as the argument. Where the input arguments (and corresponding output)
16845bd8deadSopenharmony_ci    can be int, ivec2, ivec3 or ivec4, genIType is used as the argument. Where
16855bd8deadSopenharmony_ci    the input arguments (and corresponding output) can be unsigned int, uvec2,
16865bd8deadSopenharmony_ci    uvec3, or uvec4, genUType is used as the argument.
16875bd8deadSopenharmony_ci
16885bd8deadSopenharmony_ci    Add to section 8.3 "Common functions"
16895bd8deadSopenharmony_ci
16905bd8deadSopenharmony_ci    Add integer versions of the abs, sign, min, max and clamp functions, as
16915bd8deadSopenharmony_ci    follows:
16925bd8deadSopenharmony_ci
16935bd8deadSopenharmony_ci    Syntax:
16945bd8deadSopenharmony_ci
16955bd8deadSopenharmony_ci      genIType abs(genIType x)
16965bd8deadSopenharmony_ci
16975bd8deadSopenharmony_ci      genIType sign(genIType x)
16985bd8deadSopenharmony_ci
16995bd8deadSopenharmony_ci      genIType min(genIType x, genIType y)
17005bd8deadSopenharmony_ci      genIType min(genIType x, int y)
17015bd8deadSopenharmony_ci      genUType min(genUType x, genUType y)
17025bd8deadSopenharmony_ci      genUType min(genUType x, unsigned int y)
17035bd8deadSopenharmony_ci
17045bd8deadSopenharmony_ci      genIType max(genIType x, genIType y)
17055bd8deadSopenharmony_ci      genIType max(genIType x, int y)
17065bd8deadSopenharmony_ci      genUType max(genUType x, genUType y)
17075bd8deadSopenharmony_ci      genUType max(genUType x, unsigned int y)
17085bd8deadSopenharmony_ci
17095bd8deadSopenharmony_ci      genIType clamp(genIType x, genIType minval, genIType maxval)
17105bd8deadSopenharmony_ci      genIType clamp(genIType x, int minval, int maxval)
17115bd8deadSopenharmony_ci      genUType clamp(genUType x, genUType minval, genUType maxval)
17125bd8deadSopenharmony_ci      genUType clamp(genUType x, unsigned int minval,
17135bd8deadSopenharmony_ci                     unsigned int maxval)
17145bd8deadSopenharmony_ci
17155bd8deadSopenharmony_ci    Add the following new functions:
17165bd8deadSopenharmony_ci
17175bd8deadSopenharmony_ci    Syntax:
17185bd8deadSopenharmony_ci
17195bd8deadSopenharmony_ci      genType truncate(genType x)
17205bd8deadSopenharmony_ci
17215bd8deadSopenharmony_ci    Description:
17225bd8deadSopenharmony_ci
17235bd8deadSopenharmony_ci      Returns a value equal to the integer closest to x whose absolute value
17245bd8deadSopenharmony_ci      is not larger than the absolute value of x.
17255bd8deadSopenharmony_ci
17265bd8deadSopenharmony_ci    Syntax:
17275bd8deadSopenharmony_ci
17285bd8deadSopenharmony_ci      genType round(genType x)
17295bd8deadSopenharmony_ci
17305bd8deadSopenharmony_ci    Description:
17315bd8deadSopenharmony_ci
17325bd8deadSopenharmony_ci      Returns a value equal to the closest integer to x. If the fractional
17335bd8deadSopenharmony_ci      portion of the operand is 0.5, the nearest even integer is returned. For
17345bd8deadSopenharmony_ci      example, round (1.0) returns 1.0.  round(-1.5) returns -2.0. round(3.5)
17355bd8deadSopenharmony_ci      and round (4.5) both return 4.0.
17365bd8deadSopenharmony_ci
17375bd8deadSopenharmony_ci    Add to section 8.6 "Vector Relational Functions"
17385bd8deadSopenharmony_ci
17395bd8deadSopenharmony_ci    Change the sentence:
17405bd8deadSopenharmony_ci
17415bd8deadSopenharmony_ci    Below, "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
17425bd8deadSopenharmony_ci    is a placeholder for one of ivec2, ivec3, or ivec4, and "vec" is a
17435bd8deadSopenharmony_ci    placeholder for vec2, vec3, or vec4.
17445bd8deadSopenharmony_ci
17455bd8deadSopenharmony_ci    To:
17465bd8deadSopenharmony_ci
17475bd8deadSopenharmony_ci    Below, "bvec" is a placeholder for one of bvec2, bvec3, or bvec4, "ivec"
17485bd8deadSopenharmony_ci    is a placeholder for one of ivec2, ivec3, or ivec4, "uvec" is a
17495bd8deadSopenharmony_ci    placeholder for one of uvec2, uvec3 or uvec4 and "vec" is a placeholder
17505bd8deadSopenharmony_ci    for vec2, vec3, or vec4.
17515bd8deadSopenharmony_ci
17525bd8deadSopenharmony_ci    Add uvec versions of all but the any, all and not functions to the table
17535bd8deadSopenharmony_ci    in this section, as follows:
17545bd8deadSopenharmony_ci
17555bd8deadSopenharmony_ci       bvec lessThan(uvec x, uvec y)
17565bd8deadSopenharmony_ci       bvec lessThanEqual(uvec x, uvec y)
17575bd8deadSopenharmony_ci
17585bd8deadSopenharmony_ci       bvec greaterThan(uvec x, uvec y)
17595bd8deadSopenharmony_ci       bvec greaterThanEqual(uvec x, uvec y)
17605bd8deadSopenharmony_ci
17615bd8deadSopenharmony_ci       bvec equal(uvec x, uvec y)
17625bd8deadSopenharmony_ci       bvec notEqual(uvec x, uvec y)
17635bd8deadSopenharmony_ci
17645bd8deadSopenharmony_ci    Add to section 8.7 "Texture Lookup Functions"
17655bd8deadSopenharmony_ci
17665bd8deadSopenharmony_ci    Remove the first sentence in the last paragraph:
17675bd8deadSopenharmony_ci
17685bd8deadSopenharmony_ci    "The built-ins suffixed with "Lod" are allowed only in a vertex shader.".
17695bd8deadSopenharmony_ci
17705bd8deadSopenharmony_ci    Add to this section:
17715bd8deadSopenharmony_ci
17725bd8deadSopenharmony_ci    Texture data can be stored by the GL as floating point, unsigned
17735bd8deadSopenharmony_ci    normalized integer, unsigned integer or signed integer data. This is
17745bd8deadSopenharmony_ci    determined by the type of the internal format of the texture.  Texture
17755bd8deadSopenharmony_ci    lookups on unsigned normalized integer and floating point data return
17765bd8deadSopenharmony_ci    floating point values in the range [0, 1]. See also section 2.15.4.1 of
17775bd8deadSopenharmony_ci    the OpenGL specification.
17785bd8deadSopenharmony_ci
17795bd8deadSopenharmony_ci    Texture lookup functions are provided that can return their result as
17805bd8deadSopenharmony_ci    floating point, unsigned integer or signed integer, depending on the
17815bd8deadSopenharmony_ci    sampler type passed to the lookup function. Care must be taken to use the
17825bd8deadSopenharmony_ci    right sampler type for texture access. Table 8.xxx lists the supported
17835bd8deadSopenharmony_ci    combinations of sampler types and texture internal formats.
17845bd8deadSopenharmony_ci
17855bd8deadSopenharmony_ci      texture
17865bd8deadSopenharmony_ci      internal      default (float) integer     unsigned integer
17875bd8deadSopenharmony_ci      format        sampler         sampler     sampler
17885bd8deadSopenharmony_ci      float         vec4            n/a          n/a
17895bd8deadSopenharmony_ci      normalized    vec4            n/a          n/a
17905bd8deadSopenharmony_ci      signed int    n/a             ivec4        n/a
17915bd8deadSopenharmony_ci      unsigned int  n/a             n/a          uvec4
17925bd8deadSopenharmony_ci
17935bd8deadSopenharmony_ci    Table 8.xxx Valid combinations of the type of the internal format of a
17945bd8deadSopenharmony_ci    texture and the type of the sampler used to access the texture. Each cell
17955bd8deadSopenharmony_ci    in the table indicates the type of the return value of a texture
17965bd8deadSopenharmony_ci    lookup. N/a means this combination is not supported. A texture lookup
17975bd8deadSopenharmony_ci    using a n/a combination will return undefined values. The exceptions to
17985bd8deadSopenharmony_ci    this table are the "textureSize" lookup functions, which will return an
17995bd8deadSopenharmony_ci    integer or integer vector, regardless of the sampler type.
18005bd8deadSopenharmony_ci
18015bd8deadSopenharmony_ci    If a texture with a signed integer internal format is accessed, one of the
18025bd8deadSopenharmony_ci    signed integer sampler types must be used. If a texture with an unsigned
18035bd8deadSopenharmony_ci    integer internal format is accessed, one of the unsigned integer sampler
18045bd8deadSopenharmony_ci    types must be used. Otherwise, one of the default (float) sampler types
18055bd8deadSopenharmony_ci    must be used. If the types of a sampler and the corresponding texture
18065bd8deadSopenharmony_ci    internal format do not match, the result of a texture lookup is undefined.
18075bd8deadSopenharmony_ci
18085bd8deadSopenharmony_ci    If an integer sampler type is used, the result of a texture lookup is an
18095bd8deadSopenharmony_ci    ivec4. If an unsigned integer sampler type is used, the result of a
18105bd8deadSopenharmony_ci    texture lookup is a uvec4. If a default sampler type is used, the result
18115bd8deadSopenharmony_ci    of a texture lookup is a vec4, where each component is in the range [0,
18125bd8deadSopenharmony_ci    1].
18135bd8deadSopenharmony_ci
18145bd8deadSopenharmony_ci    Integer and unsigned integer functions of all the texture lookup functions
18155bd8deadSopenharmony_ci    described in this section are also provided, except for the "shadow"
18165bd8deadSopenharmony_ci    versions, using function overloading. Their prototypes, however, are not
18175bd8deadSopenharmony_ci    listed separately. These overloaded functions use the integer or
18185bd8deadSopenharmony_ci    unsigned-integer versions of the sampler types and will return an ivec4 or
18195bd8deadSopenharmony_ci    an uvec4 respectively, except for the "textureSize" functions, which will
18205bd8deadSopenharmony_ci    always return an integer, or integer vector. Refer also to table 8.xxxx
18215bd8deadSopenharmony_ci    for valid combinations of texture internal formats and sampler types.  For
18225bd8deadSopenharmony_ci    example, for the texture1D function, the complete set of prototypes is:
18235bd8deadSopenharmony_ci
18245bd8deadSopenharmony_ci       vec4 texture1D(sampler1D sampler, float coord
18255bd8deadSopenharmony_ci                      [, float bias])
18265bd8deadSopenharmony_ci       ivec4 texture1D(isampler1D sampler, float coord
18275bd8deadSopenharmony_ci                       [, float bias])
18285bd8deadSopenharmony_ci       uvec4 texture1D(usampler1D sampler, float coord
18295bd8deadSopenharmony_ci                       [, float bias])
18305bd8deadSopenharmony_ci
18315bd8deadSopenharmony_ci    Add the following new texture lookup functions:
18325bd8deadSopenharmony_ci
18335bd8deadSopenharmony_ci    Syntax:
18345bd8deadSopenharmony_ci
18355bd8deadSopenharmony_ci      vec4 texelFetch1D(sampler1D sampler, int coord, int lod)
18365bd8deadSopenharmony_ci      vec4 texelFetch2D(sampler2D sampler, ivec2 coord, int lod)
18375bd8deadSopenharmony_ci      vec4 texelFetch3D(sampler3D sampler, ivec3 coord, int lod)
18385bd8deadSopenharmony_ci      vec4 texelFetch2DRect(sampler2DRect sampler, ivec2 coord)
18395bd8deadSopenharmony_ci      vec4 texelFetch1DArray(sampler1DArray sampler, ivec2 coord, int lod)
18405bd8deadSopenharmony_ci      vec4 texelFetch2DArray(sampler2DArray sampler, ivec3 coord, int lod)
18415bd8deadSopenharmony_ci
18425bd8deadSopenharmony_ci    Description:
18435bd8deadSopenharmony_ci
18445bd8deadSopenharmony_ci    Use integer texture coordinate <coord> to lookup a single texel from the
18455bd8deadSopenharmony_ci    level-of-detail <lod> on the texture bound to <sampler> as described in
18465bd8deadSopenharmony_ci    section 2.15.4.1 of the OpenGL specification "Texel Fetches". For the
18475bd8deadSopenharmony_ci    "array" versions, the layer of the texture array to access is either
18485bd8deadSopenharmony_ci    coord.t or coord.p, depending on the use of the 1D or 2D texel fetch
18495bd8deadSopenharmony_ci    lookup, respectively. Note that texelFetch2DRect does not take a
18505bd8deadSopenharmony_ci    level-of-detail input.
18515bd8deadSopenharmony_ci
18525bd8deadSopenharmony_ci    Syntax:
18535bd8deadSopenharmony_ci
18545bd8deadSopenharmony_ci      vec4 texelFetchBuffer(samplerBuffer sampler, int coord)
18555bd8deadSopenharmony_ci
18565bd8deadSopenharmony_ci    Description:
18575bd8deadSopenharmony_ci
18585bd8deadSopenharmony_ci    Use integer texture coordinate <coord> to lookup into the buffer texture
18595bd8deadSopenharmony_ci    bound to <sampler>.
18605bd8deadSopenharmony_ci
18615bd8deadSopenharmony_ci    Syntax:
18625bd8deadSopenharmony_ci
18635bd8deadSopenharmony_ci      int textureSizeBuffer(samplerBuffer sampler)
18645bd8deadSopenharmony_ci      int textureSize1D(sampler1D sampler, int lod)
18655bd8deadSopenharmony_ci      ivec2 textureSize2D(sampler2D sampler, int lod)
18665bd8deadSopenharmony_ci      ivec3 textureSize3D(sampler3D sampler, int lod)
18675bd8deadSopenharmony_ci      ivec2 textureSizeCube(samplerCube sampler, int lod)
18685bd8deadSopenharmony_ci      ivec2 textureSize2DRect(sampler2DRect sampler, int lod)
18695bd8deadSopenharmony_ci      ivec2 textureSize1DArray(sampler1DArray sampler, int lod)
18705bd8deadSopenharmony_ci      ivec3 textureSize2DArray(sampler2DArray sampler, int lod)
18715bd8deadSopenharmony_ci
18725bd8deadSopenharmony_ci    Description:
18735bd8deadSopenharmony_ci
18745bd8deadSopenharmony_ci    Returns the dimensions, width, height, depth, and number of layers, of
18755bd8deadSopenharmony_ci    level <lod> for the texture bound to <sampler>, as described in section
18765bd8deadSopenharmony_ci    2.15.4.1 of the OpenGL specification section "Texture Size Query". For the
18775bd8deadSopenharmony_ci    textureSize1DArray function, the first (".x") component of the returned
18785bd8deadSopenharmony_ci    vector is filled with the width of the texture image and the second
18795bd8deadSopenharmony_ci    component with the number of layers in the texture array. For the
18805bd8deadSopenharmony_ci    textureSize2DArray function, the first two components (".x" and ".y") of
18815bd8deadSopenharmony_ci    the returned vector are filled with the width and height of the texture
18825bd8deadSopenharmony_ci    image respectively. The third component (".z") is filled with the number
18835bd8deadSopenharmony_ci    of layers in the texture array.
18845bd8deadSopenharmony_ci
18855bd8deadSopenharmony_ci    Syntax:
18865bd8deadSopenharmony_ci
18875bd8deadSopenharmony_ci      vec4 texture1DArray(sampler1DArray sampler, vec2 coord
18885bd8deadSopenharmony_ci                          [, float bias])
18895bd8deadSopenharmony_ci      vec4 texture1DArrayLod(sampler1DArray sampler, vec2 coord,
18905bd8deadSopenharmony_ci                             float lod)
18915bd8deadSopenharmony_ci
18925bd8deadSopenharmony_ci    Description:
18935bd8deadSopenharmony_ci
18945bd8deadSopenharmony_ci    Use the first element (coord.s) of texture coordinate coord to do a
18955bd8deadSopenharmony_ci    texture lookup in the layer indicated by the second coordinate coord.t of
18965bd8deadSopenharmony_ci    the 1D texture array currently bound to sampler. The layer to access is
18975bd8deadSopenharmony_ci    computed by layer = max (0, min(d - 1, floor (coord.t + 0.5)) where 'd' is
18985bd8deadSopenharmony_ci    the depth of the texture array.
18995bd8deadSopenharmony_ci
19005bd8deadSopenharmony_ci    Syntax:
19015bd8deadSopenharmony_ci
19025bd8deadSopenharmony_ci      vec4 texture2DArray(sampler2DArray sampler, vec3 coord
19035bd8deadSopenharmony_ci                            [, float bias])
19045bd8deadSopenharmony_ci      vec4 texture2DArrayLod(sampler2DArray sampler, vec3 coord,
19055bd8deadSopenharmony_ci                               float lod)
19065bd8deadSopenharmony_ci    Description:
19075bd8deadSopenharmony_ci
19085bd8deadSopenharmony_ci    Use the first two elements (coord.s, coord.t) of texture coordinate coord
19095bd8deadSopenharmony_ci    to do a texture lookup in the layer indicated by the third coordinate
19105bd8deadSopenharmony_ci    coord.p of the 2D texture array currently bound to sampler. The layer to
19115bd8deadSopenharmony_ci    access is computed by layer = max (0, min(d - 1, floor (coord.p + 0.5))
19125bd8deadSopenharmony_ci    where 'd' is the depth of the texture array.
19135bd8deadSopenharmony_ci
19145bd8deadSopenharmony_ci    Syntax:
19155bd8deadSopenharmony_ci
19165bd8deadSopenharmony_ci      vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord,
19175bd8deadSopenharmony_ci                         [float bias])
19185bd8deadSopenharmony_ci      vec4 shadow1DArrayLod(sampler1DArrayShadow sampler,
19195bd8deadSopenharmony_ci                            vec3 coord, float lod)
19205bd8deadSopenharmony_ci    Description:
19215bd8deadSopenharmony_ci
19225bd8deadSopenharmony_ci    Use texture coordinate coord.s to do a depth comparison lookup on an array
19235bd8deadSopenharmony_ci    layer of the depth texture bound to sampler, as described in section
19245bd8deadSopenharmony_ci    3.8.14 of version 2.0 of the OpenGL specification. The layer to access is
19255bd8deadSopenharmony_ci    indicated by the second coordinate coord.t and is computed by layer = max
19265bd8deadSopenharmony_ci    (0, min(d - 1, floor (coord.t + 0.5)) where 'd' is the depth of the
19275bd8deadSopenharmony_ci    texture array. The third component of coord (coord.p) is used as the R
19285bd8deadSopenharmony_ci    value. The texture bound to sampler must be a depth texture, or results
19295bd8deadSopenharmony_ci    are undefined.
19305bd8deadSopenharmony_ci
19315bd8deadSopenharmony_ci    Syntax:
19325bd8deadSopenharmony_ci
19335bd8deadSopenharmony_ci      vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord)
19345bd8deadSopenharmony_ci
19355bd8deadSopenharmony_ci    Description:
19365bd8deadSopenharmony_ci
19375bd8deadSopenharmony_ci    Use texture coordinate (coord.s, coord.t) to do a depth comparison lookup
19385bd8deadSopenharmony_ci    on an array layer of the depth texture bound to sampler, as described in
19395bd8deadSopenharmony_ci    section 3.8.14 of version 2.0 of the OpenGL specification. The layer to
19405bd8deadSopenharmony_ci    access is indicated by the third coordinate coord.p and is computed by
19415bd8deadSopenharmony_ci    layer = max (0, min(d - 1, floor (coord.p + 0.5)) where 'd' is the depth
19425bd8deadSopenharmony_ci    of the texture array. The fourth component of coord (coord.q) is used as
19435bd8deadSopenharmony_ci    the R value. The texture bound to sampler must be a depth texture, or
19445bd8deadSopenharmony_ci    results are undefined.
19455bd8deadSopenharmony_ci
19465bd8deadSopenharmony_ci    Syntax:
19475bd8deadSopenharmony_ci
19485bd8deadSopenharmony_ci        vec4 shadowCube(samplerCubeShadow sampler, vec4 coord)
19495bd8deadSopenharmony_ci
19505bd8deadSopenharmony_ci    Description:
19515bd8deadSopenharmony_ci
19525bd8deadSopenharmony_ci    Use texture coordinate (coord.s, coord.t, coord.p) to do a depth
19535bd8deadSopenharmony_ci    comparison lookup on the depth cubemap bound to sampler, as described in
19545bd8deadSopenharmony_ci    section 3.8.14. The direction of the vector (coord.s, coord.t, coord.p) is
19555bd8deadSopenharmony_ci    used to select which face to do a two-dimensional texture lookup in, as
19565bd8deadSopenharmony_ci    described in section 3.8.6 of the OpenGL 2.0 specification. The fourth
19575bd8deadSopenharmony_ci    component of coord (coord.q) is used as the R value. The texture bound to
19585bd8deadSopenharmony_ci    sampler must be a depth cubemap, otherwise results are undefined.
19595bd8deadSopenharmony_ci
19605bd8deadSopenharmony_ci    Syntax:
19615bd8deadSopenharmony_ci
19625bd8deadSopenharmony_ci      vec4 texture1DGrad(sampler1D sampler, float coord, 
19635bd8deadSopenharmony_ci                         float ddx, float ddy);
19645bd8deadSopenharmony_ci      vec4 texture1DProjGrad(sampler1D sampler, vec2 coord, 
19655bd8deadSopenharmony_ci                             float ddx, float ddy);
19665bd8deadSopenharmony_ci      vec4 texture1DProjGrad(sampler1D sampler, vec4 coord, 
19675bd8deadSopenharmony_ci                             float ddx, float ddy);
19685bd8deadSopenharmony_ci      vec4 texture1DArrayGrad(sampler1DArray sampler, vec2 coord, 
19695bd8deadSopenharmony_ci                              float ddx, float ddy);
19705bd8deadSopenharmony_ci
19715bd8deadSopenharmony_ci      vec4 texture2DGrad(sampler2D sampler, vec2 coord,
19725bd8deadSopenharmony_ci                         vec2 ddx, vec2 ddy);
19735bd8deadSopenharmony_ci      vec4 texture2DProjGrad(sampler2D sampler, vec3 coord,
19745bd8deadSopenharmony_ci                             vec2 ddx, vec2 ddy);
19755bd8deadSopenharmony_ci      vec4 texture2DProjGrad(sampler2D sampler, vec4 coord,
19765bd8deadSopenharmony_ci                             vec2 ddx, vec2 ddy);
19775bd8deadSopenharmony_ci      vec4 texture2DArrayGrad(sampler2DArray sampler, vec3 coord,
19785bd8deadSopenharmony_ci                              vec2 ddx, vec2 ddy);
19795bd8deadSopenharmony_ci
19805bd8deadSopenharmony_ci      vec4 texture3DGrad(sampler3D sampler, vec3 coord,
19815bd8deadSopenharmony_ci                         vec3 ddx, vec3 ddy);
19825bd8deadSopenharmony_ci      vec4 texture3DProjGrad(sampler3D sampler, vec4 coord,
19835bd8deadSopenharmony_ci                             vec3 ddx, vec3 ddy);
19845bd8deadSopenharmony_ci
19855bd8deadSopenharmony_ci      vec4 textureCubeGrad(samplerCube sampler, vec3 coord,
19865bd8deadSopenharmony_ci                           vec3 ddx, vec3 ddy);
19875bd8deadSopenharmony_ci
19885bd8deadSopenharmony_ci      vec4 shadow1DGrad(sampler1DShadow sampler, vec3 coord,
19895bd8deadSopenharmony_ci                        float ddx, float ddy);
19905bd8deadSopenharmony_ci      vec4 shadow1DProjGrad(sampler1DShadow sampler, vec4 coord,
19915bd8deadSopenharmony_ci                            float ddx, float ddy);
19925bd8deadSopenharmony_ci      vec4 shadow1DArrayGrad(sampler1DArrayShadow sampler, vec3 coord,
19935bd8deadSopenharmony_ci                             float ddx, float ddy);
19945bd8deadSopenharmony_ci
19955bd8deadSopenharmony_ci      vec4 shadow2DGrad(sampler2DShadow sampler, vec3 coord,
19965bd8deadSopenharmony_ci                        vec2 ddx, vec2 ddy);
19975bd8deadSopenharmony_ci      vec4 shadow2DProjGrad(sampler2DShadow sampler, vec4 coord,
19985bd8deadSopenharmony_ci                            vec2 ddx, vec2 ddy);
19995bd8deadSopenharmony_ci      vec4 shadow2DArrayGrad(sampler2DArrayShadow sampler, vec4 coord,
20005bd8deadSopenharmony_ci                             vec2 ddx, vec2 ddy);
20015bd8deadSopenharmony_ci
20025bd8deadSopenharmony_ci      vec4 texture2DRectGrad(sampler2DRect sampler, vec2 coord,
20035bd8deadSopenharmony_ci                             vec2 ddx, vec2 ddy);
20045bd8deadSopenharmony_ci      vec4 texture2DRectProjGrad(sampler2DRect sampler, vec3 coord,
20055bd8deadSopenharmony_ci                                 vec2 ddx, vec2 ddy);
20065bd8deadSopenharmony_ci      vec4 texture2DRectProjGrad(sampler2DRect sampler, vec4 coord,
20075bd8deadSopenharmony_ci                                 vec2 ddx, vec2 ddy);
20085bd8deadSopenharmony_ci
20095bd8deadSopenharmony_ci      vec4 shadow2DRectGrad(sampler2DRectShadow sampler, vec3 coord,
20105bd8deadSopenharmony_ci                            vec2 ddx, vec2 ddy);
20115bd8deadSopenharmony_ci      vec4 shadow2DRectProjGrad(sampler2DRectShadow sampler, vec4 coord,
20125bd8deadSopenharmony_ci                                vec2 ddx, vec2 ddy);
20135bd8deadSopenharmony_ci
20145bd8deadSopenharmony_ci      vec4 shadowCubeGrad(samplerCubeShadow sampler, vec4 coord,
20155bd8deadSopenharmony_ci                          vec3 ddx, vec3 ddy);
20165bd8deadSopenharmony_ci
20175bd8deadSopenharmony_ci    Description:
20185bd8deadSopenharmony_ci
20195bd8deadSopenharmony_ci    The "Grad" functions map the partial derivatives ddx and ddy to ds/dx,
20205bd8deadSopenharmony_ci    dt/dx, dr/dx, and ds/dy, dt/dy, dr/dy respectively and use texture
20215bd8deadSopenharmony_ci    coordinate "coord" to do a texture lookup as described for their non
20225bd8deadSopenharmony_ci    "Grad" counterparts. The derivatives ddx and ddy are used as the explicit
20235bd8deadSopenharmony_ci    derivate of "coord" with respect to window x and window y respectively and
20245bd8deadSopenharmony_ci    are used to compute lambda_base(x,y) as in equation 3.18 in the OpenGL 2.0
20255bd8deadSopenharmony_ci    specification. For the "Proj" versions, it is assumed that the partial
20265bd8deadSopenharmony_ci    derivatives ddx and ddy are already projected. I.e. the GL assumes that
20275bd8deadSopenharmony_ci    ddx and ddy represent d(s/q)/dx, d(t/q)/dx, d(r/q)/dx and d(s/q)/dy,
20285bd8deadSopenharmony_ci    d(t/q)/dy, d(r/q)/dy respectively. For the "Cube" versions, the partial
20295bd8deadSopenharmony_ci    derivatives ddx and ddy are assumed to be in the coordinate system used
20305bd8deadSopenharmony_ci    before texture coordinates are projected onto the appropriate cube
20315bd8deadSopenharmony_ci    face. The partial derivatives of the post-projection texture coordinates,
20325bd8deadSopenharmony_ci    which are used for level-of-detail and anisotropic filtering
20335bd8deadSopenharmony_ci    calculations, are derived from coord, ddx and ddy in an
20345bd8deadSopenharmony_ci    implementation-dependent manner.
20355bd8deadSopenharmony_ci
20365bd8deadSopenharmony_ci    NOTE: Except for the "array" and shadowCubeGrad() functions, these
20375bd8deadSopenharmony_ci    functions are taken from the ARB_shader_texture_lod spec and are
20385bd8deadSopenharmony_ci    functionally equivalent.
20395bd8deadSopenharmony_ci
20405bd8deadSopenharmony_ci    Syntax:
20415bd8deadSopenharmony_ci
20425bd8deadSopenharmony_ci      vec4 texture1DOffset(sampler1D sampler, float coord,
20435bd8deadSopenharmony_ci                           int offset [,float bias])
20445bd8deadSopenharmony_ci      vec4 texture1DProjOffset(sampler1D sampler, vec2 coord,
20455bd8deadSopenharmony_ci                               int offset [,float bias])
20465bd8deadSopenharmony_ci      vec4 texture1DProjOffset(sampler1D sampler, vec4 coord,
20475bd8deadSopenharmony_ci                               int offset [,float bias])
20485bd8deadSopenharmony_ci      vec4 texture1DLodOffset(sampler1D sampler, float coord,
20495bd8deadSopenharmony_ci                              float lod, int offset)
20505bd8deadSopenharmony_ci      vec4 texture1DProjLodOffset(sampler1D sampler, vec2 coord,
20515bd8deadSopenharmony_ci                                  float lod, int offset)
20525bd8deadSopenharmony_ci      vec4 texture1DProjLodOffset(sampler1D sampler, vec4 coord,
20535bd8deadSopenharmony_ci                                  float lod, int offset)
20545bd8deadSopenharmony_ci
20555bd8deadSopenharmony_ci      vec4 texture2DOffset(sampler2D sampler, vec2 coord,
20565bd8deadSopenharmony_ci                           ivec2 offset [,float bias])
20575bd8deadSopenharmony_ci      vec4 texture2DProjOffset(sampler2D sampler, vec3 coord,
20585bd8deadSopenharmony_ci                               ivec2 offset [,float bias])
20595bd8deadSopenharmony_ci      vec4 texture2DProjOffset(sampler2D sampler, vec4 coord,
20605bd8deadSopenharmony_ci                               ivec2 offset [,float bias])
20615bd8deadSopenharmony_ci      vec4 texture2DLodOffset(sampler2D sampler, vec2 coord,
20625bd8deadSopenharmony_ci                              float lod, ivec2 offset)
20635bd8deadSopenharmony_ci      vec4 texture2DProjLodOffset(sampler2D sampler, vec3 coord,
20645bd8deadSopenharmony_ci                                  float lod, ivec2 offset)
20655bd8deadSopenharmony_ci      vec4 texture2DProjLodOffset(sampler2D sampler, vec4 coord,
20665bd8deadSopenharmony_ci                                  float lod, ivec2 offset)
20675bd8deadSopenharmony_ci
20685bd8deadSopenharmony_ci      vec4 texture3DOffset(sampler3D sampler, vec3 coord,
20695bd8deadSopenharmony_ci                           ivec3 offset [,float bias])
20705bd8deadSopenharmony_ci      vec4 texture3DProjOffset(sampler3D sampler, vec4 coord,
20715bd8deadSopenharmony_ci                               ivec3 offset [,float bias])
20725bd8deadSopenharmony_ci      vec4 texture3DLodOffset(sampler3D sampler, vec3 coord,
20735bd8deadSopenharmony_ci                              float lod, ivec3 offset)
20745bd8deadSopenharmony_ci      vec4 texture3DProjLodOffset(sampler3D sampler, vec4 coord,
20755bd8deadSopenharmony_ci                                  float lod, ivec3 offset)
20765bd8deadSopenharmony_ci
20775bd8deadSopenharmony_ci      vec4 shadow1DOffset(sampler1DShadow sampler, vec3 coord,
20785bd8deadSopenharmony_ci                          int offset [,float bias])
20795bd8deadSopenharmony_ci      vec4 shadow2DOffset(sampler2DShadow sampler, vec3 coord,
20805bd8deadSopenharmony_ci                          ivec2 offset [,float bias])
20815bd8deadSopenharmony_ci      vec4 shadow1DProjOffset(sampler1DShadow sampler, vec4 coord,
20825bd8deadSopenharmony_ci                              int offset [,float bias])
20835bd8deadSopenharmony_ci      vec4 shadow2DProjOffset(sampler2DShadow sampler, vec4 coord,
20845bd8deadSopenharmony_ci                              ivec2 offset [,float bias])
20855bd8deadSopenharmony_ci      vec4 shadow1DLodOffset(sampler1DShadow sampler, vec3 coord, 
20865bd8deadSopenharmony_ci                             float lod, int offset)
20875bd8deadSopenharmony_ci      vec4 shadow2DLodOffset(sampler2DShadow sampler, vec3 coord,
20885bd8deadSopenharmony_ci                             float lod, ivec2 offset)
20895bd8deadSopenharmony_ci      vec4 shadow1DProjLodOffset(sampler1DShadow sampler, vec4 coord,
20905bd8deadSopenharmony_ci                                 float lod, int offset)
20915bd8deadSopenharmony_ci      vec4 shadow2DProjLodOffset(sampler2DShadow sampler, vec4 coord,
20925bd8deadSopenharmony_ci                                 float lod, ivec2 offset)
20935bd8deadSopenharmony_ci
20945bd8deadSopenharmony_ci      vec4 texture2DRectOffset(sampler2DRect sampler, vec2 coord,
20955bd8deadSopenharmony_ci                               ivec2 offset)
20965bd8deadSopenharmony_ci      vec4 texture2DRectProjOffset(sampler2DRect sampler, vec3 coord,
20975bd8deadSopenharmony_ci                                   ivec2 offset)
20985bd8deadSopenharmony_ci      vec4 texture2DRectProjOffset(sampler2DRect sampler, vec4 coord,
20995bd8deadSopenharmony_ci                                   ivec2 offset)
21005bd8deadSopenharmony_ci      vec4 shadow2DRectOffset(sampler2DRectShadow sampler, vec3 coord,
21015bd8deadSopenharmony_ci                              ivec2 offset)
21025bd8deadSopenharmony_ci      vec4 shadow2DRectProjOffset(sampler2DRectShadow sampler, vec4 coord, 
21035bd8deadSopenharmony_ci                                  ivec2 offset)
21045bd8deadSopenharmony_ci
21055bd8deadSopenharmony_ci      vec4 texelFetch1DOffset(sampler1D sampler, int coord, int lod,
21065bd8deadSopenharmony_ci                              int offset)
21075bd8deadSopenharmony_ci      vec4 texelFetch2DOffset(sampler2D sampler, ivec2 coord, int lod, 
21085bd8deadSopenharmony_ci                              ivec2 offset)
21095bd8deadSopenharmony_ci      vec4 texelFetch3DOffset(sampler3D sampler, ivec3 coord, int lod, 
21105bd8deadSopenharmony_ci                              ivec3 offset)
21115bd8deadSopenharmony_ci      vec4 texelFetch2DRectOffset(sampler2DRect sampler, ivec2 coord, 
21125bd8deadSopenharmony_ci                                  ivec2 offset)
21135bd8deadSopenharmony_ci      vec4 texelFetch1DArrayOffset(sampler1DArray sampler, ivec2 coord, 
21145bd8deadSopenharmony_ci                                   int lod, int offset)
21155bd8deadSopenharmony_ci      vec4 texelFetch2DArrayOffset(sampler2DArray sampler, ivec3 coord, 
21165bd8deadSopenharmony_ci                                   int lod, ivec2 offset)
21175bd8deadSopenharmony_ci
21185bd8deadSopenharmony_ci      vec4 texture1DArrayOffset(sampler1DArray sampler, vec2 coord,
21195bd8deadSopenharmony_ci                                int offset [, float bias])
21205bd8deadSopenharmony_ci      vec4 texture1DArrayLodOffset(sampler1DArray sampler, vec2 coord,
21215bd8deadSopenharmony_ci                                   float lod, int offset)
21225bd8deadSopenharmony_ci
21235bd8deadSopenharmony_ci      vec4 texture2DArrayOffset(sampler2DArray sampler, vec3 coord,
21245bd8deadSopenharmony_ci                                ivec2 offset [, float bias])
21255bd8deadSopenharmony_ci      vec4 texture2DArrayLodOffset(sampler2DArray sampler, vec3 coord,
21265bd8deadSopenharmony_ci                                   float lod, ivec2 offset)
21275bd8deadSopenharmony_ci
21285bd8deadSopenharmony_ci      vec4 shadow1DArrayOffset(sampler1DArrayShadow sampler, vec3 coord,
21295bd8deadSopenharmony_ci                               int offset, [float bias])
21305bd8deadSopenharmony_ci      vec4 shadow1DArrayLodOffset(sampler1DArrayShadow sampler, vec3 coord,
21315bd8deadSopenharmony_ci                                  float lod, int offset)
21325bd8deadSopenharmony_ci
21335bd8deadSopenharmony_ci      vec4 shadow2DArrayOffset(sampler2DArrayShadow sampler,
21345bd8deadSopenharmony_ci                               vec4 coord, ivec2 offset)
21355bd8deadSopenharmony_ci
21365bd8deadSopenharmony_ci      vec4 texture1DGradOffset(sampler1D sampler, float coord,
21375bd8deadSopenharmony_ci                               float ddx, float ddy, int offset);
21385bd8deadSopenharmony_ci      vec4 texture1DProjGradOffset(sampler1D sampler, vec2 coord,
21395bd8deadSopenharmony_ci                                   float ddx, float ddy, int offset);
21405bd8deadSopenharmony_ci      vec4 texture1DProjGradOffset(sampler1D sampler, vec4 coord,
21415bd8deadSopenharmony_ci                                   float ddx, float ddy, int offset);
21425bd8deadSopenharmony_ci      vec4 texture1DArrayGradOffset(sampler1DArray sampler, vec2 coord,
21435bd8deadSopenharmony_ci                                    float ddx, float ddy, int offset);
21445bd8deadSopenharmony_ci
21455bd8deadSopenharmony_ci      vec4 texture2DGradOffset(sampler2D sampler, vec2 coord,
21465bd8deadSopenharmony_ci                               vec2 ddx, vec2 ddy, ivec2 offset);
21475bd8deadSopenharmony_ci      vec4 texture2DProjGradOffset(sampler2D sampler, vec3 coord,
21485bd8deadSopenharmony_ci                                   vec2 ddx, vec2 ddy, ivec2 offset);
21495bd8deadSopenharmony_ci      vec4 texture2DProjGradOffset(sampler2D sampler, vec4 coord,
21505bd8deadSopenharmony_ci                                   vec2 ddx, vec2 ddy, ivec2 offset);
21515bd8deadSopenharmony_ci      vec4 texture2DArrayGradOffset(sampler2DArray sampler, vec3 coord,
21525bd8deadSopenharmony_ci                                    vec2 ddx, vec2 ddy, ivec2 offset);
21535bd8deadSopenharmony_ci
21545bd8deadSopenharmony_ci      vec4 texture3DGradOffset(sampler3D sampler, vec3 coord,
21555bd8deadSopenharmony_ci                               vec3 ddx, vec3 ddy, ivec3 offset);
21565bd8deadSopenharmony_ci      vec4 texture3DProjGradOffset(sampler3D sampler, vec4 coord,
21575bd8deadSopenharmony_ci                                   vec3 ddx, vec3 ddy, ivec3 offset);
21585bd8deadSopenharmony_ci
21595bd8deadSopenharmony_ci      vec4 shadow1DGradOffset(sampler1DShadow sampler, vec3 coord,
21605bd8deadSopenharmony_ci                              float ddx, float ddy, int offset);
21615bd8deadSopenharmony_ci      vec4 shadow1DProjGradOffset(sampler1DShadow sampler,
21625bd8deadSopenharmony_ci                                  vec4 coord, float ddx, float ddy,
21635bd8deadSopenharmony_ci                                  int offset);
21645bd8deadSopenharmony_ci      vec4 shadow1DArrayGradOffset(sampler1DArrayShadow sampler,
21655bd8deadSopenharmony_ci                                   vec3 coord, float ddx, float ddy,
21665bd8deadSopenharmony_ci                                   int offset);
21675bd8deadSopenharmony_ci
21685bd8deadSopenharmony_ci      vec4 shadow2DGradOffset(sampler2DShadow sampler, vec3 coord,
21695bd8deadSopenharmony_ci                              vec2 ddx, vec2 ddy, ivec2 offset);
21705bd8deadSopenharmony_ci      vec4 shadow2DProjGradOffset(sampler2DShadow sampler, vec4 coord, 
21715bd8deadSopenharmony_ci                                  vec2 ddx, vec2 ddy, ivec2 offset);
21725bd8deadSopenharmony_ci      vec4 shadow2DArrayGradOffset(sampler2DArrayShadow sampler, 
21735bd8deadSopenharmony_ci                                   vec4 coord, vec2 ddx, vec2 ddy, 
21745bd8deadSopenharmony_ci                                   ivec2 offset);
21755bd8deadSopenharmony_ci
21765bd8deadSopenharmony_ci      vec4 texture2DRectGradOffset(sampler2DRect sampler, vec2 coord,
21775bd8deadSopenharmony_ci                                   vec2 ddx, vec2 ddy, ivec2 offset);
21785bd8deadSopenharmony_ci      vec4 texture2DRectProjGradOffset(sampler2DRect sampler, vec3 coord, 
21795bd8deadSopenharmony_ci                                       vec2 ddx, vec2 ddy, ivec2 offset);
21805bd8deadSopenharmony_ci      vec4 texture2DRectProjGradOffset(sampler2DRect sampler, vec4 coord,
21815bd8deadSopenharmony_ci                                       vec2 ddx, vec2 ddy, ivec2 offset);
21825bd8deadSopenharmony_ci
21835bd8deadSopenharmony_ci      vec4 shadow2DRectGradOffset(sampler2DRectShadow sampler, 
21845bd8deadSopenharmony_ci                                  vec3 coord, vec2 ddx, vec2 ddy, 
21855bd8deadSopenharmony_ci                                  ivec2 offset);
21865bd8deadSopenharmony_ci      vec4 shadow2DRectProjGradOffset(sampler2DRectShadow sampler, 
21875bd8deadSopenharmony_ci                                      vec4 coord, vec2 ddx, vec2 ddy, 
21885bd8deadSopenharmony_ci                                      ivec2 offset);
21895bd8deadSopenharmony_ci
21905bd8deadSopenharmony_ci    Description:
21915bd8deadSopenharmony_ci
21925bd8deadSopenharmony_ci    The "offset" version of each function provides an extra parameter <offset>
21935bd8deadSopenharmony_ci    which is added to the (u,v,w) texel coordinates before looking up each
21945bd8deadSopenharmony_ci    texel. The offset value must be a constant expression.  A limited range
21955bd8deadSopenharmony_ci    of offset values are supported; the minimum and maximum offset values are
21965bd8deadSopenharmony_ci    implementation-dependent and given by MIN_PROGRAM_TEXEL_OFFSET_EXT and
21975bd8deadSopenharmony_ci    MAX_PROGRAM_TEXEL_OFFSET_EXT, respectively. Note that <offset> does not
21985bd8deadSopenharmony_ci    apply to the layer coordinate for texture arrays. This is explained in
21995bd8deadSopenharmony_ci    detail in section 3.8.7 of the OpenGL Specification. Note that texel
22005bd8deadSopenharmony_ci    offsets are also not supported for cubemaps or buffer textures.
22015bd8deadSopenharmony_ci
22025bd8deadSopenharmony_ci    Add to section 9 "Grammar"
22035bd8deadSopenharmony_ci
22045bd8deadSopenharmony_ci      type_qualifer:
22055bd8deadSopenharmony_ci          CONST
22065bd8deadSopenharmony_ci          ATTRIBUTE  // Vertex only
22075bd8deadSopenharmony_ci          varying-modifier_opt VARYING
22085bd8deadSopenharmony_ci          UNIFORM
22095bd8deadSopenharmony_ci
22105bd8deadSopenharmony_ci      varying-modifier:
22115bd8deadSopenharmony_ci          FLAT
22125bd8deadSopenharmony_ci          CENTROID
22135bd8deadSopenharmony_ci          NOPERSPECTIVE
22145bd8deadSopenharmony_ci
22155bd8deadSopenharmony_ci      type_specifier:
22165bd8deadSopenharmony_ci          VOID
22175bd8deadSopenharmony_ci          FLOAT
22185bd8deadSopenharmony_ci          INT
22195bd8deadSopenharmony_ci          UNSIGNED_INT
22205bd8deadSopenharmony_ci          BOOL
22215bd8deadSopenharmony_ci
22225bd8deadSopenharmony_ciIssues
22235bd8deadSopenharmony_ci
22245bd8deadSopenharmony_ci    1. Should we support shorts in GLSL?
22255bd8deadSopenharmony_ci
22265bd8deadSopenharmony_ci     DISCUSSION:
22275bd8deadSopenharmony_ci
22285bd8deadSopenharmony_ci     RESOLUTION: UNRESOLVED
22295bd8deadSopenharmony_ci
22305bd8deadSopenharmony_ci    2. Do bitwise shifts, AND, exclusive OR and inclusive OR support all
22315bd8deadSopenharmony_ci       combinations of scalars and vectors for each operand?
22325bd8deadSopenharmony_ci
22335bd8deadSopenharmony_ci     DISCUSSION: It seems sense to support scalar OP scalar, vector OP scalar
22345bd8deadSopenharmony_ci     and vector OP vector. But what about scalar OP vector?  Should the scalar
22355bd8deadSopenharmony_ci     be promoted to a vector first?
22365bd8deadSopenharmony_ci
22375bd8deadSopenharmony_ci     RESOLUTION: RESOLVED. Yes, this should work essentially as the '+'
22385bd8deadSopenharmony_ci     operator. The scalar is applied to each component of the vector.
22395bd8deadSopenharmony_ci
22405bd8deadSopenharmony_ci   3. Which built-in functions should also operate on integers?
22415bd8deadSopenharmony_ci
22425bd8deadSopenharmony_ci     DISCUSSION: There are several that don't make sense to define to operate
22435bd8deadSopenharmony_ci     on integers at all, but the following can be debated: pow, sqrt, dot (and
22445bd8deadSopenharmony_ci     the functions that use dot), cross.
22455bd8deadSopenharmony_ci
22465bd8deadSopenharmony_ci     RESOLUTION: RESOLVED. Integer versions of the abs, sign, min, max and
22475bd8deadSopenharmony_ci     clamp functions are defined. Note that the modulus operator % has been
22485bd8deadSopenharmony_ci     defined for integer operands.
22495bd8deadSopenharmony_ci
22505bd8deadSopenharmony_ci   4. Do we need to support integer matrices?
22515bd8deadSopenharmony_ci
22525bd8deadSopenharmony_ci     DISCUSSION:
22535bd8deadSopenharmony_ci
22545bd8deadSopenharmony_ci     RESOLUTION: RESOLVED No, not at the moment.
22555bd8deadSopenharmony_ci
22565bd8deadSopenharmony_ci   5. Which texture array lookup functions do we need to support?
22575bd8deadSopenharmony_ci
22585bd8deadSopenharmony_ci     DISCUSSION: We don't want to support lookup functions that need more than
22595bd8deadSopenharmony_ci     four components passed as parameters. Components can be used for texture
22605bd8deadSopenharmony_ci     coordinates, layer selection, 'R' depth compare and the 'q' coordinate
22615bd8deadSopenharmony_ci     for projection. However, texture projection might be relatively easy to
22625bd8deadSopenharmony_ci     support through code-generation, thus we might be able to support
22635bd8deadSopenharmony_ci     functions that need five components, as long as one of them is 'q' for
22645bd8deadSopenharmony_ci     projective texturing.  Specifically, should we support:
22655bd8deadSopenharmony_ci
22665bd8deadSopenharmony_ci       vec4 texture2DArrayProjLod(sampler2DArray sampler, vec4 coord,
22675bd8deadSopenharmony_ci                                  float lod)
22685bd8deadSopenharmony_ci       vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord,
22695bd8deadSopenharmony_ci                        [float bias])
22705bd8deadSopenharmony_ci       vec4 shadow1DArrayProj(sampler1DArrayShadow sampler, vec4 coord,
22715bd8deadSopenharmony_ci                              [float bias])
22725bd8deadSopenharmony_ci       vec4 shadow1DArrayLod(sampler1DArrayShadow sampler, vec3 coord,
22735bd8deadSopenharmony_ci                             float lod)
22745bd8deadSopenharmony_ci       vec4 shadow1DArrayProjLod(sampler1DArrayShadow sampler,
22755bd8deadSopenharmony_ci                                 vec4 coord, float lod)
22765bd8deadSopenharmony_ci       vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord)
22775bd8deadSopenharmony_ci       vec4 shadow2DArrayProj(sampler2DArrayShadow sampler, vec4 coord,
22785bd8deadSopenharmony_ci                              float refValue)
22795bd8deadSopenharmony_ci
22805bd8deadSopenharmony_ci      RESOLUTION: RESOLVED, We'll support all but the "Proj" versions.  The
22815bd8deadSopenharmony_ci      assembly spec (NV_gpu_program4) doesn't support the equivalent
22825bd8deadSopenharmony_ci      functionality, either.
22835bd8deadSopenharmony_ci
22845bd8deadSopenharmony_ci    6. How do we handle conversions between integer and unsigned
22855bd8deadSopenharmony_ci    integers?
22865bd8deadSopenharmony_ci
22875bd8deadSopenharmony_ci      DISCUSSION: Do we allow automatic type conversions between signed and
22885bd8deadSopenharmony_ci      unsigned integers?
22895bd8deadSopenharmony_ci
22905bd8deadSopenharmony_ci      RESOLUTION: RESOLVED. We will not add this until GLSL version 1.20 has
22915bd8deadSopenharmony_ci      been defined, and the implicit conversion rules have been established
22925bd8deadSopenharmony_ci      there. If we do this, we would likely only support implicit conversion
22935bd8deadSopenharmony_ci      from int to unsigned int, just like C does.
22945bd8deadSopenharmony_ci
22955bd8deadSopenharmony_ci    7. Should varying modifiers (flat, noperspective) apply to built-in
22965bd8deadSopenharmony_ci       varying variables also?
22975bd8deadSopenharmony_ci
22985bd8deadSopenharmony_ci      DISCUSSION: There is API to control flat vs smooth shading for colors
22995bd8deadSopenharmony_ci      through glShadeModel(). There is also API to hint if colors should be
23005bd8deadSopenharmony_ci      interpolated perspective correct, or not, through glHint(). These API
23015bd8deadSopenharmony_ci      commands apply to the built-in color varying variables (gl_FrontColor
23025bd8deadSopenharmony_ci      etc). If the varying modifiers in a shader also apply to the color
23035bd8deadSopenharmony_ci      built-ins, which has precedence?
23045bd8deadSopenharmony_ci
23055bd8deadSopenharmony_ci      RESOLUTION: RESOLVED. It is simplest and cleanest to only allow the
23065bd8deadSopenharmony_ci      varying modifiers to apply to user-defined varying variables.  The
23075bd8deadSopenharmony_ci      behavior of the built-in color varying variables can still be controlled
23085bd8deadSopenharmony_ci      through the API.
23095bd8deadSopenharmony_ci
23105bd8deadSopenharmony_ci    8. How should perspective-incorrect interpolation (linear in screen space)
23115bd8deadSopenharmony_ci       and clipping interact?
23125bd8deadSopenharmony_ci
23135bd8deadSopenharmony_ci      RESOLVED:  Primitives with attributes specified to be perspective-
23145bd8deadSopenharmony_ci      incorrect should be clipped so that the vertices introduced by clipping
23155bd8deadSopenharmony_ci      should have attribute values consistent with the interpolation mode.  We
23165bd8deadSopenharmony_ci      do not want to have large color shifts introduced by clipping a
23175bd8deadSopenharmony_ci      perspective-incorrect attribute.  For example, a primitive that
23185bd8deadSopenharmony_ci      approaches, but doesn't cross, a frustum clip plane should look pretty
23195bd8deadSopenharmony_ci      much identical to a similar primitive that just barely crosses the clip
23205bd8deadSopenharmony_ci      plane.
23215bd8deadSopenharmony_ci
23225bd8deadSopenharmony_ci      Clipping perspective-incorrect interpolants that cross the W==0 plane is
23235bd8deadSopenharmony_ci      very challenging.  The attribute clipping equation provided in the spec
23245bd8deadSopenharmony_ci      effectively projects all the original vertices to screen space while
23255bd8deadSopenharmony_ci      ignoring the X and Y frustum clip plane.  As W approaches zero, the
23265bd8deadSopenharmony_ci      projected X/Y window coordinates become extremely large.  When clipping
23275bd8deadSopenharmony_ci      an edge with one vertex inside the frustum and the other out near
23285bd8deadSopenharmony_ci      infinity (after projection, due to W approaching zero), the interpolated
23295bd8deadSopenharmony_ci      attribute for the entire visible portion of the edge should almost
23305bd8deadSopenharmony_ci      exactly match the attribute value of the visible vertex.
23315bd8deadSopenharmony_ci
23325bd8deadSopenharmony_ci      If an outlying vertex approaches and then goes past W==0, it can be said
23335bd8deadSopenharmony_ci      to go "to infinity and beyond" in screen space.  The correct answer for
23345bd8deadSopenharmony_ci      screen-linear interpolation is no longer obvious, at least to the author
23355bd8deadSopenharmony_ci      of this specification.  Rather than trying to figure out what the
23365bd8deadSopenharmony_ci      "right" answer is or if one even exists, the results of clipping such
23375bd8deadSopenharmony_ci      edges is specified as undefined.
23385bd8deadSopenharmony_ci
23395bd8deadSopenharmony_ci    9. Do we need to support a non-MRT fragment shader writing to (unsigned)
23405bd8deadSopenharmony_ci       integer outputs?
23415bd8deadSopenharmony_ci
23425bd8deadSopenharmony_ci      DISCUSSION: Fragment shaders with only one fragment output are
23435bd8deadSopenharmony_ci      considered non-MRT shaders. This means that the output of the shader
23445bd8deadSopenharmony_ci      gets smeared across all color buffers attached to the
23455bd8deadSopenharmony_ci      framebuffer. Fragment shaders with multiple fragment outputs are MRT
23465bd8deadSopenharmony_ci      shaders. Each output is directed to a color buffer using the DrawBuffers
23475bd8deadSopenharmony_ci      API (for gl_FragData) and a combination of the BindFragDataLocationEXT
23485bd8deadSopenharmony_ci      and DrawBuffers API (for varying out variables). Before this extension,
23495bd8deadSopenharmony_ci      a non-MRT shader would write to gl_Color only. A shader writing to
23505bd8deadSopenharmony_ci      gl_FragData[] is a MRT shader.  With the addition of varying out
23515bd8deadSopenharmony_ci      variables in this extension, any shader writing to a variable out
23525bd8deadSopenharmony_ci      variable is a MRT shader. It is not possible to construct a non-MRT
23535bd8deadSopenharmony_ci      shader writing to varying out variables. Varying out variables can be
23545bd8deadSopenharmony_ci      declared to be of type integer or unsigned integer. In order to support
23555bd8deadSopenharmony_ci      a non-MRT shader that can write to (unsigned) integer outputs, we could
23565bd8deadSopenharmony_ci      define two new built-in variables:
23575bd8deadSopenharmony_ci
23585bd8deadSopenharmony_ci        ivec4 gl_FragColorInt;
23595bd8deadSopenharmony_ci        uvec4 gl_FragColorUInt;
23605bd8deadSopenharmony_ci
23615bd8deadSopenharmony_ci      Or we could add a special rule stating that if the program object writes
23625bd8deadSopenharmony_ci      to exactly one varying out variable, it is considered to be non-MRT.
23635bd8deadSopenharmony_ci
23645bd8deadSopenharmony_ci      RESOLUTION: NO. We don't care enough to support this.
23655bd8deadSopenharmony_ci
23665bd8deadSopenharmony_ci   10. Is section 2.14.8, "Color and Associated Data Clipping" in the core
23675bd8deadSopenharmony_ci       specification still correct?
23685bd8deadSopenharmony_ci
23695bd8deadSopenharmony_ci      DISCUSSION: This section is in need of some updating, now that varying
23705bd8deadSopenharmony_ci      variables can be interpolated without perspective correction. Some (not
23715bd8deadSopenharmony_ci      so precise) language has been added in the spec body, suggesting that
23725bd8deadSopenharmony_ci      the interpolation needs to be performed in such a way as to produce
23735bd8deadSopenharmony_ci      results that vary linearly in screen space. However, we could define the
23745bd8deadSopenharmony_ci      exact interpolation method required to achieve this. A suggested updated
23755bd8deadSopenharmony_ci      paragraph follows, but we'll leave updating section 2.14.8 to a future
23765bd8deadSopenharmony_ci      edit of the core specification, not this extension.
23775bd8deadSopenharmony_ci
23785bd8deadSopenharmony_ci      Replace Section 2.14.8, and rename it to "Vertex Attribute Clipping"
23795bd8deadSopenharmony_ci
23805bd8deadSopenharmony_ci      After lighting, clamping or masking and possible flatshading, vertex
23815bd8deadSopenharmony_ci      attributes, including colors, texture and fog coordinates, shader
23825bd8deadSopenharmony_ci      varying variables, and point sizes computed on a per vertex basis, are
23835bd8deadSopenharmony_ci      clipped. Those attributes associated with a vertex that lies within the
23845bd8deadSopenharmony_ci      clip volume are unaffected by clipping.  If a primitive is clipped,
23855bd8deadSopenharmony_ci      however, the attributes assigned to vertices produced by clipping are
23865bd8deadSopenharmony_ci      produced by interpolating attributes along the clipped edge.
23875bd8deadSopenharmony_ci
23885bd8deadSopenharmony_ci      Let the attributes assigned to the two vertices P_1 and P_2 of an
23895bd8deadSopenharmony_ci      unclipped edge be a_1 and a_2.  The value of t (section 2.12) for a
23905bd8deadSopenharmony_ci      clipped point P is used to obtain the attribute associated with P as
23915bd8deadSopenharmony_ci
23925bd8deadSopenharmony_ci          a = t * a_1 + (1-t) * a_2
23935bd8deadSopenharmony_ci
23945bd8deadSopenharmony_ci      unless the attribute is specified to be interpolated without perspective
23955bd8deadSopenharmony_ci      correction in a shader (using the noperspective keyword).  In that case,
23965bd8deadSopenharmony_ci      the attribute associated with P is
23975bd8deadSopenharmony_ci
23985bd8deadSopenharmony_ci          a = t' * a_1 + (1-t') * a_2
23995bd8deadSopenharmony_ci
24005bd8deadSopenharmony_ci      where
24015bd8deadSopenharmony_ci
24025bd8deadSopenharmony_ci          t' = (t * w_1) / (t * w_1 + (1-t) * w_2)
24035bd8deadSopenharmony_ci
24045bd8deadSopenharmony_ci      and w_1 and w_2 are the w clip coordinates of P_1 and P_2,
24055bd8deadSopenharmony_ci      respectively. If w_1 or w_2 is either zero or negative, the value of the
24065bd8deadSopenharmony_ci      associated attribute is undefined.
24075bd8deadSopenharmony_ci
24085bd8deadSopenharmony_ci      For a color index color, multiplying a color by a scalar means
24095bd8deadSopenharmony_ci      multiplying the index by the scalar. For a vector attribute, it means
24105bd8deadSopenharmony_ci      multiplying each vector component by the scalar. Polygon clipping may
24115bd8deadSopenharmony_ci      create a clipped vertex along an edge of the clip volume's
24125bd8deadSopenharmony_ci      boundary. This situation is handled by noting that polygon clipping
24135bd8deadSopenharmony_ci      proceeds by clipping against one plane of the clip volume's boundary at
24145bd8deadSopenharmony_ci      a time. Attribute clipping is done in the same way, so that clipped
24155bd8deadSopenharmony_ci      points always occur at the intersection of polygon edges (possibly
24165bd8deadSopenharmony_ci      already clipped) with the clip volume's boundary.
24175bd8deadSopenharmony_ci
24185bd8deadSopenharmony_ci  11. When and where in the texture filtering process are texel offsets
24195bd8deadSopenharmony_ci      applied?
24205bd8deadSopenharmony_ci
24215bd8deadSopenharmony_ci      DISCUSSION: Texel offsets are applied to the (u,v,w) coordinates of the
24225bd8deadSopenharmony_ci      base level of the texture if the texture filter mode does not indicate
24235bd8deadSopenharmony_ci      mipmapping. Otherwise, texel offsets are applied to the (u,v,w)
24245bd8deadSopenharmony_ci      coordinates of the mipmap level 'd', as found by equation 3.27 or to
24255bd8deadSopenharmony_ci      mipmap levels 'd1' and 'd2' as found by equation 3.28 in the OpenGL 2.0
24265bd8deadSopenharmony_ci      specification.  In other words, texel offsets are applied to the
24275bd8deadSopenharmony_ci      (u,v,w) coordinate of whatever mipmap level is accessed.
24285bd8deadSopenharmony_ci
24295bd8deadSopenharmony_ci  12. Why is writing to the built-in output variable "gl_Position" in a vertex
24305bd8deadSopenharmony_ci      shader now optional?
24315bd8deadSopenharmony_ci
24325bd8deadSopenharmony_ci      DISCUSSION: Before this specification, writing to gl_Position in a
24335bd8deadSopenharmony_ci      vertex shader was mandatory. The GL pipeline required a vertex position
24345bd8deadSopenharmony_ci      to be written in order to produce well-defined output. This is still the
24355bd8deadSopenharmony_ci      case if the GL pipeline indeed needs a vertex position. However, with
24365bd8deadSopenharmony_ci      fourth-generation programmable hardware there are now cases where the GL
24375bd8deadSopenharmony_ci      pipeline no longer requires a vertex position in order to produce
24385bd8deadSopenharmony_ci      well-defined results. If a geometry shader is present, the vertex shader
24395bd8deadSopenharmony_ci      does not need to write to gl_Position anymore. Instead, the geometry
24405bd8deadSopenharmony_ci      shader can compute a vertex position and write to its gl_Position
24415bd8deadSopenharmony_ci      output. In case of transform-feedback, where the output of a vertex or
24425bd8deadSopenharmony_ci      geometry shader is streamed to one or more buffer objects, perfectly
24435bd8deadSopenharmony_ci      valid results can be obtained without either the vertex shader nor
24445bd8deadSopenharmony_ci      geometry shader writing to gl_Position. The transform-feedback
24455bd8deadSopenharmony_ci      specification adds a new enable to discard primitives right before
24465bd8deadSopenharmony_ci      rasterization, making it potentially unnecessary to write to
24475bd8deadSopenharmony_ci      gl_Position.
24485bd8deadSopenharmony_ci
24495bd8deadSopenharmony_ci  13. How does this extension interact with ARB_shader_texture_lod?
24505bd8deadSopenharmony_ci
24515bd8deadSopenharmony_ci      DISCUSSION:  This extension adds "Grad" functions which are functionally
24525bd8deadSopenharmony_ci      equivalent to those defined by ARB_shader_texture_lod, but do not have
24535bd8deadSopenharmony_ci      an ARB suffix.
24545bd8deadSopenharmony_ci      
24555bd8deadSopenharmony_ci      RESOLUTION: There is no interaction. If both extensions are supported,
24565bd8deadSopenharmony_ci      both sets of functions are available and can be controlled independently
24575bd8deadSopenharmony_ci      via the #extension mechanism.
24585bd8deadSopenharmony_ci
24595bd8deadSopenharmony_ci
24605bd8deadSopenharmony_ciRevision History
24615bd8deadSopenharmony_ci
24625bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
24635bd8deadSopenharmony_ci    ----  --------  --------  -----------------------------------------
24645bd8deadSopenharmony_ci     16   12/14/09  mgodse    Added GLX protocol.
24655bd8deadSopenharmony_ci
24665bd8deadSopenharmony_ci     15   04/09/09  pbrown    Fixed a typo in the texture size query spec
24675bd8deadSopenharmony_ci                              language - returns a layer count, not "index".
24685bd8deadSopenharmony_ci
24695bd8deadSopenharmony_ci     14   07/29/08  pbrown    Discovered additional issues with texture wrap 
24705bd8deadSopenharmony_ci                              handling, replaced with logic that applies wrap
24715bd8deadSopenharmony_ci                              modes per sample.
24725bd8deadSopenharmony_ci
24735bd8deadSopenharmony_ci     13   04/04/08  pbrown    Added issue 13, concerning the (non-)interaction
24745bd8deadSopenharmony_ci                              with ARB_shader_texture_lod.
24755bd8deadSopenharmony_ci
24765bd8deadSopenharmony_ci     12   02/04/08  pbrown    Fix errors in texture wrap mode handling.
24775bd8deadSopenharmony_ci                              Added a missing clamp to avoid sampling border
24785bd8deadSopenharmony_ci                              in REPEAT mode.  Fixed incorrectly specified
24795bd8deadSopenharmony_ci                              weights for LINEAR filtering.
24805bd8deadSopenharmony_ci
24815bd8deadSopenharmony_ci     11   05/08/07  pbrown    Add VertexAttribIPointerEXT to the list of
24825bd8deadSopenharmony_ci                              commands that can't go in display lists.
24835bd8deadSopenharmony_ci
24845bd8deadSopenharmony_ci     10   01/23/07  pbrown    Fix prototypes for a variety of functions 
24855bd8deadSopenharmony_ci                              that were specified with an incorrect sampler
24865bd8deadSopenharmony_ci                              type.
24875bd8deadSopenharmony_ci
24885bd8deadSopenharmony_ci      9   12/15/06  pbrown    Documented that the '#extension' token
24895bd8deadSopenharmony_ci                              for this extension should begin with "GL_",
24905bd8deadSopenharmony_ci                              as apparently called for per convention.
24915bd8deadSopenharmony_ci
24925bd8deadSopenharmony_ci      8      --               Pre-release revisions.
24935bd8deadSopenharmony_ci
2494