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