15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    OES_gpu_shader5
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_OES_gpu_shader5
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Jon Leech (oddhack 'at' sonic.net)
125bd8deadSopenharmony_ci    Daniel Koch, NVIDIA (dkoch 'at' nvidia.com)
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciContributors
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    Daniel Koch, NVIDIA (dkoch 'at' nvidia.com)
175bd8deadSopenharmony_ci    Pat Brown, NVIDIA (pbrown 'at' nvidia.com)
185bd8deadSopenharmony_ci    Jesse Hall, Google
195bd8deadSopenharmony_ci    Maurice Ribble, Qualcomm
205bd8deadSopenharmony_ci    Bill Licea-Kane, Qualcomm
215bd8deadSopenharmony_ci    Graham Connor, Imagination
225bd8deadSopenharmony_ci    Ben Bowman, Imagination
235bd8deadSopenharmony_ci    Jonathan Putsman, Imagination
245bd8deadSopenharmony_ci    Marcin Kantoch, Mobica
255bd8deadSopenharmony_ci    Slawomir Grajewski, Intel
265bd8deadSopenharmony_ci    Contributors to ARB_gpu_shader5
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ciNotice
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at
315bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciSpecification Update Policy
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
365bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL ES Working Group. For
375bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
385bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
395bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
405bd8deadSopenharmony_ci    described in more detail at
415bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    Portions Copyright (c) 2013-2014 NVIDIA Corporation.
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ciStatus
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    Approved by the OpenGL ES Working Group
485bd8deadSopenharmony_ci    Ratified by the Khronos Board of Promoters on November 7, 2014
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ciVersion
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ci    Last Modified Date: March 27, 2015
535bd8deadSopenharmony_ci    Revision: 2
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ciNumber
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    OpenGL ES Extension #211
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ciDependencies
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    OpenGL ES 3.1 and OpenGL ES Shading Language 3.10 are required.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    This specification is written against the OpenGL ES 3.1 (March 17,
645bd8deadSopenharmony_ci    2014) and OpenGL ES 3.10 Shading Language (March 17, 2014)
655bd8deadSopenharmony_ci    Specifications.
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    This extension interacts with OES_geometry_shader.
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ciOverview
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    This extension provides a set of new features to the OpenGL ES Shading
725bd8deadSopenharmony_ci    Language and related APIs to support capabilities of new GPUs, extending
735bd8deadSopenharmony_ci    the capabilities of version 3.10 of the OpenGL ES Shading Language.
745bd8deadSopenharmony_ci    Shaders using the new functionality provided by this extension should
755bd8deadSopenharmony_ci    enable this functionality via the construct
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci      #extension GL_OES_gpu_shader5 : require     (or enable)
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    This extension provides a variety of new features for all shader types,
805bd8deadSopenharmony_ci    including:
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci      * support for indexing into arrays of opaque types (samplers,
835bd8deadSopenharmony_ci        and atomic counters) using dynamically uniform integer expressions;
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci      * support for indexing into arrays of images and shader storage blocks
865bd8deadSopenharmony_ci        using only constant integral expressions;
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci      * extending the uniform block capability to allow shaders to index
895bd8deadSopenharmony_ci        into an array of uniform blocks;
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci      * a "precise" qualifier allowing computations to be carried out exactly
925bd8deadSopenharmony_ci        as specified in the shader source to avoid optimization-induced
935bd8deadSopenharmony_ci        invariance issues (which might cause cracking in tessellation);
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ci      * new built-in functions supporting:
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci        * fused floating-point multiply-add operations;
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci      * extending the textureGather() built-in functions provided by
1005bd8deadSopenharmony_ci        OpenGL ES Shading Language 3.10:
1015bd8deadSopenharmony_ci
1025bd8deadSopenharmony_ci        * allowing shaders to use arbitrary offsets computed at run-time to
1035bd8deadSopenharmony_ci          select a 2x2 footprint to gather from; and
1045bd8deadSopenharmony_ci        * allowing shaders to use separate independent offsets for each of
1055bd8deadSopenharmony_ci          the four texels returned, instead of requiring a fixed 2x2
1065bd8deadSopenharmony_ci          footprint.
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ciNew Procedures and Functions
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    None
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ciNew Tokens
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci    None
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ciAdditions to the OpenGL ES 3.1 Specification
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    Add to the end of section 8.13.2, "Coordinate Wrapping and Texel
1195bd8deadSopenharmony_ci    Selection":
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    ... texture source color of (0,0,0,1) for all four source texels.
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci    The textureGatherOffsets built-in shader functions return a vector
1245bd8deadSopenharmony_ci    derived from sampling four texels in the image array of level
1255bd8deadSopenharmony_ci    <level_base>. For each of the four texel offsets specified by the
1265bd8deadSopenharmony_ci    <offsets> argument, the rules for the LINEAR minification filter are
1275bd8deadSopenharmony_ci    applied to identify a 2x2 texel footprint, from which the single texel
1285bd8deadSopenharmony_ci    T_i0_j0 is selected. A four-component vector is then assembled by taking
1295bd8deadSopenharmony_ci    a single component from each of the four T_i0_j0 texels in the same
1305bd8deadSopenharmony_ci    manner as for the textureGather function.
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ciAdditions to the OpenGL ES Shading Language 3.10 Specification
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
1365bd8deadSopenharmony_ci    language features described in this extension:
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci      #extension GL_OES_gpu_shader5 : <behavior>
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.4.
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    A new preprocessor #define is added to the OpenGL ES Shading Language:
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci      #define GL_OES_gpu_shader5        1
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci    Modifications to Section 3.7 (Keywords)
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    Remove "precise" from the list of reserved keywords and add it to the
1505bd8deadSopenharmony_ci    list of keywords.
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci    Remove the last paragraph from section 3.9.3 "Dynamically Uniform
1535bd8deadSopenharmony_ci    Expressions" (starting "The definition is not used in this version...")
1545bd8deadSopenharmony_ci
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci    Add to the introduction to section 4.1.7, "Opaque Types" on p. 26:
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    When aggregated into arrays within a shader, opaque types can only be
1595bd8deadSopenharmony_ci    indexed with a dynamically uniform integral expression (see section
1605bd8deadSopenharmony_ci    3.9.3) unless otherwise noted; otherwise, results are undefined.
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    Replace the first paragraph of section 4.1.7.1, "Samplers" (removing the
1645bd8deadSopenharmony_ci    second sentence) on p. 27:
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ci    Sampler types (e.g., sampler2D) are opaque types, declared and behaving
1675bd8deadSopenharmony_ci    as described above for opaque types.
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    Sampler variables are ...
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci    Modify Section 4.3.9 "Interface Blocks", as modified by
1745bd8deadSopenharmony_ci    OES_geometry_shader and OES_shader_io_blocks:
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci    (modify the paragraph starting "For uniform or shader storage blocks
1775bd8deadSopenharmony_ci    declared as an array", removing the requirement for indexing uniform
1785bd8deadSopenharmony_ci    blocks using constant expressions)
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ci    For uniform or shader storage blocks declared as an array, each
1815bd8deadSopenharmony_ci    individual array element corresponds to a separate buffer object bind
1825bd8deadSopenharmony_ci    range, backing one instance of the block. As the array size indicates
1835bd8deadSopenharmony_ci    the number of buffer objects needed, uniform and shader storage block
1845bd8deadSopenharmony_ci    array declarations must specify an array size. All indices used to index
1855bd8deadSopenharmony_ci    a shader storage block array must be constant integral expressions. A
1865bd8deadSopenharmony_ci    uniform block array can only be indexed with a dynamically uniform
1875bd8deadSopenharmony_ci    integral expression, otherwise results are undefined.
1885bd8deadSopenharmony_ci
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    Add new section 4.9gs5 before section 4.10 "Order of Qualification":
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci    4.9gs5 The Precise Qualifier
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ci    Some algorithms may require that floating-point computations be carried
1955bd8deadSopenharmony_ci    out in exactly the manner specified in the source code, even if the
1965bd8deadSopenharmony_ci    implementation supports optimizations that could produce nearly
1975bd8deadSopenharmony_ci    equivalent results with higher performance. For example, many GL
1985bd8deadSopenharmony_ci    implementations support a "multiply-add" that can compute values such as
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci      float result = (float(a) * float(b)) + float(c);
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci    in a single operation. The result of a floating-point multiply-add may
2035bd8deadSopenharmony_ci    not always be identical to first doing a multiply yielding a
2045bd8deadSopenharmony_ci    floating-point result, and then doing a floating-point add. By default,
2055bd8deadSopenharmony_ci    implementations are permitted to perform optimizations that effectively
2065bd8deadSopenharmony_ci    modify the order of the operations used to evaluate an expression, even
2075bd8deadSopenharmony_ci    if those optimizations may produce slightly different results relative
2085bd8deadSopenharmony_ci    to unoptimized code.
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ci    The qualifier "precise" will ensure that operations contributing to a
2115bd8deadSopenharmony_ci    variable's value are performed in the order and with the precision
2125bd8deadSopenharmony_ci    specified in the source code. Order of evaluation is determined by
2135bd8deadSopenharmony_ci    operator precedence and parentheses, as described in Section &5.
2145bd8deadSopenharmony_ci    Expressions must be evaluated with a precision consistent with the
2155bd8deadSopenharmony_ci    operation; for example, multiplying two "float" values must produce a
2165bd8deadSopenharmony_ci    single value with "float" precision. This effectively prohibits the
2175bd8deadSopenharmony_ci    arbitrary use of fused multiply-add operations if the intermediate
2185bd8deadSopenharmony_ci    multiply result is kept at a higher precision. For example:
2195bd8deadSopenharmony_ci
2205bd8deadSopenharmony_ci      precise out vec4 position;
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci    declares that computations used to produce the value of "position" must
2235bd8deadSopenharmony_ci    be performed precisely using the order and precision specified. As with
2245bd8deadSopenharmony_ci    the invariant qualifier (section &4.6.1), the precise qualifier may be
2255bd8deadSopenharmony_ci    used to qualify a built-in or previously declared user-defined variable
2265bd8deadSopenharmony_ci    as being precise:
2275bd8deadSopenharmony_ci
2285bd8deadSopenharmony_ci      out vec3 Color;
2295bd8deadSopenharmony_ci      precise Color;            // make existing Color be precise
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci    This qualifier will affect the evaluation of expressions used on the
2325bd8deadSopenharmony_ci    right-hand side of an assignment if and only if:
2335bd8deadSopenharmony_ci
2345bd8deadSopenharmony_ci      * the variable assigned to is qualified as "precise"; or
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci      * the value assigned is used later in the same function, either
2375bd8deadSopenharmony_ci        directly or indirectly, on the right-hand of an assignment to a
2385bd8deadSopenharmony_ci        variable declared as "precise".
2395bd8deadSopenharmony_ci
2405bd8deadSopenharmony_ci    Expressions computed in a function are treated as precise only if
2415bd8deadSopenharmony_ci    assigned to a variable qualified as "precise" in that same function. Any
2425bd8deadSopenharmony_ci    other expressions within a function are not automatically treated as
2435bd8deadSopenharmony_ci    precise, even if they are used to determine a value that is returned by
2445bd8deadSopenharmony_ci    the function and directly assigned to a variable qualified as "precise".
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci    Some examples of the use of "precise" include:
2475bd8deadSopenharmony_ci
2485bd8deadSopenharmony_ci      in vec4 a, b, c, d;
2495bd8deadSopenharmony_ci      precise out vec4 v;
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci      float func(float e, float f, float g, float h)
2525bd8deadSopenharmony_ci      {
2535bd8deadSopenharmony_ci        return (e*f) + (g*h);            // no special precision
2545bd8deadSopenharmony_ci      }
2555bd8deadSopenharmony_ci
2565bd8deadSopenharmony_ci      float func2(float e, float f, float g, float h)
2575bd8deadSopenharmony_ci      {
2585bd8deadSopenharmony_ci        precise result = (e*f) + (g*h);  // ensures a precise return value
2595bd8deadSopenharmony_ci        return result;
2605bd8deadSopenharmony_ci      }
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci      float func3(float i, float j, precise out float k)
2635bd8deadSopenharmony_ci      {
2645bd8deadSopenharmony_ci        k = i * i + j;                   // precise, due to <k> declaration
2655bd8deadSopenharmony_ci      }
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ci      void main(void)
2685bd8deadSopenharmony_ci      {
2695bd8deadSopenharmony_ci        vec4 r = vec3(a * b);           // precise, used to compute v.xyz
2705bd8deadSopenharmony_ci        vec4 s = vec3(c * d);           // precise, used to compute v.xyz
2715bd8deadSopenharmony_ci        v.xyz = r + s;                      // precise
2725bd8deadSopenharmony_ci        v.w = (a.w * b.w) + (c.w * d.w);    // precise
2735bd8deadSopenharmony_ci        v.x = func(a.x, b.x, c.x, d.x);     // values computed in func()
2745bd8deadSopenharmony_ci                                            // are NOT precise
2755bd8deadSopenharmony_ci        v.x = func2(a.x, b.x, c.x, d.x);    // precise!
2765bd8deadSopenharmony_ci        func3(a.x * b.x, c.x * d.x, v.x);   // precise!
2775bd8deadSopenharmony_ci      }
2785bd8deadSopenharmony_ci
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci    Modify Section 8.3, Common Functions, p. 104
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci    (add support for floating-point multiply-add)
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci    Syntax:
2855bd8deadSopenharmony_ci
2865bd8deadSopenharmony_ci      genType fma(genType a, genType b, genType c);
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci    Computes and returns a * b + c.
2895bd8deadSopenharmony_ci
2905bd8deadSopenharmony_ci    In uses where the return value is eventually consumed by a variable
2915bd8deadSopenharmony_ci    declared as precise:
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ci    * fma() is considered a single operation, whereas the expression
2945bd8deadSopenharmony_ci      "a*b + c" consumed by a variable declared precise is considered two
2955bd8deadSopenharmony_ci      operations.
2965bd8deadSopenharmony_ci    * The precision of fma() can differ from the precision of the expression
2975bd8deadSopenharmony_ci      "a*b + c".
2985bd8deadSopenharmony_ci    * fma() will be computed with the same precision as any other fma()
2995bd8deadSopenharmony_ci      consumed by a precise variable, giving invariant results for the same
3005bd8deadSopenharmony_ci      input values of a, b, and c.
3015bd8deadSopenharmony_ci
3025bd8deadSopenharmony_ci    Otherwise, in the absence of precise consumption, there are no special
3035bd8deadSopenharmony_ci    constraints on the number of operations or difference in precision
3045bd8deadSopenharmony_ci    between fma() and the expression "a*b + c".
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci
3075bd8deadSopenharmony_ci    Modify the table of functions in section 8.9.3 "Texture Gather
3085bd8deadSopenharmony_ci    Functions", changing the "Description" column for the existing
3095bd8deadSopenharmony_ci    textureGatherOffset functions on p. 127:
3105bd8deadSopenharmony_ci
3115bd8deadSopenharmony_ci    Description
3125bd8deadSopenharmony_ci
3135bd8deadSopenharmony_ci        Perform a texture gather operation as in textureGather offset by
3145bd8deadSopenharmony_ci        <offset> as described in textureOffset, except that the <offset> can
3155bd8deadSopenharmony_ci        be variable (non-constant) and the implementation-dependent minimum
3165bd8deadSopenharmony_ci        and maximum offset values are given by the values of
3175bd8deadSopenharmony_ci        MIN_PROGRAM_TEXTURE_GATHER_OFFSET and
3185bd8deadSopenharmony_ci        MAX_PROGRAM_TEXTURE_GATHER_OFFSET, respectively.
3195bd8deadSopenharmony_ci
3205bd8deadSopenharmony_ci
3215bd8deadSopenharmony_ci    Add new textureGatherOffsets functions to the same table, on p. 127:
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci    Syntax
3245bd8deadSopenharmony_ci
3255bd8deadSopenharmony_ci        gvec4 textureGatherOffsets(gsampler2D sampler, vec2 P,
3265bd8deadSopenharmony_ci                                   ivec2 offsets[4] [, int comp])
3275bd8deadSopenharmony_ci        gvec4 textureGatherOffsets(gsampler2DArray sampler, vec3 P,
3285bd8deadSopenharmony_ci                                   ivec2 offsets[4] [, int comp])
3295bd8deadSopenharmony_ci        vec4 textureGatherOffsets(sampler2DShadow sampler, vec2 P,
3305bd8deadSopenharmony_ci                                  float refZ, ivec2 offsets[4])
3315bd8deadSopenharmony_ci        vec4 textureGatherOffsets(sampler2DArrayShadow sampler, vec3 P,
3325bd8deadSopenharmony_ci                                  float refZ, ivec2 offsets[4])
3335bd8deadSopenharmony_ci
3345bd8deadSopenharmony_ci    Description
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci        Operate identically to textureGatherOffset except that <offsets> is
3375bd8deadSopenharmony_ci        used to determine the location of the four texels to sample. Each of
3385bd8deadSopenharmony_ci        the four texels is obtained by applying the corresponding offset in
3395bd8deadSopenharmony_ci        <offsets> as a (u,v) coordinate offset to <coord>, identifying the
3405bd8deadSopenharmony_ci        four-texel linear footprint, and then selecting texel (i0,j0) of
3415bd8deadSopenharmony_ci        that footprint. The specified values in <offsets> must be constant
3425bd8deadSopenharmony_ci        integral expressions.
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ciNew Implementation Dependent State
3455bd8deadSopenharmony_ci
3465bd8deadSopenharmony_ci    None.
3475bd8deadSopenharmony_ci
3485bd8deadSopenharmony_ciIssues
3495bd8deadSopenharmony_ci
3505bd8deadSopenharmony_ci    Note: These issues apply specifically to the definition of the
3515bd8deadSopenharmony_ci    OES_gpu_shader5 specification, which is based on the OpenGL extension
3525bd8deadSopenharmony_ci    ARB_gpu_shader5 as updated in OpenGL 4.x. Resolved issues from
3535bd8deadSopenharmony_ci    ARB_gpu_shader5 have been removed, but some remain applicable to this
3545bd8deadSopenharmony_ci    extension. ARB_gpu_shader5 can be found in the OpenGL Registry.
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci    (1) What functionality was removed relative to ARB_gpu_shader5?
3575bd8deadSopenharmony_ci
3585bd8deadSopenharmony_ci      - Instanced geometry support (moved into OES_geometry_shader)
3595bd8deadSopenharmony_ci      - Implicit conversions (moved to EXT_shader_implicit_conversions)
3605bd8deadSopenharmony_ci      - Interactions with features not supported by the underlying
3615bd8deadSopenharmony_ci        ES 3.1 API and Shading Language, including:
3625bd8deadSopenharmony_ci        * interactions with ARB_gpu_Shader_fp64 and NV_gpu_shader, including
3635bd8deadSopenharmony_ci          support for double-precision in implicit conversions and function
3645bd8deadSopenharmony_ci          overload resolution
3655bd8deadSopenharmony_ci        * multiple vertex streams (these require ARB_transform_feedback3)
3665bd8deadSopenharmony_ci        * textureGather built-in variants for cube map array and rectangle
3675bd8deadSopenharmony_ci          texture samples.
3685bd8deadSopenharmony_ci        * shading language function overloading rules involving the type
3695bd8deadSopenharmony_ci          double
3705bd8deadSopenharmony_ci      - Functionality already in OpenGL ES 3.00, including packing and
3715bd8deadSopenharmony_ci        unpacking of 16-bit types and converting floating-point values to or
3725bd8deadSopenharmony_ci        from their integer bit encodings.
3735bd8deadSopenharmony_ci      - Functionality already in OpenGL ES 3.10, including
3745bd8deadSopenharmony_ci        * splitting and building floating-point numbers from a significand and
3755bd8deadSopenharmony_ci          exponent, integer bitfield manipulation, and packing and unpacking
3765bd8deadSopenharmony_ci          vectors of 8-bit fixed-point data types.
3775bd8deadSopenharmony_ci        * a subset of the textureGather and textureGatherOffset builtins
3785bd8deadSopenharmony_ci          (but some textureGather builtins remain in this extension).
3795bd8deadSopenharmony_ci      - Functionality already in OES_sample_variables, including support for
3805bd8deadSopenharmony_ci        reading a mask of covered samples in a fragment shader.
3815bd8deadSopenharmony_ci      - Functionality already in OES_shader_multisample_interpolation,
3825bd8deadSopenharmony_ci        including support for interpolating a fragment shader input at a
3835bd8deadSopenharmony_ci        programmable offset relative to the pixel center, a programmable
3845bd8deadSopenharmony_ci        sample number, or at the centroid.
3855bd8deadSopenharmony_ci      - MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS (Issue 9).
3865bd8deadSopenharmony_ci
3875bd8deadSopenharmony_ci    (2) What functionality was changed and added relative to
3885bd8deadSopenharmony_ci        ARB_gpu_shader5?
3895bd8deadSopenharmony_ci
3905bd8deadSopenharmony_ci      - Support for indexing into arrays of samplers with extended to all
3915bd8deadSopenharmony_ci        opaque types, and the description of allowed indices was rewritten
3925bd8deadSopenharmony_ci        in terms of dynamically uniform expressions, as was done when
3935bd8deadSopenharmony_ci        ARB_gpu_shader5 was promoted into OpenGL 4.0.
3945bd8deadSopenharmony_ci      - The only remaining API interaction is an increase in a
3955bd8deadSopenharmony_ci        minium-maximum value, so no "Changes to the OpenGL ES Specification"
3965bd8deadSopenharmony_ci        sections are included above.
3975bd8deadSopenharmony_ci      - arrays of images and shader storage blocks can only be indexed
3985bd8deadSopenharmony_ci        with constant integral expressions.
3995bd8deadSopenharmony_ci
4005bd8deadSopenharmony_ci    (3) What should the rules on GLSL suffixing be?
4015bd8deadSopenharmony_ci
4025bd8deadSopenharmony_ci    RESOLVED: "precise" is not a reserved keyword in ESSL 3.00, but it is
4035bd8deadSopenharmony_ci    a keyword in GLSL 4.40. ESSL 3.10 updated the reserved keyword list
4045bd8deadSopenharmony_ci    to include all keywords used or reserved in GLSL 4.40 (but not otherwise
4055bd8deadSopenharmony_ci    used in ES) and thus we can use "precise" in this spec by moving it
4065bd8deadSopenharmony_ci    from the reserved keywords section. See bug 11179.
4075bd8deadSopenharmony_ci
4085bd8deadSopenharmony_ci    (4) Are changes to the "Order of Qualification" section needed?
4095bd8deadSopenharmony_ci
4105bd8deadSopenharmony_ci    RESOLVED. No. ESSL 3.10 relaxes the ordering constraints similarly to
4115bd8deadSopenharmony_ci    GLSL 4.40. And thus there is no need for modifications to section 4.7
4125bd8deadSopenharmony_ci    in 3.00 (4.10 in 3.10) in this extension.
4135bd8deadSopenharmony_ci
4145bd8deadSopenharmony_ci    (5) Are any more changes needed to the descriptions of texture gather?
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    Probably not. Bug 11109 suggests cleanup to be applied to both desktop
4175bd8deadSopenharmony_ci    API and language specifications to make them cleaner and more
4185bd8deadSopenharmony_ci    consistent. The important parts of this cleanup were done in the texture
4195bd8deadSopenharmony_ci    gather functionality folded into ES 3.1, although some small language
4205bd8deadSopenharmony_ci    tweaks may still be needed.
4215bd8deadSopenharmony_ci
4225bd8deadSopenharmony_ci    (6) Moved to EXT_shader_implicit_conversions Issue 4.
4235bd8deadSopenharmony_ci
4245bd8deadSopenharmony_ci    (7) Should uniform and shader storage blocks be backable with buffer
4255bd8deadSopenharmony_ci        object subranges?
4265bd8deadSopenharmony_ci
4275bd8deadSopenharmony_ci    RESOLVED: Yes. The section 4.3.7 "Interface Blocks" language picked up
4285bd8deadSopenharmony_ci    from desktop GL allows this (they are called "bind ranges"). This is a
4295bd8deadSopenharmony_ci    spec oversight in ES, because BindBufferRange is fully supported in
4305bd8deadSopenharmony_ci    OpenGL ES 3.0.
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci    (8) Where is MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS?
4335bd8deadSopenharmony_ci
4345bd8deadSopenharmony_ci    RESOLVED. It was not added in Core GL because ARB_texture_gather and
4355bd8deadSopenharmony_ci    ARB_gpu_shader5 were both added to GL 4.0 and thus the query was
4365bd8deadSopenharmony_ci    unneeded. Since OpenGL ES 3.1 also includes texture gather and the
4375bd8deadSopenharmony_ci    multi-component gather support from gpu_shader5, the query was also
4385bd8deadSopenharmony_ci    unnecessary there and here.  Bug 11002.
4395bd8deadSopenharmony_ci
4405bd8deadSopenharmony_ci    (9) Some vendors may not be able to support dynamic indexing
4415bd8deadSopenharmony_ci    of arrays of images or shader storage blocks. What should we use instead?
4425bd8deadSopenharmony_ci
4435bd8deadSopenharmony_ci    RESOLVED: Only allowing 'constant integral expression' instead of
4445bd8deadSopenharmony_ci    'dynamically uniform integer expression' for arrays of images or shader
4455bd8deadSopenharmony_ci    storage blocks. For images this is done by carving out an exception in the
4465bd8deadSopenharmony_ci    general language for opaque types. For shader storage blocks, different
4475bd8deadSopenharmony_ci    rules are given for arrays of uniform blocks and arrays of shader storage
4485bd8deadSopenharmony_ci    blocks.
4495bd8deadSopenharmony_ci
4505bd8deadSopenharmony_ciRevision History
4515bd8deadSopenharmony_ci
4525bd8deadSopenharmony_ci    Rev.    Date      Author    Changes
4535bd8deadSopenharmony_ci    ----  ----------  --------- -------------------------------------------------
4545bd8deadSopenharmony_ci     1    06/18/2014  dkoch     Initial OES version based on EXT.
4555bd8deadSopenharmony_ci                                No functional changes.
4565bd8deadSopenharmony_ci     2    03/27/2015  dkoch     Add missing function and token sections.
457