15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_sparse_texture2
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_sparse_texture2
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Jeff Bolz, NVIDIA Corporation
165bd8deadSopenharmony_ci    Mathias Heyer, NVIDIA Corporation
175bd8deadSopenharmony_ci    Daniel Koch, NVIDIA Corporation
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ciStatus
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci    Shipping
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ciVersion
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci    Last Modified Date:         April 19, 2016
265bd8deadSopenharmony_ci    NVIDIA Revision:            3
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ciNumber
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci    OpenGL Extension #463
315bd8deadSopenharmony_ci    OpenGL ES Extension #259
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciDependencies
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    This extension is written against the OpenGL 4.4 Specification
365bd8deadSopenharmony_ci    (Compatibility Profile), dated July 21, 2013.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    This extension is written against the OpenGL Shading Language
395bd8deadSopenharmony_ci    Specification, version 4.40, revision 6.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    When implemented in OpenGL, this extension requires and extends
425bd8deadSopenharmony_ci    ARB_sparse_texture.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    When implemented in OpenGL ES, this extension requires and extends
455bd8deadSopenharmony_ci    EXT_sparse_texture.
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    This extension interacts trivially with EXT_depth_bounds_test.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    This extension interacts with NV_gpu_program4 and NV_gpu_program5.
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    This extension interacts with OpenGL ES 3.1 (dated October 29th 2014).
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    This extension interacts with OpenGL ES Shading Language 3.1 (revision 3).
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    This extension interacts with EXT_gpu_shader5 and OES_gpu_shader5.
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    This extension interacts with EXT_texture_norm16.
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ci    This extension interacts with EXT_texture_cube_map_array and
605bd8deadSopenharmony_ci    OES_texture_cube_map_array.
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci    This extension interacts with OES_texture_storage_multisample_2D_array.
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciOverview
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    This extension builds on the ARB_sparse_texture extension, providing the
685bd8deadSopenharmony_ci    following new functionality:
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci      * New built-in GLSL texture lookup and image load functions are provided
715bd8deadSopenharmony_ci        that return information on whether the texels accessed for the texture
725bd8deadSopenharmony_ci        lookup accessed uncommitted texture memory.
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ci      * New built-in GLSL texture lookup functions are provided that specify a
755bd8deadSopenharmony_ci        minimum level of detail to use for lookups where the level of detail
765bd8deadSopenharmony_ci        is computed automatically.  This allows shaders to avoid accessing
775bd8deadSopenharmony_ci        unpopulated portions of high-resolution levels of detail when it knows
785bd8deadSopenharmony_ci        that the memory accessed is unpopulated, either from a priori
795bd8deadSopenharmony_ci        knowledge or from feedback provided by the return value of previously
805bd8deadSopenharmony_ci        executed "sparse" texture lookup functions.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci      * Reads of uncommitted texture memory will act as though such memory
835bd8deadSopenharmony_ci        were filled with zeroes; previously, the values returned by reads were
845bd8deadSopenharmony_ci        undefined.
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci      * Standard implementation-independent virtual page sizes for internal
875bd8deadSopenharmony_ci        formats required to be supported with sparse textures. These standard
885bd8deadSopenharmony_ci        sizes can be requested by leaving VIRTUAL_PAGE_SIZE_INDEX_ARB at its
895bd8deadSopenharmony_ci        initial value (0).
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci      * Support for creating sparse multisample and multisample array textures
925bd8deadSopenharmony_ci        is added.  However, the virtual page sizes for such textures remain
935bd8deadSopenharmony_ci        fully implementation-dependent.
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ciNew Procedures and Functions
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    None.
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ciNew Tokens
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci    None.
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ciModifications to the OpenGL 4.4 Specification (Compatibility Profile)
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci    Modify Section 8.10, Texture Parameters, p. 250
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci    (modify the following Errors section entry for TexParameter*, added by
1085bd8deadSopenharmony_ci    ARB_sparse_texture, to allow for sparse multisample and multisample array
1095bd8deadSopenharmony_ci    textures)
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci        INVALID_VALUE is generated if <pname> is TEXTURE_SPARSE_ARB, <pname>
1125bd8deadSopenharmony_ci    is TRUE and <target> is not one of TEXTURE_2D, TEXTURE_2D_ARRAY,
1135bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY, TEXTURE_3D, TEXTURE_RECTANGLE,
1145bd8deadSopenharmony_ci    TEXTURE_2D_MULTISAMPLE, or TEXTURE_2D_MULTISAMPLE_ARRAY.
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    Modify Section 8.14.1, Scale Factor and Level of Detail, p. 261
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci    (move the next-to-last paragraph, p. 261, describing lod_min and lod_max
1205bd8deadSopenharmony_ci     in equation 8.6, up one paragraph and modify it to read as follows)
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    lod_min and lod_max indicate minimum and maximum clamps on the computed
1235bd8deadSopenharmony_ci    level of detail.  lod_max is taken directly from the TEXTURE_MAX_LOD
1245bd8deadSopenharmony_ci    texture or sampler parameter.  If a texture access is performed in a
1255bd8deadSopenharmony_ci    fragment shader with a minimum level of detail clamp specified in the
1265bd8deadSopenharmony_ci    built-in texture lookup function, lod_min is the larger of the
1275bd8deadSopenharmony_ci    TEXTURE_MIN_LOD texture or sampler parameter and the minimum level of
1285bd8deadSopenharmony_ci    detail provided by the shader.  Otherwise, lod_min is taken directly from
1295bd8deadSopenharmony_ci    the TEXTURE_MIN_LOD texture or sampler parameter.  The initial values of
1305bd8deadSopenharmony_ci    the TEXTURE_MIN_LOD and TEXTURE_MAX_LOD texture and sampler parameters are
1315bd8deadSopenharmony_ci    chosen so as to never clamp the range of lambda values.
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    Modify the edits to Section 8.19 (Immutable-Format Texture Images), as
1355bd8deadSopenharmony_ci    made by ARB_sparse_texture
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    (remove the following language from the "p. 233" edits starting with "If
1385bd8deadSopenharmony_ci     TEXTURE_SPARSE_ARB is TRUE"; there is no longer a restriction on the base
1395bd8deadSopenharmony_ci     size of a sparse texture allocation)
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    [REMOVED LANGUAGE] ... In this case, <width>, <height>, and <depth> must
1425bd8deadSopenharmony_ci    either be integer multiples of the selected virtual page size in the X, Y,
1435bd8deadSopenharmony_ci    and Z dimensions, respectively, or be less than those dimensions. ...
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    (remove the following TexStorage error added by ARB_sparse_texture; there
1465bd8deadSopenharmony_ci     is no longer a restriction on the base size of a sparse texture
1475bd8deadSopenharmony_ci     allocation)
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    [REMOVED LANGUAGE] An INVALID_VALUE error is generated if
1505bd8deadSopenharmony_ci    TEXTURE_SPARSE_ARB is TRUE and <width>, <height> or <depth> is is not an
1515bd8deadSopenharmony_ci    integer multiple of the page size in the corresponding dimension.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    (remove the error language beginning with "If the value of
1545bd8deadSopenharmony_ci     SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB is FALSE", and replace with
1555bd8deadSopenharmony_ci     the following)
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ci    In older extensions supporting sparse textures, the constant
1585bd8deadSopenharmony_ci    SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB was provided to advertise
1595bd8deadSopenharmony_ci    implementation-dependent limitations potentially prohibiting the
1605bd8deadSopenharmony_ci    allocation of array or cube map textures with full mipmap chains.  No such
1615bd8deadSopenharmony_ci    limitations apply in this extension.  This constant is retained for
1625bd8deadSopenharmony_ci    backwards compatibility, but all implementations of this extension must
1635bd8deadSopenharmony_ci    return TRUE.
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ci    Modify Section 8.20.1 of ARB_sparse_texture (Allocation of and Access to
1675bd8deadSopenharmony_ci    Sparse Textures)
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    (insert after the two paragraphs discussing VIRTUAL_PAGE_SIZE_INDEX_ARB)
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    When leaving the VIRTUAL_PAGE_SIZE_INDEX_ARB texture parameter at its
1725bd8deadSopenharmony_ci    initial value (0), the virtual page size for many non-multisample sparse
1735bd8deadSopenharmony_ci    textures can be found in Table 8.X.  The virtual page size of such a
1745bd8deadSopenharmony_ci    texture comes from the value listed in the "3D Page Size" column for the
1755bd8deadSopenharmony_ci    texture target TEXTURE_3D, or the value listed in the "2D Page Size"
1765bd8deadSopenharmony_ci    column for any other target.  If the internal format of the texture is not
1775bd8deadSopenharmony_ci    listed in Table 8.X or if the texture target is TEXTURE_2D_MULTISAMPLE or
1785bd8deadSopenharmony_ci    TEXTURE_2D_MULTISAMPLE_ARRAY, the virtual page size for index zero is
1795bd8deadSopenharmony_ci    fully implementation-dependent.
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci      Internal Format      2D Page Size    3D Page Size
1825bd8deadSopenharmony_ci      ---------------      -------------   ------------
1835bd8deadSopenharmony_ci      R8                   256 x 256 x 1   64 x 32 x 32
1845bd8deadSopenharmony_ci      R8_SNORM
1855bd8deadSopenharmony_ci      R8I
1865bd8deadSopenharmony_ci      R8UI
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci      R16                  256 x 128 x 1   32 x 32 x 32
1895bd8deadSopenharmony_ci      R16_SNORM
1905bd8deadSopenharmony_ci      RG8
1915bd8deadSopenharmony_ci      RG8_SNORM
1925bd8deadSopenharmony_ci      RGB565
1935bd8deadSopenharmony_ci      R16F
1945bd8deadSopenharmony_ci      R16I
1955bd8deadSopenharmony_ci      R16UI
1965bd8deadSopenharmony_ci      RG8I
1975bd8deadSopenharmony_ci      RG8UI
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci      RG16                 128 x 128 x 1   32 x 32 x 16
2005bd8deadSopenharmony_ci      RG16_SNORM
2015bd8deadSopenharmony_ci      RGBA8
2025bd8deadSopenharmony_ci      RGBA8_SNORM
2035bd8deadSopenharmony_ci      RGB10_A2
2045bd8deadSopenharmony_ci      RGB10_A2UI
2055bd8deadSopenharmony_ci      RG16F
2065bd8deadSopenharmony_ci      R32F
2075bd8deadSopenharmony_ci      R11F_G11F_B10F
2085bd8deadSopenharmony_ci      RGB9_E5
2095bd8deadSopenharmony_ci      R32I
2105bd8deadSopenharmony_ci      R32UI
2115bd8deadSopenharmony_ci      RG16I
2125bd8deadSopenharmony_ci      RG16UI
2135bd8deadSopenharmony_ci      RGBA8I
2145bd8deadSopenharmony_ci      RGBA8UI
2155bd8deadSopenharmony_ci
2165bd8deadSopenharmony_ci      RGBA16               128 x 64 x 1     32 x 16 x 16
2175bd8deadSopenharmony_ci      RGBA16_SNORM
2185bd8deadSopenharmony_ci      RGBA16F
2195bd8deadSopenharmony_ci      RG32F
2205bd8deadSopenharmony_ci      RG32I
2215bd8deadSopenharmony_ci      RG32UI
2225bd8deadSopenharmony_ci      RGBA16I
2235bd8deadSopenharmony_ci      RGBA16UI
2245bd8deadSopenharmony_ci
2255bd8deadSopenharmony_ci      RGBA32F              64 x 64 x 1     16 x 16 x 16
2265bd8deadSopenharmony_ci      RGBA32I
2275bd8deadSopenharmony_ci      RGBA32UI
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci      Table 8.X, Standard Virtual Page Sizes for Sparse Textures
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci    (modify first bullet under "When a sparsely committed texture is accessed
2335bd8deadSopenharmony_ci     by the GL" at the end of the section)
2345bd8deadSopenharmony_ci
2355bd8deadSopenharmony_ci        * Reads from such regions behave as if the data in texture memory for
2365bd8deadSopenharmony_ci          all components present in the texture format were zero.  This
2375bd8deadSopenharmony_ci          includes samples required for the implementation of texture
2385bd8deadSopenharmony_ci          filtering, image loads, mipmap generation, and so on.  For texture
2395bd8deadSopenharmony_ci          and image loads, components not present in the texture format (e.g.,
2405bd8deadSopenharmony_ci          alpha in a texture with an RGB base internal format) will return
2415bd8deadSopenharmony_ci          default values, as in non-sparse textures.
2425bd8deadSopenharmony_ci
2435bd8deadSopenharmony_ci    (modify third bullet under "When a sparsely committed texture is accessed
2445bd8deadSopenharmony_ci     by the GL" at the end of the section)
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci        * Atomic operations operating on uncommitted regions will not generate
2475bd8deadSopenharmony_ci          exceptions but will always return zero.  The result of the atomic
2485bd8deadSopenharmony_ci          operation, which is normally written to memory, will instead be
2495bd8deadSopenharmony_ci          discarded.
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    (add new bullets under "When a sparsely committed texture is accessed by
2525bd8deadSopenharmony_ci     the GL" at the end of the section)
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci        * When performing the stencil test (section 17.3.5), depth buffer test
2555bd8deadSopenharmony_ci          (section 17.3.6), or depth bounds test on pixels in uncommitted
2565bd8deadSopenharmony_ci          regions, the results of the test will be consistent with reading a
2575bd8deadSopenharmony_ci          value of zero from the framebuffer.  No value is written to the
2585bd8deadSopenharmony_ci          depth buffer.
2595bd8deadSopenharmony_ci
2605bd8deadSopenharmony_ci    (add a new paragraph at the end of the section)
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci    The OpenGL Shading Language provides built-in functions that perform a
2635bd8deadSopenharmony_ci    texture fetch or image load and return sparse texture status information
2645bd8deadSopenharmony_ci    to the caller.  The status information can be queried by the built-in
2655bd8deadSopenharmony_ci    function sparseTexelsResidentEXT(), which returns false if the lookup
2665bd8deadSopenharmony_ci    function read one or more uncommitted texels and true otherwise.  For the
2675bd8deadSopenharmony_ci    purposes of this query, texels addressed by a filter normally computing a
2685bd8deadSopenharmony_ci    weighted average of multiple texels (e.g., LINEAR) will be considered to
2695bd8deadSopenharmony_ci    access only those texels with non-zero weights.
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci
2725bd8deadSopenharmony_ci    Modify Section 8.20.2 of ARB_sparse_texture (Controlling Sparse Texture
2735bd8deadSopenharmony_ci    Commitment)
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci    (modify the fifth paragraph of the section from ARB_sparse_texture,
2765bd8deadSopenharmony_ci    starting with "For levels of a sparse texture where..." to guarantee that
2775bd8deadSopenharmony_ci    any level greater than or equal to the page size in all dimensions can be
2785bd8deadSopenharmony_ci    sparsely populated)
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci    For levels of a sparse texture where each dimension is greater than or
2815bd8deadSopenharmony_ci    equal to of the virtual page size, the residency of individual page-size
2825bd8deadSopenharmony_ci    regions is controlled by TexPageCommitmentARB and such levels may be
2835bd8deadSopenharmony_ci    partially populated.  When the mipmap chain reaches a level that is not
2845bd8deadSopenharmony_ci    greater than or equal to the virtual page size in any dimension, padding
2855bd8deadSopenharmony_ci    and memory layout considerations may make it impossible to treat that
2865bd8deadSopenharmony_ci    level and subsequent smaller ones as partially populated.  ...
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci
2895bd8deadSopenharmony_ciModifications to the OpenGL Shading Language Specification, Version 4.40
2905bd8deadSopenharmony_ci
2915bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
2925bd8deadSopenharmony_ci    language features described in this extension:
2935bd8deadSopenharmony_ci
2945bd8deadSopenharmony_ci      #extension GL_EXT_sparse_texture2 : <behavior>
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.3.
2975bd8deadSopenharmony_ci
2985bd8deadSopenharmony_ci    New preprocessor #defines are added to the OpenGL Shading Language:
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ci      #define GL_EXT_sparse_texture2            1
3015bd8deadSopenharmony_ci
3025bd8deadSopenharmony_ci    Modify Section 8.9, Texture Functions, p. 151
3035bd8deadSopenharmony_ci
3045bd8deadSopenharmony_ci    (insert after first paragraph, p. 152)
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci    The texture lookup functions with an <lodClamp> parameter specify a
3075bd8deadSopenharmony_ci    minimum clamp applied to the automatic level of detail computations.
3085bd8deadSopenharmony_ci    Since automatic level of detail calculations are only supported by
3095bd8deadSopenharmony_ci    fragment shaders, these lookup functions are also only available in
3105bd8deadSopenharmony_ci    fragment shaders.  No functions with the <lodClamp> parameter are provided
3115bd8deadSopenharmony_ci    for rectangle textures, multisample textures, and texture buffers because
3125bd8deadSopenharmony_ci    mipmaps are not allowed for these types of textures.
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci    Modify Section 8.9.2, Texel Lookup Functions, p. 155
3165bd8deadSopenharmony_ci
3175bd8deadSopenharmony_ci    (This extension adds two new variants of texture lookup functions.  The
3185bd8deadSopenharmony_ci    "sparse" functions are like normal texture lookup functions, except that
3195bd8deadSopenharmony_ci    they return a sparse texture residency status to the caller and return the
3205bd8deadSopenharmony_ci    actual filtered texel value in an "out" parameter.  The "Clamp" variants
3215bd8deadSopenharmony_ci    are functions adding a new parameter specifying a minimum LOD to use for
3225bd8deadSopenharmony_ci    texture lookup functions where level of detail is computed automatically.
3235bd8deadSopenharmony_ci
3245bd8deadSopenharmony_ci    For each set of texture functions, we provide one to three new variants
3255bd8deadSopenharmony_ci    based on whether sparse and LOD clamping functionality are desired.  These
3265bd8deadSopenharmony_ci    new variants copy the existing functions, add suffixes to the function
3275bd8deadSopenharmony_ci    names, and add one or more new parameters.
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ci    We create new variants only for the targets for which sparse storage is
3305bd8deadSopenharmony_ci    supported -- no new functions are added for the following sampler types:
3315bd8deadSopenharmony_ci    gsampler1D, sampler1DShadow, gsampler1DArray, sampler1DArrayShadow.
3325bd8deadSopenharmony_ci    Additionally, to reduce the number of new functions added, we are not
3335bd8deadSopenharmony_ci    including any new variants for textureProj*() built-ins.  To use the new
3345bd8deadSopenharmony_ci    features with projective texture lookups, shaders can divide through by q
3355bd8deadSopenharmony_ci    and use non-projective variants.  We also chose not to provide "Clamp"
3365bd8deadSopenharmony_ci    variants of functions like textureLod() expecting an explicit
3375bd8deadSopenharmony_ci    level-of-detail.)
3385bd8deadSopenharmony_ci
3395bd8deadSopenharmony_ci    (insert new lookup function table cells, at the end of the section,
3405bd8deadSopenharmony_ci    p. 161)
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci    Syntax:
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ci      int sparseTextureEXT(gsampler2D sampler, vec2 P,
3455bd8deadSopenharmony_ci                           out gvec4 texel [, float bias]);
3465bd8deadSopenharmony_ci      int sparseTextureEXT(gsampler3D sampler, vec3 P,
3475bd8deadSopenharmony_ci                           out gvec4 texel [, float bias]);
3485bd8deadSopenharmony_ci      int sparseTextureEXT(gsamplerCube sampler, vec3 P,
3495bd8deadSopenharmony_ci                           out gvec4 texel [, float bias]);
3505bd8deadSopenharmony_ci      int sparseTextureEXT(sampler2DShadow sampler, vec3 P,
3515bd8deadSopenharmony_ci                           out float texel [, float bias]);
3525bd8deadSopenharmony_ci      int sparseTextureEXT(samplerCubeShadow sampler, vec4 P,
3535bd8deadSopenharmony_ci                           out float texel [, float bias]);
3545bd8deadSopenharmony_ci      int sparseTextureEXT(gsampler2DArray sampler, vec3 P,
3555bd8deadSopenharmony_ci                           out gvec4 texel [, float bias]);
3565bd8deadSopenharmony_ci      int sparseTextureEXT(gsamplerCubeArray sampler, vec4 P,
3575bd8deadSopenharmony_ci                           out gvec4 texel [, float bias]);
3585bd8deadSopenharmony_ci      int sparseTextureEXT(sampler2DArrayShadow sampler, vec4 P,
3595bd8deadSopenharmony_ci                           out float texel);
3605bd8deadSopenharmony_ci      int sparseTextureEXT(gsampler2DRect sampler, vec2 P,
3615bd8deadSopenharmony_ci                           out gvec4 texel);
3625bd8deadSopenharmony_ci      int sparseTextureEXT(sampler2DRectShadow sampler, vec3 P,
3635bd8deadSopenharmony_ci                           out float texel);
3645bd8deadSopenharmony_ci      int sparseTextureEXT(samplerCubeArrayShadow sampler, vec4 P,
3655bd8deadSopenharmony_ci                           float compare, out float texel);
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ci    Description:
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci    Do a filtered texture lookup as in texture(), but return texture access
3705bd8deadSopenharmony_ci    residency information from the function and the filtered lookup result in
3715bd8deadSopenharmony_ci    the out parameter <texel>.
3725bd8deadSopenharmony_ci
3735bd8deadSopenharmony_ci    --
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ci    Syntax:
3765bd8deadSopenharmony_ci
3775bd8deadSopenharmony_ci      int sparseTextureClampEXT(gsampler2D sampler, vec2 P,
3785bd8deadSopenharmony_ci                                float lodClamp, out gvec4 texel
3795bd8deadSopenharmony_ci                                [, float bias]);
3805bd8deadSopenharmony_ci      int sparseTextureClampEXT(gsampler3D sampler, vec3 P,
3815bd8deadSopenharmony_ci                                float lodClamp, out gvec4 texel
3825bd8deadSopenharmony_ci                                [, float bias]);
3835bd8deadSopenharmony_ci      int sparseTextureClampEXT(gsamplerCube sampler, vec3 P,
3845bd8deadSopenharmony_ci                                float lodClamp, out gvec4 texel
3855bd8deadSopenharmony_ci                                [, float bias]);
3865bd8deadSopenharmony_ci      int sparseTextureClampEXT(sampler2DShadow sampler, vec3 P,
3875bd8deadSopenharmony_ci                                float lodClamp, out float texel
3885bd8deadSopenharmony_ci                                [, float bias]);
3895bd8deadSopenharmony_ci      int sparseTextureClampEXT(samplerCubeShadow sampler, vec4 P,
3905bd8deadSopenharmony_ci                                float lodClamp, out float texel
3915bd8deadSopenharmony_ci                                [, float bias]);
3925bd8deadSopenharmony_ci      int sparseTextureClampEXT(gsampler2DArray sampler, vec3 P,
3935bd8deadSopenharmony_ci                                float lodClamp, out gvec4 texel
3945bd8deadSopenharmony_ci                                [, float bias]);
3955bd8deadSopenharmony_ci      int sparseTextureClampEXT(gsamplerCubeArray sampler, vec4 P,
3965bd8deadSopenharmony_ci                                float lodClamp, out gvec4 texel
3975bd8deadSopenharmony_ci                                [, float bias]);
3985bd8deadSopenharmony_ci      int sparseTextureClampEXT(sampler2DArrayShadow sampler, vec4 P,
3995bd8deadSopenharmony_ci                                float lodClamp, out float texel);
4005bd8deadSopenharmony_ci      int sparseTextureClampEXT(samplerCubeArrayShadow sampler, vec4 P,
4015bd8deadSopenharmony_ci                                float compare, float lodClamp,
4025bd8deadSopenharmony_ci                                out float texel);
4035bd8deadSopenharmony_ci
4045bd8deadSopenharmony_ci    Description:
4055bd8deadSopenharmony_ci
4065bd8deadSopenharmony_ci    Do a filtered texture lookup as in texture(), but return texture access
4075bd8deadSopenharmony_ci    residency information from the function and the filtered lookup result in
4085bd8deadSopenharmony_ci    the out parameter <texel>.  Additionally, clamp the automatically computed
4095bd8deadSopenharmony_ci    level of detail to be greater than or equal to <lodClamp>.
4105bd8deadSopenharmony_ci
4115bd8deadSopenharmony_ci    --
4125bd8deadSopenharmony_ci
4135bd8deadSopenharmony_ci    Syntax:
4145bd8deadSopenharmony_ci
4155bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsampler1D sampler, float P,
4165bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4175bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsampler2D sampler, vec2 P,
4185bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4195bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsampler3D sampler, vec3 P,
4205bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4215bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsamplerCube sampler, vec3 P,
4225bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4235bd8deadSopenharmony_ci      float textureClampEXT(sampler1DShadow sampler, vec3 P,
4245bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4255bd8deadSopenharmony_ci      float textureClampEXT(sampler2DShadow sampler, vec3 P,
4265bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4275bd8deadSopenharmony_ci      float textureClampEXT(samplerCubeShadow sampler, vec4 P,
4285bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4295bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsampler1DArray sampler, vec2 P,
4305bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4315bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsampler2DArray sampler, vec3 P,
4325bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4335bd8deadSopenharmony_ci      gvec4 textureClampEXT(gsamplerCubeArray sampler, vec4 P,
4345bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4355bd8deadSopenharmony_ci      float textureClampEXT(sampler1DArrayShadow sampler, vec3 P,
4365bd8deadSopenharmony_ci                            float lodClamp [, float bias]);
4375bd8deadSopenharmony_ci      float textureClampEXT(sampler2DArrayShadow sampler, vec4 P,
4385bd8deadSopenharmony_ci                            float lodClamp);
4395bd8deadSopenharmony_ci      float textureClampEXT(samplerCubeArrayShadow sampler, vec4 P,
4405bd8deadSopenharmony_ci                            float compare, float lodClamp);
4415bd8deadSopenharmony_ci
4425bd8deadSopenharmony_ci    Description:
4435bd8deadSopenharmony_ci
4445bd8deadSopenharmony_ci    Do a filtered texture lookup as in texture(), but clamp the automatically
4455bd8deadSopenharmony_ci    computed level of detail to be greater than or equal to <lodClamp>.
4465bd8deadSopenharmony_ci
4475bd8deadSopenharmony_ci    --
4485bd8deadSopenharmony_ci
4495bd8deadSopenharmony_ci    Syntax:
4505bd8deadSopenharmony_ci
4515bd8deadSopenharmony_ci      int sparseTextureLodEXT(gsampler2D sampler, vec2 P, float lod,
4525bd8deadSopenharmony_ci                              out gvec4 texel);
4535bd8deadSopenharmony_ci      int sparseTextureLodEXT(gsampler3D sampler, vec3 P, float lod,
4545bd8deadSopenharmony_ci                              out gvec4 texel);
4555bd8deadSopenharmony_ci      int sparseTextureLodEXT(gsamplerCube sampler, vec3 P, float lod,
4565bd8deadSopenharmony_ci                              out gvec4 texel);
4575bd8deadSopenharmony_ci      int sparseTextureLodEXT(sampler2DShadow sampler, vec3 P, float lod,
4585bd8deadSopenharmony_ci                              out float texel);
4595bd8deadSopenharmony_ci      int sparseTextureLodEXT(gsampler2DArray sampler, vec3 P, float lod,
4605bd8deadSopenharmony_ci                              out gvec4 texel);
4615bd8deadSopenharmony_ci      int sparseTextureLodEXT(gsamplerCubeArray sampler, vec4 P, float lod,
4625bd8deadSopenharmony_ci                              out gvec4 texel);
4635bd8deadSopenharmony_ci
4645bd8deadSopenharmony_ci    Description:
4655bd8deadSopenharmony_ci
4665bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureLod(), but return texture access
4675bd8deadSopenharmony_ci    residency information from the function and the filtered lookup result in
4685bd8deadSopenharmony_ci    the out parameter <texel>.
4695bd8deadSopenharmony_ci
4705bd8deadSopenharmony_ci    --
4715bd8deadSopenharmony_ci
4725bd8deadSopenharmony_ci    Syntax:
4735bd8deadSopenharmony_ci
4745bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(gsampler2D sampler, vec2 P,
4755bd8deadSopenharmony_ci                                 ivec2 offset, out gvec4 texel
4765bd8deadSopenharmony_ci                                 [, float bias]);
4775bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(gsampler3D sampler, vec3 P,
4785bd8deadSopenharmony_ci                                 ivec3 offset, out gvec4 texel
4795bd8deadSopenharmony_ci                                 [, float bias]);
4805bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(gsampler2DRect sampler, vec2 P,
4815bd8deadSopenharmony_ci                                 ivec2 offset, out gvec4 texel);
4825bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(sampler2DRectShadow sampler, vec3 P,
4835bd8deadSopenharmony_ci                                 ivec2 offset, out float texel);
4845bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(sampler2DShadow sampler, vec3 P,
4855bd8deadSopenharmony_ci                                 ivec2 offset, out float texel
4865bd8deadSopenharmony_ci                                 [, float bias]);
4875bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(gsampler2DArray sampler, vec3 P,
4885bd8deadSopenharmony_ci                                 ivec2 offset, out gvec4 texel
4895bd8deadSopenharmony_ci                                 [, float bias]);
4905bd8deadSopenharmony_ci      int sparseTextureOffsetEXT(sampler2DArrayShadow sampler, vec4 P,
4915bd8deadSopenharmony_ci                                 ivec2 offset, out float texel);
4925bd8deadSopenharmony_ci
4935bd8deadSopenharmony_ci    Description:
4945bd8deadSopenharmony_ci
4955bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureOffset(), but return texture
4965bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
4975bd8deadSopenharmony_ci    result in the out parameter <texel>.
4985bd8deadSopenharmony_ci
4995bd8deadSopenharmony_ci    --
5005bd8deadSopenharmony_ci
5015bd8deadSopenharmony_ci    Syntax:
5025bd8deadSopenharmony_ci
5035bd8deadSopenharmony_ci      int sparseTextureOffsetClampEXT(gsampler2D sampler, vec2 P,
5045bd8deadSopenharmony_ci                                      ivec2 offset, float lodClamp,
5055bd8deadSopenharmony_ci                                      out gvec4 texel [, float bias]);
5065bd8deadSopenharmony_ci      int sparseTextureOffsetClampEXT(gsampler3D sampler, vec3 P,
5075bd8deadSopenharmony_ci                                      ivec3 offset, float lodClamp,
5085bd8deadSopenharmony_ci                                      out gvec4 texel [, float bias]);
5095bd8deadSopenharmony_ci      int sparseTextureOffsetClampEXT(sampler2DShadow sampler, vec3 P,
5105bd8deadSopenharmony_ci                                      ivec2 offset, float lodClamp,
5115bd8deadSopenharmony_ci                                      out float texel [, float bias]);
5125bd8deadSopenharmony_ci      int sparseTextureOffsetClampEXT(gsampler2DArray sampler, vec3 P,
5135bd8deadSopenharmony_ci                                      ivec2 offset, float lodClamp,
5145bd8deadSopenharmony_ci                                      out gvec4 texel [, float bias]);
5155bd8deadSopenharmony_ci      int sparseTextureOffsetClampEXT(sampler2DArrayShadow sampler, vec4 P,
5165bd8deadSopenharmony_ci                                      ivec2 offset, float lodClamp,
5175bd8deadSopenharmony_ci                                      out float texel);
5185bd8deadSopenharmony_ci
5195bd8deadSopenharmony_ci    Description:
5205bd8deadSopenharmony_ci
5215bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureOffset(), but return texture
5225bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
5235bd8deadSopenharmony_ci    result in the out parameter <texel>.  Additionally, clamp the
5245bd8deadSopenharmony_ci    automatically computed level of detail to be greater than or equal to
5255bd8deadSopenharmony_ci    <lodClamp>.
5265bd8deadSopenharmony_ci
5275bd8deadSopenharmony_ci    --
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci    Syntax:
5305bd8deadSopenharmony_ci
5315bd8deadSopenharmony_ci      gvec4 textureOffsetClampEXT(gsampler1D sampler, float P,
5325bd8deadSopenharmony_ci                                  int offset, float lodClamp [, float bias]);
5335bd8deadSopenharmony_ci      gvec4 textureOffsetClampEXT(gsampler2D sampler, vec2 P,
5345bd8deadSopenharmony_ci                                  ivec2 offset, float lodClamp [, float bias]);
5355bd8deadSopenharmony_ci      gvec4 textureOffsetClampEXT(gsampler3D sampler, vec3 P,
5365bd8deadSopenharmony_ci                                  ivec3 offset, float lodClamp [, float bias]);
5375bd8deadSopenharmony_ci      float textureOffsetClampEXT(sampler1DShadow sampler, vec3 P,
5385bd8deadSopenharmony_ci                                  int offset, float lodClamp [, float bias]);
5395bd8deadSopenharmony_ci      float textureOffsetClampEXT(sampler2DShadow sampler, vec3 P,
5405bd8deadSopenharmony_ci                                  ivec2 offset, float lodClamp [, float bias]);
5415bd8deadSopenharmony_ci      gvec4 textureOffsetClampEXT(gsampler1DArray sampler, vec2 P,
5425bd8deadSopenharmony_ci                                  int offset, float lodClamp [, float bias]);
5435bd8deadSopenharmony_ci      gvec4 textureOffsetClampEXT(gsampler2DArray sampler, vec3 P,
5445bd8deadSopenharmony_ci                                  ivec2 offset, float lodClamp [, float bias]);
5455bd8deadSopenharmony_ci      float textureOffsetClampEXT(sampler1DArrayShadow sampler, vec3 P,
5465bd8deadSopenharmony_ci                                  int offset, float lodClamp [, float bias]);
5475bd8deadSopenharmony_ci      float textureOffsetClampEXT(sampler2DArrayShadow sampler, vec4 P,
5485bd8deadSopenharmony_ci                                  ivec2 offset, float lodClamp);
5495bd8deadSopenharmony_ci
5505bd8deadSopenharmony_ci    Description:
5515bd8deadSopenharmony_ci
5525bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureOffset(), but clamp the
5535bd8deadSopenharmony_ci    automatically computed level of detail to be greater than or equal to
5545bd8deadSopenharmony_ci    <lodClamp>.
5555bd8deadSopenharmony_ci
5565bd8deadSopenharmony_ci    --
5575bd8deadSopenharmony_ci
5585bd8deadSopenharmony_ci    Syntax:
5595bd8deadSopenharmony_ci
5605bd8deadSopenharmony_ci      int sparseTexelFetchEXT(gsampler2D sampler, ivec2 P, int lod,
5615bd8deadSopenharmony_ci                              out gvec4 texel);
5625bd8deadSopenharmony_ci      int sparseTexelFetchEXT(gsampler3D sampler, ivec3 P, int lod,
5635bd8deadSopenharmony_ci                              out gvec4 texel);
5645bd8deadSopenharmony_ci      int sparseTexelFetchEXT(gsampler2DRect sampler, ivec2 P,
5655bd8deadSopenharmony_ci                              out gvec4 texel);
5665bd8deadSopenharmony_ci      int sparseTexelFetchEXT(gsampler2DArray sampler, ivec3 P, int lod,
5675bd8deadSopenharmony_ci                              out gvec4 texel);
5685bd8deadSopenharmony_ci      int sparseTexelFetchEXT(gsampler2DMS sampler, ivec2 P, int sample,
5695bd8deadSopenharmony_ci                              out gvec4 texel);
5705bd8deadSopenharmony_ci      int sparseTexelFetchEXT(gsampler2DMSArray sampler, ivec3 P, int sample,
5715bd8deadSopenharmony_ci                              out gvec4 texel);
5725bd8deadSopenharmony_ci
5735bd8deadSopenharmony_ci    Description:
5745bd8deadSopenharmony_ci
5755bd8deadSopenharmony_ci    Do a single texel fetch as in texelFetch(), but return texture access
5765bd8deadSopenharmony_ci    residency information from the function and the fetched texel in the out
5775bd8deadSopenharmony_ci    parameter <texel>.
5785bd8deadSopenharmony_ci
5795bd8deadSopenharmony_ci    --
5805bd8deadSopenharmony_ci
5815bd8deadSopenharmony_ci    Syntax:
5825bd8deadSopenharmony_ci
5835bd8deadSopenharmony_ci      int sparseTexelFetchOffsetEXT(gsampler2D sampler, ivec2 P, int lod,
5845bd8deadSopenharmony_ci                                    ivec2 offset, out gvec4 texel);
5855bd8deadSopenharmony_ci      int sparseTexelFetchOffsetEXT(gsampler3D sampler, ivec3 P, int lod,
5865bd8deadSopenharmony_ci                                    ivec3 offset, out gvec4 texel);
5875bd8deadSopenharmony_ci      int sparseTexelFetchOffsetEXT(gsampler2DRect sampler, ivec2 P,
5885bd8deadSopenharmony_ci                                    ivec2 offset, out gvec4 texel);
5895bd8deadSopenharmony_ci      int sparseTexelFetchOffsetEXT(gsampler2DArray sampler, ivec3 P, int lod,
5905bd8deadSopenharmony_ci                                    ivec2 offset, out gvec4 texel);
5915bd8deadSopenharmony_ci
5925bd8deadSopenharmony_ci    Description:
5935bd8deadSopenharmony_ci
5945bd8deadSopenharmony_ci    Do a single texel fetch as in texelFetchOffset(), but return texture
5955bd8deadSopenharmony_ci    access residency information from the function and the fetched texel in
5965bd8deadSopenharmony_ci    the out parameter <texel>.
5975bd8deadSopenharmony_ci
5985bd8deadSopenharmony_ci    --
5995bd8deadSopenharmony_ci
6005bd8deadSopenharmony_ci    Syntax:
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci      int sparseTextureLodOffsetEXT(gsampler2D sampler, vec2 P,
6035bd8deadSopenharmony_ci                                    float lod, ivec2 offset,
6045bd8deadSopenharmony_ci                                    out gvec4 texel);
6055bd8deadSopenharmony_ci      int sparseTextureLodOffsetEXT(gsampler3D sampler, vec3 P,
6065bd8deadSopenharmony_ci                                    float lod, ivec3 offset,
6075bd8deadSopenharmony_ci                                    out gvec4 texel);
6085bd8deadSopenharmony_ci      int sparseTextureLodOffsetEXT(sampler2DShadow sampler, vec3 P,
6095bd8deadSopenharmony_ci                                    float lod, ivec2 offset,
6105bd8deadSopenharmony_ci                                    out float texel);
6115bd8deadSopenharmony_ci      int sparseTextureLodOffsetEXT(gsampler2DArray sampler, vec3 P,
6125bd8deadSopenharmony_ci                                    float lod, ivec2 offset,
6135bd8deadSopenharmony_ci                                    out gvec4 texel);
6145bd8deadSopenharmony_ci
6155bd8deadSopenharmony_ci    Description:
6165bd8deadSopenharmony_ci
6175bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureLodOffset(), but return texture
6185bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
6195bd8deadSopenharmony_ci    result in the out parameter <texel>.
6205bd8deadSopenharmony_ci
6215bd8deadSopenharmony_ci    --
6225bd8deadSopenharmony_ci
6235bd8deadSopenharmony_ci    Syntax:
6245bd8deadSopenharmony_ci
6255bd8deadSopenharmony_ci      int sparseTextureGradEXT(gsampler2D sampler, vec2 P,
6265bd8deadSopenharmony_ci                               vec2 dPdx, vec2 dPdy,
6275bd8deadSopenharmony_ci                               out gvec4 texel);
6285bd8deadSopenharmony_ci      int sparseTextureGradEXT(gsampler3D sampler, vec3 P,
6295bd8deadSopenharmony_ci                               vec3 dPdx, vec3 dPdy,
6305bd8deadSopenharmony_ci                               out gvec4 texel);
6315bd8deadSopenharmony_ci      int sparseTextureGradEXT(gsamplerCube sampler, vec3 P,
6325bd8deadSopenharmony_ci                               vec3 dPdx, vec3 dPdy,
6335bd8deadSopenharmony_ci                               out gvec4 texel);
6345bd8deadSopenharmony_ci      int sparseTextureGradEXT(gsampler2DRect sampler, vec2 P,
6355bd8deadSopenharmony_ci                               vec2 dPdx, vec2 dPdy,
6365bd8deadSopenharmony_ci                               out gvec4 texel);
6375bd8deadSopenharmony_ci      int sparseTextureGradEXT(sampler2DRectShadow sampler, vec3 P,
6385bd8deadSopenharmony_ci                               vec2 dPdx, vec2 dPdy,
6395bd8deadSopenharmony_ci                               out float texel);
6405bd8deadSopenharmony_ci      int sparseTextureGradEXT(sampler2DShadow sampler, vec3 P,
6415bd8deadSopenharmony_ci                               vec2 dPdx, vec2 dPdy,
6425bd8deadSopenharmony_ci                               out float texel);
6435bd8deadSopenharmony_ci      int sparseTextureGradEXT(samplerCubeShadow sampler, vec4 P,
6445bd8deadSopenharmony_ci                               vec3 dPdx, vec3 dPdy,
6455bd8deadSopenharmony_ci                               out float texel);
6465bd8deadSopenharmony_ci      int sparseTextureGradEXT(gsampler2DArray sampler, vec3 P,
6475bd8deadSopenharmony_ci                               vec2 dPdx, vec2 dPdy,
6485bd8deadSopenharmony_ci                               out gvec4 texel);
6495bd8deadSopenharmony_ci      int sparseTextureGradEXT(sampler2DArrayShadow sampler, vec4 P,
6505bd8deadSopenharmony_ci                               vec2 dPdx, vec2 dPdy,
6515bd8deadSopenharmony_ci                               out float texel);
6525bd8deadSopenharmony_ci      int sparseTextureGradEXT(gsamplerCubeArray sampler, vec4 P,
6535bd8deadSopenharmony_ci                               vec3 dPdx, vec3 dPdy,
6545bd8deadSopenharmony_ci                               out gvec4 texel);
6555bd8deadSopenharmony_ci
6565bd8deadSopenharmony_ci    Description:
6575bd8deadSopenharmony_ci
6585bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureGrad(), but return texture
6595bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
6605bd8deadSopenharmony_ci    result in the out parameter <texel>.
6615bd8deadSopenharmony_ci
6625bd8deadSopenharmony_ci    --
6635bd8deadSopenharmony_ci
6645bd8deadSopenharmony_ci    Syntax:
6655bd8deadSopenharmony_ci
6665bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(gsampler2D sampler, vec2 P,
6675bd8deadSopenharmony_ci                                    vec2 dPdx, vec2 dPdy, float lodClamp,
6685bd8deadSopenharmony_ci                                    out gvec4 texel);
6695bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(gsampler3D sampler, vec3 P,
6705bd8deadSopenharmony_ci                                    vec3 dPdx, vec3 dPdy, float lodClamp,
6715bd8deadSopenharmony_ci                                    out gvec4 texel);
6725bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(gsamplerCube sampler, vec3 P,
6735bd8deadSopenharmony_ci                                    vec3 dPdx, vec3 dPdy, float lodClamp,
6745bd8deadSopenharmony_ci                                    out gvec4 texel);
6755bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(sampler2DShadow sampler, vec3 P,
6765bd8deadSopenharmony_ci                                    vec2 dPdx, vec2 dPdy, float lodClamp,
6775bd8deadSopenharmony_ci                                    out float texel);
6785bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(samplerCubeShadow sampler, vec4 P,
6795bd8deadSopenharmony_ci                                    vec3 dPdx, vec3 dPdy, float lodClamp,
6805bd8deadSopenharmony_ci                                    out float texel);
6815bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(gsampler2DArray sampler, vec3 P,
6825bd8deadSopenharmony_ci                                    vec2 dPdx, vec2 dPdy, float lodClamp,
6835bd8deadSopenharmony_ci                                    out gvec4 texel);
6845bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(sampler2DArrayShadow sampler, vec4 P,
6855bd8deadSopenharmony_ci                                    vec2 dPdx, vec2 dPdy, float lodClamp,
6865bd8deadSopenharmony_ci                                    out float texel);
6875bd8deadSopenharmony_ci      int sparseTextureGradClampEXT(gsamplerCubeArray sampler, vec4 P,
6885bd8deadSopenharmony_ci                                    vec3 dPdx, vec3 dPdy, float lodClamp,
6895bd8deadSopenharmony_ci                                    out gvec4 texel);
6905bd8deadSopenharmony_ci
6915bd8deadSopenharmony_ci    Description:
6925bd8deadSopenharmony_ci
6935bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureGrad(), but return texture
6945bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
6955bd8deadSopenharmony_ci    result in the out parameter <texel>.  Additionally, clamp the
6965bd8deadSopenharmony_ci    automatically computed level of detail to be greater than or equal to
6975bd8deadSopenharmony_ci    <lodClamp>.
6985bd8deadSopenharmony_ci
6995bd8deadSopenharmony_ci    --
7005bd8deadSopenharmony_ci
7015bd8deadSopenharmony_ci    Syntax:
7025bd8deadSopenharmony_ci
7035bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsampler1D sampler, float P,
7045bd8deadSopenharmony_ci                                float dPdx, float dPdy, float lodClamp);
7055bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsampler2D sampler, vec2 P,
7065bd8deadSopenharmony_ci                                vec2 dPdx, vec2 dPdy, float lodClamp);
7075bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsampler3D sampler, vec3 P,
7085bd8deadSopenharmony_ci                                vec3 dPdx, vec3 dPdy, float lodClamp);
7095bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsamplerCube sampler, vec3 P,
7105bd8deadSopenharmony_ci                                vec3 dPdx, vec3 dPdy, float lodClamp);
7115bd8deadSopenharmony_ci      float textureGradClampEXT(sampler1DShadow sampler, vec3 P,
7125bd8deadSopenharmony_ci                                float dPdx, float dPdy, float lodClamp);
7135bd8deadSopenharmony_ci      float textureGradClampEXT(sampler2DShadow sampler, vec3 P,
7145bd8deadSopenharmony_ci                                vec2 dPdx, vec2 dPdy, float lodClamp);
7155bd8deadSopenharmony_ci      float textureGradClampEXT(samplerCubeShadow sampler, vec4 P,
7165bd8deadSopenharmony_ci                                vec3 dPdx, vec3 dPdy, float lodClamp);
7175bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsampler1DArray sampler, vec2 P,
7185bd8deadSopenharmony_ci                                float dPdx, float dPdy, float lodClamp);
7195bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsampler2DArray sampler, vec3 P,
7205bd8deadSopenharmony_ci                                vec2 dPdx, vec2 dPdy, float lodClamp);
7215bd8deadSopenharmony_ci      float textureGradClampEXT(sampler1DArrayShadow sampler, vec3 P,
7225bd8deadSopenharmony_ci                                float dPdx, float dPdy, float lodClamp);
7235bd8deadSopenharmony_ci      float textureGradClampEXT(sampler2DArrayShadow sampler, vec4 P,
7245bd8deadSopenharmony_ci                                vec2 dPdx, vec2 dPdy, float lodClamp);
7255bd8deadSopenharmony_ci      gvec4 textureGradClampEXT(gsamplerCubeArray sampler, vec4 P,
7265bd8deadSopenharmony_ci                                vec3 dPdx, vec3 dPdy, float lodClamp);
7275bd8deadSopenharmony_ci
7285bd8deadSopenharmony_ci    Description:
7295bd8deadSopenharmony_ci
7305bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureGrad(), but clamp the
7315bd8deadSopenharmony_ci    automatically computed level of detail to be greater than or equal to
7325bd8deadSopenharmony_ci    <lodClamp>.
7335bd8deadSopenharmony_ci
7345bd8deadSopenharmony_ci    --
7355bd8deadSopenharmony_ci
7365bd8deadSopenharmony_ci    Syntax:
7375bd8deadSopenharmony_ci
7385bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(gsampler2D sampler, vec2 P,
7395bd8deadSopenharmony_ci                                     vec2 dPdx, vec2 dPdy, ivec2 offset,
7405bd8deadSopenharmony_ci                                     out gvec4 texel);
7415bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(gsampler3D sampler, vec3 P,
7425bd8deadSopenharmony_ci                                     vec3 dPdx, vec3 dPdy, ivec3 offset,
7435bd8deadSopenharmony_ci                                     out gvec4 texel);
7445bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(gsampler2DRect sampler, vec2 P,
7455bd8deadSopenharmony_ci                                     vec2 dPdx, vec2 dPdy, ivec2 offset,
7465bd8deadSopenharmony_ci                                     out gvec4 texel);
7475bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(sampler2DRectShadow sampler, vec3 P,
7485bd8deadSopenharmony_ci                                     vec2 dPdx, vec2 dPdy, ivec2 offset,
7495bd8deadSopenharmony_ci                                     out float texel);
7505bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(sampler2DShadow sampler, vec3 P,
7515bd8deadSopenharmony_ci                                     vec2 dPdx, vec2 dPdy, ivec2 offset,
7525bd8deadSopenharmony_ci                                     out float texel);
7535bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(gsampler2DArray sampler, vec3 P,
7545bd8deadSopenharmony_ci                                     vec2 dPdx, vec2 dPdy, ivec2 offset,
7555bd8deadSopenharmony_ci                                     out gvec4 texel);
7565bd8deadSopenharmony_ci      int sparseTextureGradOffsetEXT(sampler2DArrayShadow sampler, vec4 P,
7575bd8deadSopenharmony_ci                                     vec2 dPdx, vec2 dPdy, ivec2 offset,
7585bd8deadSopenharmony_ci                                     out float texel);
7595bd8deadSopenharmony_ci
7605bd8deadSopenharmony_ci    Description:
7615bd8deadSopenharmony_ci
7625bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureGradOffset(), but return texture
7635bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
7645bd8deadSopenharmony_ci    result in the out parameter <texel>.
7655bd8deadSopenharmony_ci
7665bd8deadSopenharmony_ci    --
7675bd8deadSopenharmony_ci
7685bd8deadSopenharmony_ci    Syntax:
7695bd8deadSopenharmony_ci
7705bd8deadSopenharmony_ci      int sparseTextureGradOffsetClampEXT(gsampler2D sampler, vec2 P,
7715bd8deadSopenharmony_ci                                          vec2 dPdx, vec2 dPdy, ivec2 offset,
7725bd8deadSopenharmony_ci                                          float lodClamp, out gvec4 texel);
7735bd8deadSopenharmony_ci      int sparseTextureGradOffsetClampEXT(gsampler3D sampler, vec3 P,
7745bd8deadSopenharmony_ci                                          vec3 dPdx, vec3 dPdy, ivec3 offset,
7755bd8deadSopenharmony_ci                                          float lodClamp, out gvec4 texel);
7765bd8deadSopenharmony_ci      int sparseTextureGradOffsetClampEXT(sampler2DShadow sampler, vec3 P,
7775bd8deadSopenharmony_ci                                          vec2 dPdx, vec2 dPdy, ivec2 offset,
7785bd8deadSopenharmony_ci                                          float lodClamp, out float texel);
7795bd8deadSopenharmony_ci      int sparseTextureGradOffsetClampEXT(gsampler2DArray sampler, vec3 P,
7805bd8deadSopenharmony_ci                                          vec2 dPdx, vec2 dPdy, ivec2 offset,
7815bd8deadSopenharmony_ci                                          float lodClamp, out gvec4 texel);
7825bd8deadSopenharmony_ci      int sparseTextureGradOffsetClampEXT(sampler2DArrayShadow sampler, vec4 P,
7835bd8deadSopenharmony_ci                                          vec2 dPdx, vec2 dPdy, ivec2 offset,
7845bd8deadSopenharmony_ci                                          float lodClamp, out float texel);
7855bd8deadSopenharmony_ci
7865bd8deadSopenharmony_ci    Description:
7875bd8deadSopenharmony_ci
7885bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureGradOffset(), but return texture
7895bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
7905bd8deadSopenharmony_ci    result in the out parameter <texel>.  Additionally, clamp the
7915bd8deadSopenharmony_ci    automatically computed level of detail to be greater than or equal to
7925bd8deadSopenharmony_ci    <lodClamp>.
7935bd8deadSopenharmony_ci
7945bd8deadSopenharmony_ci    --
7955bd8deadSopenharmony_ci
7965bd8deadSopenharmony_ci    Syntax:
7975bd8deadSopenharmony_ci
7985bd8deadSopenharmony_ci      gvec4 textureGradOffsetClampEXT(gsampler1D sampler, float P,
7995bd8deadSopenharmony_ci                                      float dPdx, float dPdy, int offset,
8005bd8deadSopenharmony_ci                                      float lodClamp);
8015bd8deadSopenharmony_ci      gvec4 textureGradOffsetClampEXT(gsampler2D sampler, vec2 P,
8025bd8deadSopenharmony_ci                                      vec2 dPdx, vec2 dPdy, ivec2 offset,
8035bd8deadSopenharmony_ci                                      float lodClamp);
8045bd8deadSopenharmony_ci      gvec4 textureGradOffsetClampEXT(gsampler3D sampler, vec3 P,
8055bd8deadSopenharmony_ci                                      vec3 dPdx, vec3 dPdy, ivec3 offset,
8065bd8deadSopenharmony_ci                                      float lodClamp);
8075bd8deadSopenharmony_ci      float textureGradOffsetClampEXT(sampler1DShadow sampler, vec3 P,
8085bd8deadSopenharmony_ci                                      float dPdx, float dPdy, int offset,
8095bd8deadSopenharmony_ci                                      float lodClamp);
8105bd8deadSopenharmony_ci      float textureGradOffsetClampEXT(sampler2DShadow sampler, vec3 P,
8115bd8deadSopenharmony_ci                                      vec2 dPdx, vec2 dPdy, ivec2 offset,
8125bd8deadSopenharmony_ci                                      float lodClamp);
8135bd8deadSopenharmony_ci      gvec4 textureGradOffsetClampEXT(gsampler1DArray sampler, vec2 P,
8145bd8deadSopenharmony_ci                                      float dPdx, float dPdy, int offset,
8155bd8deadSopenharmony_ci                                      float lodClamp);
8165bd8deadSopenharmony_ci      gvec4 textureGradOffsetClampEXT(gsampler2DArray sampler, vec3 P,
8175bd8deadSopenharmony_ci                                      vec2 dPdx, vec2 dPdy, ivec2 offset,
8185bd8deadSopenharmony_ci                                      float lodClamp);
8195bd8deadSopenharmony_ci      float textureGradOffsetClampEXT(sampler1DArrayShadow sampler, vec3 P,
8205bd8deadSopenharmony_ci                                      float dPdx, float dPdy, int offset,
8215bd8deadSopenharmony_ci                                      float lodClamp);
8225bd8deadSopenharmony_ci      float textureGradOffsetClampEXT(sampler2DArrayShadow sampler, vec4 P,
8235bd8deadSopenharmony_ci                                      vec2 dPdx, vec2 dPdy, ivec2 offset,
8245bd8deadSopenharmony_ci                                      float lodClamp);
8255bd8deadSopenharmony_ci
8265bd8deadSopenharmony_ci    Description:
8275bd8deadSopenharmony_ci
8285bd8deadSopenharmony_ci    Do a filtered texture lookup as in textureGrad(), but clamp the
8295bd8deadSopenharmony_ci    automatically computed level of detail to be greater than or equal to
8305bd8deadSopenharmony_ci    <lodClamp>.
8315bd8deadSopenharmony_ci
8325bd8deadSopenharmony_ci
8335bd8deadSopenharmony_ci    Modify Section 8.9.3, Texel Gather Functions, p. 161
8345bd8deadSopenharmony_ci
8355bd8deadSopenharmony_ci    (insert new lookup function table cells, at the end of the section,
8365bd8deadSopenharmony_ci    p. 163)
8375bd8deadSopenharmony_ci
8385bd8deadSopenharmony_ci    Syntax:
8395bd8deadSopenharmony_ci
8405bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsampler2D sampler, vec2 P,
8415bd8deadSopenharmony_ci                                 out gvec4 texel [, int comp]);
8425bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsampler2DArray sampler, vec3 P,
8435bd8deadSopenharmony_ci                                 out gvec4 texel [, int comp]);
8445bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsamplerCube sampler, vec3 P,
8455bd8deadSopenharmony_ci                                 out gvec4 texel [, int comp]);
8465bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsamplerCubeArray sampler, vec4 P,
8475bd8deadSopenharmony_ci                                 out gvec4 texel [, int comp]);
8485bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsampler2DRect sampler, vec2 P,
8495bd8deadSopenharmony_ci                                 out gvec4 texel [, int comp]);
8505bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsampler2DShadow sampler, vec2 P,
8515bd8deadSopenharmony_ci                                 float refZ, out vec4 texel);
8525bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsampler2DArrayShadow sampler, vec3 P,
8535bd8deadSopenharmony_ci                                 float refZ, out vec4 texel);
8545bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsamplerCubeShadow sampler, vec3 P,
8555bd8deadSopenharmony_ci                                 float refZ, out vec4 texel);
8565bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsamplerCubeArrayShadow sampler, vec4 P,
8575bd8deadSopenharmony_ci                                 float refZ, out vec4 texel);
8585bd8deadSopenharmony_ci      int sparseTextureGatherEXT(gsampler2DRectShadow sampler, vec2 P,
8595bd8deadSopenharmony_ci                                 float refZ, out vec4 texel);
8605bd8deadSopenharmony_ci
8615bd8deadSopenharmony_ci    Description:
8625bd8deadSopenharmony_ci
8635bd8deadSopenharmony_ci    Do a texture gather operation as in textureGather(), but return texture
8645bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
8655bd8deadSopenharmony_ci    result in the out parameter <texel>.
8665bd8deadSopenharmony_ci
8675bd8deadSopenharmony_ci    --
8685bd8deadSopenharmony_ci
8695bd8deadSopenharmony_ci    Syntax:
8705bd8deadSopenharmony_ci
8715bd8deadSopenharmony_ci      int sparseTextureGatherOffsetEXT(gsampler2D sampler, vec2 P,
8725bd8deadSopenharmony_ci                                       ivec2 offset, out gvec4 texel
8735bd8deadSopenharmony_ci                                       [, int comp]);
8745bd8deadSopenharmony_ci      int sparseTextureGatherOffsetEXT(gsampler2DArray sampler, vec3 P,
8755bd8deadSopenharmony_ci                                       ivec2 offset, out gvec4 texel
8765bd8deadSopenharmony_ci                                       [, int comp]);
8775bd8deadSopenharmony_ci      int sparseTextureGatherOffsetEXT(gsampler2DRect sampler, vec2 P,
8785bd8deadSopenharmony_ci                                       ivec2 offset, out gvec4 texel
8795bd8deadSopenharmony_ci                                       [, int comp]);
8805bd8deadSopenharmony_ci      int sparseTextureGatherOffsetEXT(gsampler2DShadow sampler, vec2 P,
8815bd8deadSopenharmony_ci                                       float refZ, ivec2 offset,
8825bd8deadSopenharmony_ci                                       out vec4 texel);
8835bd8deadSopenharmony_ci      int sparseTextureGatherOffsetEXT(gsampler2DArrayShadow sampler, vec3 P,
8845bd8deadSopenharmony_ci                                       float refZ, ivec2 offset,
8855bd8deadSopenharmony_ci                                       out vec4 texel);
8865bd8deadSopenharmony_ci      int sparseTextureGatherOffsetEXT(gsampler2DRectShadow sampler, vec2 P,
8875bd8deadSopenharmony_ci                                       float refZ, ivec2 offset,
8885bd8deadSopenharmony_ci                                       out vec4 texel);
8895bd8deadSopenharmony_ci
8905bd8deadSopenharmony_ci    Description:
8915bd8deadSopenharmony_ci
8925bd8deadSopenharmony_ci    Do a texture gather operation as in textureGatherOffset(), but return
8935bd8deadSopenharmony_ci    texture access residency information from the function and the filtered
8945bd8deadSopenharmony_ci    lookup result in the out parameter <texel>.
8955bd8deadSopenharmony_ci
8965bd8deadSopenharmony_ci    --
8975bd8deadSopenharmony_ci
8985bd8deadSopenharmony_ci    Syntax:
8995bd8deadSopenharmony_ci
9005bd8deadSopenharmony_ci      int sparseTextureGatherOffsetsEXT(gsampler2D sampler, vec2 P,
9015bd8deadSopenharmony_ci                                        ivec2 offsets[4], out gvec4 texel
9025bd8deadSopenharmony_ci                                        [, int comp]);
9035bd8deadSopenharmony_ci      int sparseTextureGatherOffsetsEXT(gsampler2DArray sampler, vec3 P,
9045bd8deadSopenharmony_ci                                        ivec2 offsets[4], out gvec4 texel
9055bd8deadSopenharmony_ci                                        [, int comp]);
9065bd8deadSopenharmony_ci      int sparseTextureGatherOffsetsEXT(gsampler2DRect sampler, vec2 P,
9075bd8deadSopenharmony_ci                                        ivec2 offsets[4], out gvec4 texel
9085bd8deadSopenharmony_ci                                        [, int comp]);
9095bd8deadSopenharmony_ci      int sparseTextureGatherOffsetsEXT(gsampler2DShadow sampler, vec2 P,
9105bd8deadSopenharmony_ci                                        float refZ, ivec2 offsets[4],
9115bd8deadSopenharmony_ci                                        out vec4 texel);
9125bd8deadSopenharmony_ci      int sparseTextureGatherOffsetsEXT(gsampler2DArrayShadow sampler, vec3 P,
9135bd8deadSopenharmony_ci                                        float refZ, ivec2 offsets[4],
9145bd8deadSopenharmony_ci                                        out vec4 texel);
9155bd8deadSopenharmony_ci      int sparseTextureGatherOffsetsEXT(gsampler2DRectShadow sampler, vec2 P,
9165bd8deadSopenharmony_ci                                        float refZ, ivec2 offsets[4],
9175bd8deadSopenharmony_ci                                        out vec4 texel);
9185bd8deadSopenharmony_ci
9195bd8deadSopenharmony_ci    Description:
9205bd8deadSopenharmony_ci
9215bd8deadSopenharmony_ci    Do a texture gather operation as in textureGatherOffset(), but return
9225bd8deadSopenharmony_ci    texture access residency information from the function and the filtered
9235bd8deadSopenharmony_ci    lookup result in the out parameter <texel>.
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ci
9265bd8deadSopenharmony_ci    Add to the end of Section 8.12, Image Functions, p. 167
9275bd8deadSopenharmony_ci
9285bd8deadSopenharmony_ci    (insert new lookup function table cells, at the end of the section,
9295bd8deadSopenharmony_ci    p. 170)
9305bd8deadSopenharmony_ci
9315bd8deadSopenharmony_ci    Syntax:
9325bd8deadSopenharmony_ci
9335bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimage2D image, ivec2 P,
9345bd8deadSopenharmony_ci                             out gvec4 texel);
9355bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimage3D image, ivec3 P,
9365bd8deadSopenharmony_ci                             out gvec4 texel);
9375bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimage2DRect image, ivec2 P,
9385bd8deadSopenharmony_ci                             out gvec4 texel);
9395bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimageCube image, ivec3 P,
9405bd8deadSopenharmony_ci                             out gvec4 texel);
9415bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimage2DArray image, ivec3 P,
9425bd8deadSopenharmony_ci                             out gvec4 texel);
9435bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimageCubeArray image, ivec3 P,
9445bd8deadSopenharmony_ci                             out gvec4 texel);
9455bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimage2DMS image, ivec2 P, int sample,
9465bd8deadSopenharmony_ci                             out gvec4 texel);
9475bd8deadSopenharmony_ci      int sparseImageLoadEXT(gimage2DMSArray image, ivec3 P, int sample,
9485bd8deadSopenharmony_ci                             out gvec4 texel);
9495bd8deadSopenharmony_ci
9505bd8deadSopenharmony_ci    Description:
9515bd8deadSopenharmony_ci
9525bd8deadSopenharmony_ci    Loads a texel from the image <image> as in imageLoad(), but return texture
9535bd8deadSopenharmony_ci    access residency information from the function and the filtered lookup
9545bd8deadSopenharmony_ci    result in the out parameter <texel>.
9555bd8deadSopenharmony_ci
9565bd8deadSopenharmony_ci
9575bd8deadSopenharmony_ci    Add to the end of Section 8.17, Shader Memory Control Functions, p. 178
9585bd8deadSopenharmony_ci
9595bd8deadSopenharmony_ci    Many of the built-in texture lookup functions in sections 8.9.2 and 8.9.3
9605bd8deadSopenharmony_ci    and the sparseImageLoad() function in section 8.12 can be used to return
9615bd8deadSopenharmony_ci    sparse texture residency information in addition to texel values.  In
9625bd8deadSopenharmony_ci    these functions, the sparse texture residency information is returned by
9635bd8deadSopenharmony_ci    the function as an integer and the texel values are returned in the output
9645bd8deadSopenharmony_ci    parameter <texel>.  The residency information can be interpreted by a
9655bd8deadSopenharmony_ci    built-in function to determine if the lookup accessed any uncommitted
9665bd8deadSopenharmony_ci    texels.
9675bd8deadSopenharmony_ci
9685bd8deadSopenharmony_ci    Syntax:
9695bd8deadSopenharmony_ci
9705bd8deadSopenharmony_ci      bool sparseTexelsResidentEXT(int code);
9715bd8deadSopenharmony_ci
9725bd8deadSopenharmony_ci    Description:
9735bd8deadSopenharmony_ci
9745bd8deadSopenharmony_ci      Returns false if any of the texels accessed by the sparse texture lookup
9755bd8deadSopenharmony_ci      generating <code> were in uncommitted texture memory, and true
9765bd8deadSopenharmony_ci      otherwise.
9775bd8deadSopenharmony_ci
9785bd8deadSopenharmony_ci
9795bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications
9805bd8deadSopenharmony_ci
9815bd8deadSopenharmony_ci    None.
9825bd8deadSopenharmony_ci
9835bd8deadSopenharmony_ciErrors
9845bd8deadSopenharmony_ci
9855bd8deadSopenharmony_ci    None.
9865bd8deadSopenharmony_ci
9875bd8deadSopenharmony_ciNew State
9885bd8deadSopenharmony_ci
9895bd8deadSopenharmony_ci    None.
9905bd8deadSopenharmony_ci
9915bd8deadSopenharmony_ciNew Implementation Dependent State
9925bd8deadSopenharmony_ci
9935bd8deadSopenharmony_ci    None.
9945bd8deadSopenharmony_ci
9955bd8deadSopenharmony_ciDependencies on OpenGL ES 3.1
9965bd8deadSopenharmony_ci
9975bd8deadSopenharmony_ci    Replace references to ARB_sparse_texture with references to
9985bd8deadSopenharmony_ci    EXT_sparse_texture, in particular functions and enums introduced by
9995bd8deadSopenharmony_ci    EXT_sparse_texture will carry EXT suffixes.
10005bd8deadSopenharmony_ci
10015bd8deadSopenharmony_ci    If implemented on OpenGL ES 3.1, remove all references to 1D and
10025bd8deadSopenharmony_ci    rectangle textures and their respective texture targets (TEXTURE_1D
10035bd8deadSopenharmony_ci    and TEXTURE_RECTANGLE). Also ignore the corresponding sampler
10045bd8deadSopenharmony_ci    built-ins thereof: 'gsampler1D', 'gsampler2DRect' and
10055bd8deadSopenharmony_ci    'gsampler2DRectShadow'. Do not introduce overloads of
10065bd8deadSopenharmony_ci    sparseTexture*EXT, texture*ClampEXT or sparseTexelFetchEXT for these
10075bd8deadSopenharmony_ci    sampler types.
10085bd8deadSopenharmony_ci
10095bd8deadSopenharmony_ci    Do not introduce sparseImageLoadEXT overloads of gimageRect,
10105bd8deadSopenharmony_ci    gimage2D, gimage2DArray, gimage2DMS and gimage2DArrayMS.
10115bd8deadSopenharmony_ci
10125bd8deadSopenharmony_ciDependencies on EXT_texture_norm16
10135bd8deadSopenharmony_ci
10145bd8deadSopenharmony_ci    If implemented on OpenGL ES 3.1 and EXT_texture_norm16 is not
10155bd8deadSopenharmony_ci    supported ignore all references to R16, RG16, RGBA16, R16_SNORM,
10165bd8deadSopenharmony_ci    RG16_SNORM and RGBA16_SNORM. If EXT_texture_norm16 is supported,
10175bd8deadSopenharmony_ci    these enums are suffixed by _EXT.
10185bd8deadSopenharmony_ci
10195bd8deadSopenharmony_ciDependencies on EXT_texture_cube_map_array and OES_texture_cube_map_array
10205bd8deadSopenharmony_ci
10215bd8deadSopenharmony_ci    If implemented on OpenGL ES 3.1 and neither EXT_texture_cube_map_array
10225bd8deadSopenharmony_ci    nor OES_texture_cube_map_array is supported, ignore all references to
10235bd8deadSopenharmony_ci    texture sampler types 'gsamplerCubeArray' and 'gsamplerCubeArrayShadow'.
10245bd8deadSopenharmony_ci    Do not introduce overloads of sparseTexture*EXT, texture*ClampEXT or
10255bd8deadSopenharmony_ci    sparseTexelFetchEXT for these sampler types. Remove references to
10265bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY.
10275bd8deadSopenharmony_ci
10285bd8deadSopenharmony_ciDependencies on OES_texture_storage_multisample_2D_array
10295bd8deadSopenharmony_ci
10305bd8deadSopenharmony_ci    If implemented on OpenGL ES 3.1 and OES_texture_storage_-
10315bd8deadSopenharmony_ci    multisample_2D_array is not supported, ignore all references to
10325bd8deadSopenharmony_ci    texture sampler types 'gsampler2DMS' and 'gsampler2DMSArray'. Do not
10335bd8deadSopenharmony_ci    introduce overloads of sparseTexture*EXT, texture*ClampEXT or
10345bd8deadSopenharmony_ci    sparseTexelFetchEXT for these sampler types. Remove references to
10355bd8deadSopenharmony_ci    TEXTURE_2D_MULTISAMPLE_ARRAY.
10365bd8deadSopenharmony_ci
10375bd8deadSopenharmony_ciDependencies on EXT_gpu_shader5 and OES_gpu_shader5
10385bd8deadSopenharmony_ci
10395bd8deadSopenharmony_ci    If implemented on OpenGL GLSL ES 3.1 and neither EXT_gpu_shader5 nor
10405bd8deadSopenharmony_ci    OES_gpu_shader5 is supported, do not introduce
10415bd8deadSopenharmony_ci    sparseTextureGatherOffsetsEXT.
10425bd8deadSopenharmony_ci
10435bd8deadSopenharmony_ciDependencies on EXT_depth_bounds_test
10445bd8deadSopenharmony_ci
10455bd8deadSopenharmony_ci    If EXT_depth_bounds_test is not supported, references to the depth bounds
10465bd8deadSopenharmony_ci    test should be removed.
10475bd8deadSopenharmony_ci
10485bd8deadSopenharmony_ciDependencies on NV_gpu_program4 and NV_gpu_program5
10495bd8deadSopenharmony_ci
10505bd8deadSopenharmony_ci    Modify Section 2.X.2, Program Grammar
10515bd8deadSopenharmony_ci
10525bd8deadSopenharmony_ci    <opModifier>            ::= "SPARSE"
10535bd8deadSopenharmony_ci                              | "LODCLAMP"
10545bd8deadSopenharmony_ci
10555bd8deadSopenharmony_ci    <ccMaskRule>            ::= "RESIDENT"
10565bd8deadSopenharmony_ci                              | "NONRESIDENT"
10575bd8deadSopenharmony_ci
10585bd8deadSopenharmony_ci    Modify Section 2.X.3.7, Program Condition Code Registers
10595bd8deadSopenharmony_ci
10605bd8deadSopenharmony_ci    (modify the first paragraph)
10615bd8deadSopenharmony_ci
10625bd8deadSopenharmony_ci    There are two general-purpose four-component condition code registers (CC0
10635bd8deadSopenharmony_ci    and CC1), where each component of this register is a collection of
10645bd8deadSopenharmony_ci    single-bit flags, including a sign flag (SF), a zero flag (ZF), an
10655bd8deadSopenharmony_ci    overflow flag (OF), and a carry flag (CF).  The values of these registers
10665bd8deadSopenharmony_ci    are undefined at the beginning of program execution.  Additionally, there
10675bd8deadSopenharmony_ci    is a special single-component sparse memory condition code register that
10685bd8deadSopenharmony_ci    holds the status of the most recently executed texture or image load
10695bd8deadSopenharmony_ci    instruction using the "SPARSE" opcode modifier.  This condition code
10705bd8deadSopenharmony_ci    includes a resident flag (RESF) indicating whether all memory accessed by
10715bd8deadSopenharmony_ci    the instruction was populated.
10725bd8deadSopenharmony_ci
10735bd8deadSopenharmony_ci    Modify Section 2.X.4.1, Program Instruction Modifiers
10745bd8deadSopenharmony_ci
10755bd8deadSopenharmony_ci    (Update the discussion of instruction precision modifiers.  If
10765bd8deadSopenharmony_ci     GL_NV_gpu_program_fp64 is not found in the extension string, the "F64"
10775bd8deadSopenharmony_ci     instruction modifier described below is not supported.)
10785bd8deadSopenharmony_ci
10795bd8deadSopenharmony_ci    (add to Table X.14 of the NV_gpu_program4 specification.)
10805bd8deadSopenharmony_ci
10815bd8deadSopenharmony_ci      Modifier  Description
10825bd8deadSopenharmony_ci      --------  ------------------------------------------------------
10835bd8deadSopenharmony_ci      SPARSE    Update the sparse memory condition code with status on
10845bd8deadSopenharmony_ci                whether the memory accessed by a texture or image load
10855bd8deadSopenharmony_ci                instruction was fully populated.
10865bd8deadSopenharmony_ci
10875bd8deadSopenharmony_ci      LODCLAMP  Clamp the LOD used by texture lookups to a specified
10885bd8deadSopenharmony_ci                value
10895bd8deadSopenharmony_ci
10905bd8deadSopenharmony_ci    For texture fetch, surface load, and surface atomic instructions, the
10915bd8deadSopenharmony_ci    "SPARSE" modifier specifies that the sparse memory condition code
10925bd8deadSopenharmony_ci    described in Section 2.X.3.7 should be updated to reflect whether the
10935bd8deadSopenharmony_ci    memory accessed by the instruction was fully populated.
10945bd8deadSopenharmony_ci
10955bd8deadSopenharmony_ci    For texture fetch instructions with implicit LOD calcuations (TEX, TXB,
10965bd8deadSopenharmony_ci    TXD), the "LODCLAMP" modifier specifies that the instruction includes an
10975bd8deadSopenharmony_ci    extra floating-point component indicating a minimum level of detail to be
10985bd8deadSopenharmony_ci    used for the texture lookup.  If the implicitly computed level of detail
10995bd8deadSopenharmony_ci    is less than the level of detail provided in the instruction data, that
11005bd8deadSopenharmony_ci    level should be used instead.
11015bd8deadSopenharmony_ci
11025bd8deadSopenharmony_ci    Modify Section 2.X.4.3, Program Destination Variable Update
11035bd8deadSopenharmony_ci
11045bd8deadSopenharmony_ci    (add to Table X.16, Condition Code Tests)
11055bd8deadSopenharmony_ci
11065bd8deadSopenharmony_ci         mask rule         test name                condition
11075bd8deadSopenharmony_ci         ---------------   ----------------------   -----------------
11085bd8deadSopenharmony_ci         RESIDENT          sparse resident          RESF
11095bd8deadSopenharmony_ci         NONRESIDENT       sparse nonresident       !RESF
11105bd8deadSopenharmony_ci
11115bd8deadSopenharmony_ci    (also modify the table description)
11125bd8deadSopenharmony_ci
11135bd8deadSopenharmony_ci      Table X.16, Condition Code Tests.  The allowed rules are specified in
11145bd8deadSopenharmony_ci      the "mask rule" column.  For "RESIDENT" or "NONRESIDENT", all four
11155bd8deadSopenharmony_ci      components of the test result are loaded from the RESF flag of the
11165bd8deadSopenharmony_ci      sparse condition code.  Otherwise, If "0" or "1" is appended ...
11175bd8deadSopenharmony_ci
11185bd8deadSopenharmony_ci    (modify the paragraph about condition code updates)
11195bd8deadSopenharmony_ci
11205bd8deadSopenharmony_ci    A program instruction can also optionally update one of the two general
11215bd8deadSopenharmony_ci    condition code registers ...
11225bd8deadSopenharmony_ci
11235bd8deadSopenharmony_ci    (add a new paragraph about updating CCSPARSE)
11245bd8deadSopenharmony_ci
11255bd8deadSopenharmony_ci    Additionally, a program instruction accessing memory can optionally update
11265bd8deadSopenharmony_ci    the sparse memory condition code register if the "SPARSE" instruction
11275bd8deadSopenharmony_ci    modifier is specified.  If the memory accessed by the instruction was
11285bd8deadSopenharmony_ci    fully populated, the resident flag (RESF) is set; otherwise, RESF is
11295bd8deadSopenharmony_ci    cleared.
11305bd8deadSopenharmony_ci
11315bd8deadSopenharmony_ci    Modify Section 2.X.4.4, Program Texture Access
11325bd8deadSopenharmony_ci
11335bd8deadSopenharmony_ci    (modify the prototype of the TextureSample utility function, adding
11345bd8deadSopenharmony_ci     <coord2> and removing <lod>)
11355bd8deadSopenharmony_ci
11365bd8deadSopenharmony_ci      result_t_vec
11375bd8deadSopenharmony_ci        TextureSample(float_vec coord, float_vec coord2,
11385bd8deadSopenharmony_ci                      float_vec ddx, float_vec ddy, int_vec offset);
11395bd8deadSopenharmony_ci
11405bd8deadSopenharmony_ci    (modify the description of <coord> to add <coord2>)
11415bd8deadSopenharmony_ci
11425bd8deadSopenharmony_ci    <coord> and <coord2> are two four-component floating-point vectors from
11435bd8deadSopenharmony_ci    which the (s,t,r) texture coordinates used for the texture access, the
11445bd8deadSopenharmony_ci    layer used for array textures, and the reference value used for depth
11455bd8deadSopenharmony_ci    comparisons (section 3.8.14) are extracted according to Table X.17. ...
11465bd8deadSopenharmony_ci
11475bd8deadSopenharmony_ci    (replace the paragraph discussing <lod>)
11485bd8deadSopenharmony_ci
11495bd8deadSopenharmony_ci    <ddx> and <ddy> specify partial derivatives (ds/dx, dt/dx, dr/dx, ds/dy,
11505bd8deadSopenharmony_ci    dt/dy, and dr/dy) for the texture coordinates, and may be used for level
11515bd8deadSopenharmony_ci    of detail calculations and to derive footprint shapes for anisotropic
11525bd8deadSopenharmony_ci    texture filtering.
11535bd8deadSopenharmony_ci
11545bd8deadSopenharmony_ci    The level of detail used for the texture lookup is a function of the
11555bd8deadSopenharmony_ci    texture instruction type, texture target, LODCLAMP qualifier, and the
11565bd8deadSopenharmony_ci    inputs <ddx> and <ddy>.  For TEX, TXB, TXD, and TXP instructions in a base
11575bd8deadSopenharmony_ci    level of detail is computed based on the partial derivatives <ddx> and
11585bd8deadSopenharmony_ci    <ddy>.  For the TXB and TXL instruction, an additional level of detail
11595bd8deadSopenharmony_ci    value is taken from the component in <coord> or <coord2> identified by the
11605bd8deadSopenharmony_ci    first entry in the "lod" column of Table X.17.  For TXB, this value is
11615bd8deadSopenharmony_ci    added to the computed base level of detail; for TXL, it specifies the base
11625bd8deadSopenharmony_ci    level of detail.  After that, per-texture and per-texture unit LOD biases
11635bd8deadSopenharmony_ci    are added to the level of detail.  Finally, if the LODCLAMP opcode
11645bd8deadSopenharmony_ci    modifier is specified, an LOD clamp value is extracted from <coord> or
11655bd8deadSopenharmony_ci    <coord2> according to the second entry in the "lod" column of Table X.17.
11665bd8deadSopenharmony_ci    The computed level of detail is clamped to be greater than or equal to
11675bd8deadSopenharmony_ci    this LOD clamp value.
11685bd8deadSopenharmony_ci
11695bd8deadSopenharmony_ci                                                     coordinates used
11705bd8deadSopenharmony_ci      texTarget          Texture Type               s t r lay shd  lod
11715bd8deadSopenharmony_ci      ----------------   ---------------------      ----- --- ---  -----
11725bd8deadSopenharmony_ci      1D                 TEXTURE_1D                 x - -  -   -   w,x2
11735bd8deadSopenharmony_ci      2D                 TEXTURE_2D                 x y -  -   -   w,x2
11745bd8deadSopenharmony_ci      3D                 TEXTURE_3D                 x y z  -   -   w,x2
11755bd8deadSopenharmony_ci      CUBE               TEXTURE_CUBE_MAP           x y z  -   -   w,x2
11765bd8deadSopenharmony_ci      RECT               TEXTURE_RECTANGLE_ARB      x y -  -   -   -,-
11775bd8deadSopenharmony_ci      ARRAY1D            TEXTURE_1D_ARRAY_EXT       x - -  y   -   w,x2
11785bd8deadSopenharmony_ci      ARRAY2D            TEXTURE_2D_ARRAY_EXT       x y -  z   -   w,x2
11795bd8deadSopenharmony_ci      ARRAYCUBE          TEXTURE_CUBE_MAP_ARRAY     x y z  w   -   x2,y2
11805bd8deadSopenharmony_ci      SHADOW1D           TEXTURE_1D                 x - -  -   z   w,x2
11815bd8deadSopenharmony_ci      SHADOW2D           TEXTURE_2D                 x y -  -   z   w,x2
11825bd8deadSopenharmony_ci      SHADOWRECT         TEXTURE_RECTANGLE_ARB      x y -  -   z   -,-
11835bd8deadSopenharmony_ci      SHADOWCUBE         TEXTURE_CUBE_MAP           x y z  -   w   x2,y2
11845bd8deadSopenharmony_ci      SHADOWARRAY1D      TEXTURE_1D_ARRAY_EXT       x - -  y   z   w,x2
11855bd8deadSopenharmony_ci      SHADOWARRAY2D      TEXTURE_2D_ARRAY_EXT       x y -  z   w   -,x2
11865bd8deadSopenharmony_ci      SHADOWARRAYCUBE    TEXTURE_CUBE_MAP_ARRAY     x y z  w   x2  -,y2
11875bd8deadSopenharmony_ci      BUFFER             TEXTURE_BUFFER_EXT           <not supported>
11885bd8deadSopenharmony_ci      RENDERBUFFER       TEXTURE_RENDERBUFFER         <not supported>
11895bd8deadSopenharmony_ci      2DMS               TEXTURE_2D_MULTISAMPLE       <not supported>
11905bd8deadSopenharmony_ci      ARRAY2DMS          TEXTURE_2D_MULTISAMPLE_      <not supported>
11915bd8deadSopenharmony_ci                           ARRAY
11925bd8deadSopenharmony_ci
11935bd8deadSopenharmony_ci      Table X.17:  Texture types accessed for each of the <texTarget>, and
11945bd8deadSopenharmony_ci      coordinate mappings.  Components "x", "y", "z", and "w" are taken from
11955bd8deadSopenharmony_ci      the first coordinate vector <coord>; "x2" and "y2" are taken from the
11965bd8deadSopenharmony_ci      second vector <coord2>.  The "SHADOW" and "ARRAY" targets are special
11975bd8deadSopenharmony_ci      pseudo-targets described below.  The "coordinates used" column indicate
11985bd8deadSopenharmony_ci      the input values used for each coordinate of the texture lookup, the
11995bd8deadSopenharmony_ci      layer selector for array textures, the reference value for texture
12005bd8deadSopenharmony_ci      comparisons, and up to two components of level-of-detail information.
12015bd8deadSopenharmony_ci      Buffer textures are not supported by normal texture lookup functions,
12025bd8deadSopenharmony_ci      but are supported by TXF and TXQ, described below.  Renderbuffer and
12035bd8deadSopenharmony_ci      multisample textures are not supported by normal texture lookup
12045bd8deadSopenharmony_ci      functions, but are supported by TXFMS.  The TXB and TXL instructions are
12055bd8deadSopenharmony_ci      not supported for the targets SHADOWARRAY2D and SHADOWARRAYCUBE, so the
12065bd8deadSopenharmony_ci      first column of "lod" is ignored.
12075bd8deadSopenharmony_ci
12085bd8deadSopenharmony_ci    Modify Section 2.X.8.Z, TXD:  Texture Sample with Partials
12095bd8deadSopenharmony_ci
12105bd8deadSopenharmony_ci    ... The partial derivatives of the texture coordinates with respect to X
12115bd8deadSopenharmony_ci    and Y are specified by the second and third floating-point source vectors.
12125bd8deadSopenharmony_ci    If the LODCLAMP instruction modifier is specified, floating-point
12135bd8deadSopenharmony_ci    level-of-detail clamp value is specified in the <w> component of the third
12145bd8deadSopenharmony_ci    floating-point source vector.  The level of detail is computed
12155bd8deadSopenharmony_ci    automatically using the provided partial derivatives.
12165bd8deadSopenharmony_ci
12175bd8deadSopenharmony_ci
12185bd8deadSopenharmony_ciIssues
12195bd8deadSopenharmony_ci
12205bd8deadSopenharmony_ci    (1) How does this extension compare to the ARB_sparse_texture extension?
12215bd8deadSopenharmony_ci
12225bd8deadSopenharmony_ci      RESOLVED:  We extend the mechanisms provided by ARB_sparse_texture in
12235bd8deadSopenharmony_ci      several ways:
12245bd8deadSopenharmony_ci
12255bd8deadSopenharmony_ci        - We add built-in texture and image lookup functions returning
12265bd8deadSopenharmony_ci          information on memory accesses performed by the built-in functions;
12275bd8deadSopenharmony_ci          in particular, whether any uncommitted memory was referenced.
12285bd8deadSopenharmony_ci
12295bd8deadSopenharmony_ci        - We add built-in texture and image lookup functions clamping the
12305bd8deadSopenharmony_ci          final level of detail computed based on texture coordinates,
12315bd8deadSopenharmony_ci          derivatives, and LOD bias to a minimum LOD specified in the shader.
12325bd8deadSopenharmony_ci
12335bd8deadSopenharmony_ci        - We specify that all loads and atomics from uncommitted sparse memory
12345bd8deadSopenharmony_ci          behave as though zero were fetched.
12355bd8deadSopenharmony_ci
12365bd8deadSopenharmony_ci        - We remove the requirement that the base size of a sparse texture
12375bd8deadSopenharmony_ci          must be a multiple of the page size.  Implementations are expected
12385bd8deadSopenharmony_ci          to pad mipmap allocations internally to page size boundaries as
12395bd8deadSopenharmony_ci          required, until the tail is reached.
12405bd8deadSopenharmony_ci
12415bd8deadSopenharmony_ci        - We modify the definition of the sparse texture mipmap tail, so that
12425bd8deadSopenharmony_ci          all levels greater than or equal to the page size in all dimensions
12435bd8deadSopenharmony_ci          are guaranteed to be sparsely populated (i.e., not in the tail).
12445bd8deadSopenharmony_ci          The previous spec allowed implementations to put levels in the tail
12455bd8deadSopenharmony_ci          if they were not integer multiples of the page size.
12465bd8deadSopenharmony_ci
12475bd8deadSopenharmony_ci        - We add support for an implementation-independent virtual page size
12485bd8deadSopenharmony_ci          for some formats, instead of depending on querying
12495bd8deadSopenharmony_ci          implementation-dependent page size. For such formats, the default
12505bd8deadSopenharmony_ci          virtual page size index (0) is guaranteed to specify the standard
12515bd8deadSopenharmony_ci          page size.
12525bd8deadSopenharmony_ci
12535bd8deadSopenharmony_ci        - We require that all implementations of this extension return TRUE
12545bd8deadSopenharmony_ci          for the value of the implementation-dependent constant
12555bd8deadSopenharmony_ci          SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB, which removes some
12565bd8deadSopenharmony_ci          potential errors when allocating sparse array or cube map textures.
12575bd8deadSopenharmony_ci
12585bd8deadSopenharmony_ci        - We add support for sparse multisample and multisample array
12595bd8deadSopenharmony_ci          textures, but require no implementation-independent virtual page
12605bd8deadSopenharmony_ci          size.
12615bd8deadSopenharmony_ci
12625bd8deadSopenharmony_ci    (2) How does this extension compare to the AMD_sparse_texture extension?
12635bd8deadSopenharmony_ci
12645bd8deadSopenharmony_ci      RESOLVED:  This extension, like the AMD extension, provide built-in
12655bd8deadSopenharmony_ci      texture lookup functions returning information on whether uncommitted
12665bd8deadSopenharmony_ci      memory was accessed.  There are several differences between these
12675bd8deadSopenharmony_ci      functions:
12685bd8deadSopenharmony_ci
12695bd8deadSopenharmony_ci        - This extension uses an "EXT" suffix on built-in function names.
12705bd8deadSopenharmony_ci
12715bd8deadSopenharmony_ci        - This extension provides built-in functions supporting the sparse
12725bd8deadSopenharmony_ci          return information together with the new LOD clamp feature.
12735bd8deadSopenharmony_ci
12745bd8deadSopenharmony_ci        - This extension supports sparse accesses for shadow map sampler types
12755bd8deadSopenharmony_ci          (e.g., sampler2DShadow).
12765bd8deadSopenharmony_ci
12775bd8deadSopenharmony_ci        - This extension supports sparse variants of imageLoad(); the AMD
12785bd8deadSopenharmony_ci          extension does not.
12795bd8deadSopenharmony_ci
12805bd8deadSopenharmony_ci        - This extension doesn't attempt to support sparse variants of
12815bd8deadSopenharmony_ci          projective texture lookups to reduce the number of texture functions
12825bd8deadSopenharmony_ci          added.
12835bd8deadSopenharmony_ci
12845bd8deadSopenharmony_ci        - This extension doesn't attempt to support sparse variants of
12855bd8deadSopenharmony_ci          one-dimensional and one-dimensional array texture lookups.  Sparse
12865bd8deadSopenharmony_ci          textures with these targets are explicitly not supported in the ARB
12875bd8deadSopenharmony_ci          extension.
12885bd8deadSopenharmony_ci
12895bd8deadSopenharmony_ci        - This extension returns the texel data in an "out" parameter and
12905bd8deadSopenharmony_ci          returns a value consistent with sampling zero in any uncommitted
12915bd8deadSopenharmony_ci          texels.  The AMD extension returns the texel data in an "inout"
12925bd8deadSopenharmony_ci          parameter and guarantees not to write to the return value if any
12935bd8deadSopenharmony_ci          uncommitted texel is accessed.
12945bd8deadSopenharmony_ci
12955bd8deadSopenharmony_ci        - The function sparseTexelResident() from the AMD extension is renamed
12965bd8deadSopenharmony_ci          to sparseTexelsResidentEXT().  We use "texels" instead of "texel" in
12975bd8deadSopenharmony_ci          the function name because a texture lookup may access multiple
12985bd8deadSopenharmony_ci          texels, and the code will reflect non-resident status if any of the
12995bd8deadSopenharmony_ci          texels is non-resident.
13005bd8deadSopenharmony_ci
13015bd8deadSopenharmony_ci      The built-in functions taking an explicit LOD clamp, returning zero on
13025bd8deadSopenharmony_ci      reads from uncommitted memory, and the standard virtual page size are
13035bd8deadSopenharmony_ci      not provided by the AMD extension, either.
13045bd8deadSopenharmony_ci
13055bd8deadSopenharmony_ci      Neither this extension nor ARB_sparse_texture provide the minimum LOD
13065bd8deadSopenharmony_ci      warning feature provided by the AMD extension or the related built-in
13075bd8deadSopenharmony_ci      functions.
13085bd8deadSopenharmony_ci
13095bd8deadSopenharmony_ci    (3) How should the "sparse" built-in functions return both access status
13105bd8deadSopenharmony_ci        and a texel value?
13115bd8deadSopenharmony_ci
13125bd8deadSopenharmony_ci      RESOLVED:  We mostly followed the precedent of the AMD extension, where
13135bd8deadSopenharmony_ci      the sparse access status is returned as an integer and the texel values
13145bd8deadSopenharmony_ci      are returning in a vec4-typed "out" parameter.  (This differs slightly
13155bd8deadSopenharmony_ci      from the AMD extension in that it uses an "inout" parameter.)
13165bd8deadSopenharmony_ci
13175bd8deadSopenharmony_ci      We considered included returning the texel values from the function,
13185bd8deadSopenharmony_ci      just like normal texture lookups, and returning status in a separate
13195bd8deadSopenharmony_ci      "out" parameter (reversing the order).  We also considered returning a
13205bd8deadSopenharmony_ci      structure type containing both the status and the texel.  We ultimately
13215bd8deadSopenharmony_ci      chose to return the status code to more closely match the AMD extension
13225bd8deadSopenharmony_ci      and because we expect that shaders caring to use the "sparse" functions
13235bd8deadSopenharmony_ci      will want to look at the status code first.
13245bd8deadSopenharmony_ci
13255bd8deadSopenharmony_ci    (4) What data type should we use for the access status information
13265bd8deadSopenharmony_ci        returned by the "sparse" built-in functions?
13275bd8deadSopenharmony_ci
13285bd8deadSopenharmony_ci      RESOLVED:  We chose to follow the precedent of the AMD extension, where
13295bd8deadSopenharmony_ci      an integer code is returned.  Requiring a separate function call
13305bd8deadSopenharmony_ci      (sparseTexelsResidentEXT) is required to reason about the code returned
13315bd8deadSopenharmony_ci      is mildly annoying, but we didn't consider it serious enough to warrant
13325bd8deadSopenharmony_ci      a change.
13335bd8deadSopenharmony_ci
13345bd8deadSopenharmony_ci      We could have used a "bool" type instead, but chose to stick with "int"
13355bd8deadSopenharmony_ci      for compatibility and for possible future expansion.  The AMD extension
13365bd8deadSopenharmony_ci      also includes built-in functions sparseTexelMinLodWarning() and
13375bd8deadSopenharmony_ci      sparseTexelWarningFetch() that can be used to check the return code for
13385bd8deadSopenharmony_ci      other conditions not supported by this extension.  Shaders that only
13395bd8deadSopenharmony_ci      care about residency information can still check the status in a single
13405bd8deadSopenharmony_ci      (long) line:
13415bd8deadSopenharmony_ci
13425bd8deadSopenharmony_ci        if (!sparseTexelsResidentEXT(sparseTextureEXT(sampler, coords,
13435bd8deadSopenharmony_ci                                                      texel))
13445bd8deadSopenharmony_ci        {
13455bd8deadSopenharmony_ci          // do something about the failure
13465bd8deadSopenharmony_ci        }
13475bd8deadSopenharmony_ci
13485bd8deadSopenharmony_ci    (5) When using a "sparse" built-in texture function, what RGBA values are
13495bd8deadSopenharmony_ci        generated when the lookup accesses one or more uncommited texels?
13505bd8deadSopenharmony_ci
13515bd8deadSopenharmony_ci      RESOLVED:  We return a filtered result vector where memory for
13525bd8deadSopenharmony_ci      uncommitted texels is treated as being filled with zeroes.  The data
13535bd8deadSopenharmony_ci      vector returned by the "sparse" functions for this case should exactly
13545bd8deadSopenharmony_ci      match the vector returned by an equivalent non-"sparse" function.
13555bd8deadSopenharmony_ci
13565bd8deadSopenharmony_ci    (6) For "sparse" built-in texture functions, where should the <texel>
13575bd8deadSopenharmony_ci        return value go relative to other parameters?
13585bd8deadSopenharmony_ci
13595bd8deadSopenharmony_ci      RESOLVED:  We chose to follow the precedent of the AMD extension,
13605bd8deadSopenharmony_ci      putting it in (approximately) the last parameter.  Note that the
13615bd8deadSopenharmony_ci      optional <bias> parameter of texture() breaks this pattern; we chose to
13625bd8deadSopenharmony_ci      keep the optional bias at the end.
13635bd8deadSopenharmony_ci
13645bd8deadSopenharmony_ci      Other options considered included:  always first (before the sampler),
13655bd8deadSopenharmony_ci      always second (after the sampler), always third (after the sampler and
13665bd8deadSopenharmony_ci      the base coordinates).  For "always third", note there are a couple
13675bd8deadSopenharmony_ci      cases like shadow lookups in cube arrays where the coordinates are split
13685bd8deadSopenharmony_ci      across multiple parameters and "always third" would be awkward.
13695bd8deadSopenharmony_ci      Additional options are discussed in issue (3).
13705bd8deadSopenharmony_ci
13715bd8deadSopenharmony_ci    (7) Should we provide sparse variants of the "2DMS" and "2DMSArray"
13725bd8deadSopenharmony_ci        variants of texelFetch() and imageLoad() in this extension?
13735bd8deadSopenharmony_ci
13745bd8deadSopenharmony_ci      RESOLVED:  Yes.  ARB_sparse_texture doesn't support multisample
13755bd8deadSopenharmony_ci      textures.  In this extension, we lift this restriction, allow them to be
13765bd8deadSopenharmony_ci      accessed using normal built-ins, and provide new functions allowing
13775bd8deadSopenharmony_ci      shaders to determine if uncommitted memory was accessed.
13785bd8deadSopenharmony_ci
13795bd8deadSopenharmony_ci    (8) How does the feedback provided in the "sparse" built-in texture
13805bd8deadSopenharmony_ci        functions interact with texture filtering modes involving multiple
13815bd8deadSopenharmony_ci        texels?
13825bd8deadSopenharmony_ci
13835bd8deadSopenharmony_ci      RESOLVED:  The sparse texture lookup status will indicate that
13845bd8deadSopenharmony_ci      uncommitted memory was accessed if any texel read during the filtering
13855bd8deadSopenharmony_ci      operation was uncommitted, but will do so only if the filter weight is
13865bd8deadSopenharmony_ci      non-zero.  When applying a texture filter such as LINEAR_MIPMAP_LINEAR,
13875bd8deadSopenharmony_ci      it's possible that the interpolated texture coordinate lines up exactly
13885bd8deadSopenharmony_ci      at the center of a texel and/or exactly at an integer level of detail.
13895bd8deadSopenharmony_ci      According to the standard filtering equations, eight samples are taken
13905bd8deadSopenharmony_ci      -- four in each of two levels.  However, it's possible that only one of
13915bd8deadSopenharmony_ci      the eight samples has a non-zero weight (if the coordinates hit a texel
13925bd8deadSopenharmony_ci      center and the LOD is an integer).
13935bd8deadSopenharmony_ci
13945bd8deadSopenharmony_ci      This "non-zero weight" feature may be important for getting proper
13955bd8deadSopenharmony_ci      feedback in some cases, such as displaying a texture tile with an
13965bd8deadSopenharmony_ci      aligned 1:1 mapping of pixels to texels or forcing a specific level of
13975bd8deadSopenharmony_ci      detail in some cases.  Note that when attempting to apply a 1:1 mapping
13985bd8deadSopenharmony_ci      of pixels to texels via an interpolated texture attribute, it's possible
13995bd8deadSopenharmony_ci      that small floating-point errors might produce very small but non-zero
14005bd8deadSopenharmony_ci      weights for neighboring texels.  If avoiding such errors is important
14015bd8deadSopenharmony_ci      and a 1:1 mapping is required, a single-sample filter like NEAREST
14025bd8deadSopenharmony_ci      should be used.
14035bd8deadSopenharmony_ci
14045bd8deadSopenharmony_ci    (9) Should we support sparse texel fetches and image loads for buffer
14055bd8deadSopenharmony_ci        textures?
14065bd8deadSopenharmony_ci
14075bd8deadSopenharmony_ci      RESOLVED:  Not in this extension.  This should be handled by a separate
14085bd8deadSopenharmony_ci      extension allowing for the creation and use of sparse buffer resources.
14095bd8deadSopenharmony_ci      Such an extension might also provide the ability to get "sparse"
14105bd8deadSopenharmony_ci      information when non-texture mechanisms are used to access memory (e.g.,
14115bd8deadSopenharmony_ci      ARB_shader_storage_buffer_object, NV_shader_buffer_load).
14125bd8deadSopenharmony_ci
14135bd8deadSopenharmony_ci    (10) Should we support "sparse" variants of the image atomic functions
14145bd8deadSopenharmony_ci         that return information on residency as well as the value normally
14155bd8deadSopenharmony_ci         returned by the atomic operation?
14165bd8deadSopenharmony_ci
14175bd8deadSopenharmony_ci      RESOLVED:  Not in this extension; it's not clear that there's an
14185bd8deadSopenharmony_ci      important use case for this.  If required, a shader can use imageLoad()
14195bd8deadSopenharmony_ci      to probe the residency of a given texel and ignore the data values
14205bd8deadSopenharmony_ci      returned.
14215bd8deadSopenharmony_ci
14225bd8deadSopenharmony_ci    (11) This extension is adding a *large* number of new built-in functions.
14235bd8deadSopenharmony_ci         What can we do to control this?
14245bd8deadSopenharmony_ci
14255bd8deadSopenharmony_ci      RESOLVED:  We chose not to add any "sparse" or "LOD clamp" variants of
14265bd8deadSopenharmony_ci      projective texture lookups (e.g., textureProj).  If required, you can
14275bd8deadSopenharmony_ci      divide through by the "q" texture coordinate and use an equivalent
14285bd8deadSopenharmony_ci      non-projective lookup.
14295bd8deadSopenharmony_ci
14305bd8deadSopenharmony_ci      We obviously don't support features that make no sense -- for example,
14315bd8deadSopenharmony_ci      LOD clamp on single-level rectangle textures.
14325bd8deadSopenharmony_ci
14335bd8deadSopenharmony_ci      We considered the possibility of more significant GLSL syntax changes to
14345bd8deadSopenharmony_ci      reduce the cross-product of different features.  For example, the AMD
14355bd8deadSopenharmony_ci      extension has a function:
14365bd8deadSopenharmony_ci
14375bd8deadSopenharmony_ci        int sparseTextureProjGradOffset(...);
14385bd8deadSopenharmony_ci
14395bd8deadSopenharmony_ci      that combines four separate "optional" features (sparse, projection,
14405bd8deadSopenharmony_ci      explicitly specified gradients, and texel offsets) and is supported for
14415bd8deadSopenharmony_ci      six separate texture targets.  One might consider an approach like:
14425bd8deadSopenharmony_ci
14435bd8deadSopenharmony_ci        #define TEX_IS_PROJECTIVE       0x1
14445bd8deadSopenharmony_ci        #define TEX_HAS_GRADIENTS       0x2
14455bd8deadSopenharmony_ci        #define TEX_HAS_TEXEL_OFFSET    0x4
14465bd8deadSopenharmony_ci        #define TEX_WANTS_SPARSE_STATUS 0x8
14475bd8deadSopenharmony_ci        struct TexLookup3D {
14485bd8deadSopenharmony_ci          uint          flags;          /* in */
14495bd8deadSopenharmony_ci          float         q;              /* in */
14505bd8deadSopenharmony_ci          vec3          ddx, ddy;       /* in */
14515bd8deadSopenharmony_ci          ivec3         texelOffset;    /* in */
14525bd8deadSopenharmony_ci          int           sparseStatus;   /* out */
14535bd8deadSopenharmony_ci        };
14545bd8deadSopenharmony_ci        ...
14555bd8deadSopenharmony_ci        TexLookup3D lookup;
14565bd8deadSopenharmony_ci        lookup.flags = (TEX_IS_PROJECTIVE | TEX_HAS_GRADIENTS |
14575bd8deadSopenharmony_ci                        TEX_HAS_TEXEL_OFFSET | TEX_WANTS_SPARSE_STATUS);
14585bd8deadSopenharmony_ci        lookup.q = coords.w;
14595bd8deadSopenharmony_ci        lookup.ddx = ddx;
14605bd8deadSopenharmony_ci        lookup.ddy = ddy;
14615bd8deadSopenharmony_ci        lookup.texelOffset = ivec3(-1,+1,+2);
14625bd8deadSopenharmony_ci        texture(sampler, lookup);
14635bd8deadSopenharmony_ci
14645bd8deadSopenharmony_ci      to handle all possible cases in one interface.  Alternately, a
14655bd8deadSopenharmony_ci      "prettier" C++-style approach with methods on sampler classes could be
14665bd8deadSopenharmony_ci      used.
14675bd8deadSopenharmony_ci
14685bd8deadSopenharmony_ci      Given that either such feature might involve a large change to the
14695bd8deadSopenharmony_ci      shading language, it seems more appropriate to address this issue in a
14705bd8deadSopenharmony_ci      future core version of a shading language rather than an extension.
14715bd8deadSopenharmony_ci
14725bd8deadSopenharmony_ci    (12) For new "LOD clamp" functions, how does the LOD clamp interact with
14735bd8deadSopenharmony_ci         the LOD bias?
14745bd8deadSopenharmony_ci
14755bd8deadSopenharmony_ci      RESOLVED:  The LOD clamp is applied after the LOD bias.  Clamping to the
14765bd8deadSopenharmony_ci      LOD provided in the shader is logically applied at the same point in the
14775bd8deadSopenharmony_ci      pipeline where the LOD clamps based on the texture/sampler parameters
14785bd8deadSopenharmony_ci      TEXTURE_{MIN,MAX}_LOD are applied.
14795bd8deadSopenharmony_ci
14805bd8deadSopenharmony_ci    (13) How does the "reads produce zero" behave if a sparse texture is bound
14815bd8deadSopenharmony_ci         to a framebuffer and used for the depth or stencil test?
14825bd8deadSopenharmony_ci
14835bd8deadSopenharmony_ci      RESOLVED:  The depth and stencil tests act as though zero were read from
14845bd8deadSopenharmony_ci      the framebuffer.  The actual results of the tests depend on the depth
14855bd8deadSopenharmony_ci      and stencil functions, the incoming depth value, and the stencil
14865bd8deadSopenharmony_ci      reference value.
14875bd8deadSopenharmony_ci
14885bd8deadSopenharmony_ci      There may be cases where it might be advantageous to configure the depth
14895bd8deadSopenharmony_ci      or stencil tests to fail when touching an unpopulated portion of the
14905bd8deadSopenharmony_ci      depth/stencil buffer.  The "return zero" behavior may work well for some
14915bd8deadSopenharmony_ci      cases (e.g., returning zero when using a depth test of LESS will cause
14925bd8deadSopenharmony_ci      the test to almost always fail), but not as well for others (e.g., depth
14935bd8deadSopenharmony_ci      test of GREATER).  We've chosen not to address this case in the current
14945bd8deadSopenharmony_ci      extension.
14955bd8deadSopenharmony_ci
14965bd8deadSopenharmony_ci    (14) How does the "reads produce zero" behave for textures that don't have
14975bd8deadSopenharmony_ci         all four components?
14985bd8deadSopenharmony_ci
14995bd8deadSopenharmony_ci      RESOLVED:  Components that are present in the texture will return zero;
15005bd8deadSopenharmony_ci      others will return default values.  For example, an access to an
15015bd8deadSopenharmony_ci      uncommitted sparse texture whose with a format has no alpha component
15025bd8deadSopenharmony_ci      (e.g, RGB8) will return 1.0 on the alpha channel of the returned RGBA
15035bd8deadSopenharmony_ci      vector.  The handling of "missing" components is the same as for
15045bd8deadSopenharmony_ci      non-sparse textures.
15055bd8deadSopenharmony_ci
15065bd8deadSopenharmony_ci    (15) Should we provide standard sparse texture page sizes that
15075bd8deadSopenharmony_ci         applications can rely on without having to query the set of supported
15085bd8deadSopenharmony_ci         page sizes for each format it uses?  If so, how will this be handled?
15095bd8deadSopenharmony_ci         Will we have some formats that have standard sizes and others that
15105bd8deadSopenharmony_ci         don't?
15115bd8deadSopenharmony_ci
15125bd8deadSopenharmony_ci      RESOLVED:  Yes; we will provide standard page sizes for some, but not
15135bd8deadSopenharmony_ci      all, formats.  However, we will still allow for implementation-
15145bd8deadSopenharmony_ci      dependent page sizes (as in ARB_sparse_textures) for formats that have a
15155bd8deadSopenharmony_ci      standard page size and allow implementations to support sparse textures
15165bd8deadSopenharmony_ci      on formats for which a standard page size is not available.  The basic
15175bd8deadSopenharmony_ci      page sizes we use arrange sparse textures into 64KB pages and attempt to
15185bd8deadSopenharmony_ci      keep the X, Y, and Z (for 3D) dimensions of the page roughly equal.
15195bd8deadSopenharmony_ci
15205bd8deadSopenharmony_ci    (16) Should we add specific compressed formats to the required formats list
15215bd8deadSopenharmony_ci         and provide standard page sizes?
15225bd8deadSopenharmony_ci
15235bd8deadSopenharmony_ci      RESOLVED:  Not in this extension.  Note that the current
15245bd8deadSopenharmony_ci      ARB_sparse_texture extension already allows implementations to support
15255bd8deadSopenharmony_ci      compressed formats.
15265bd8deadSopenharmony_ci
15275bd8deadSopenharmony_ci      We've chosen not to go to the trouble of enumerating standard page sizes
15285bd8deadSopenharmony_ci      for all the compressed formats (many of which are added by extension),
15295bd8deadSopenharmony_ci      but one logical approach would be to treat each 64- or 128-bit block in
15305bd8deadSopenharmony_ci      common formats as a single logical texel and treat the standard page
15315bd8deadSopenharmony_ci      sizes of 64- and 128-bit texels as being in units of compression blocks.
15325bd8deadSopenharmony_ci
15335bd8deadSopenharmony_ci    (17) How do applications get to use the standard page size?
15345bd8deadSopenharmony_ci
15355bd8deadSopenharmony_ci      RESOLVED:  Applications opt in to using standard page sizes by leaving
15365bd8deadSopenharmony_ci      VIRTUAL_PAGE_SIZE_INDEX_ARB at its initial value (zero).
15375bd8deadSopenharmony_ci
15385bd8deadSopenharmony_ci      In ARB_sparse_texture, there were no standard page sizes.  Applications
15395bd8deadSopenharmony_ci      can use GetInternalformativ() with <pname> of NUM_VIRTUAL_PAGE_SIZES_ARB
15405bd8deadSopenharmony_ci      to query the implementation-dependent number of page sizes supported for
15415bd8deadSopenharmony_ci      any given format.  Some formats may be unsupported, and the GL will
15425bd8deadSopenharmony_ci      return a page size count of zero.  Other formats may have a page size
15435bd8deadSopenharmony_ci      count of one, or more than one if the implementation supports multiple
15445bd8deadSopenharmony_ci      page sizes.  An application can query the properties of each page size
15455bd8deadSopenharmony_ci      index by calling GetInternalFormativ() with <pname> set to
15465bd8deadSopenharmony_ci      VIRTUAL_PAGE_SIZE_{X,Y,Z}_ARB.  When an application determines the page
15475bd8deadSopenharmony_ci      size it wants to use from the options returned by the GL, it sets the
15485bd8deadSopenharmony_ci      VIRTUAL_PAGE_SIZE_INDEX_ARB texture parameter prior to calling
15495bd8deadSopenharmony_ci      TexStorage* to allocate storage for the sparse texture.
15505bd8deadSopenharmony_ci
15515bd8deadSopenharmony_ci      If an application doesn't bother setting the VIRTUAL_PAGE_SIZE_INDEX_ARB
15525bd8deadSopenharmony_ci      texture parameter, the default index of zero will be used and the page
15535bd8deadSopenharmony_ci      size will be whatever the implementation chooses for its first page size
15545bd8deadSopenharmony_ci      index.  In the absence of this extension, the application still needs to
15555bd8deadSopenharmony_ci      call GetInternalFormativ() to determine the page size being used so it
15565bd8deadSopenharmony_ci      can manage texture residency. But in the presence of this extension, page
15575bd8deadSopenharmony_ci      size index 0 will be a standard size and will be the same on all
15585bd8deadSopenharmony_ci      implementations supporting the extension.
15595bd8deadSopenharmony_ci
15605bd8deadSopenharmony_ci    (18) Should we support sparse multisample textures?  If so, should we
15615bd8deadSopenharmony_ci         support standard virtual page sizes?
15625bd8deadSopenharmony_ci
15635bd8deadSopenharmony_ci      RESOLVED:  Yes, we add will support for sparse multisample textures, but
15645bd8deadSopenharmony_ci      will not specify standard page sizes.
15655bd8deadSopenharmony_ci
15665bd8deadSopenharmony_ci      Different implementations of this extension may represent multisample
15675bd8deadSopenharmony_ci      textures in different ways.  Some implementations might interleave
15685bd8deadSopenharmony_ci      samples in memory, while others might have separate "planes" in memory
15695bd8deadSopenharmony_ci      for each individual sample.  If we were to support a standard page size,
15705bd8deadSopenharmony_ci      the easiest approach might be to have a greatest-common-multiple
15715bd8deadSopenharmony_ci      standard page size.  For example, the standard page size for
15725bd8deadSopenharmony_ci      single-sample textures with 32-bit texels is 128x128 (64KB total).  We
15735bd8deadSopenharmony_ci      could choose to use the same page size for multisample textures.  For 4x
15745bd8deadSopenharmony_ci      multisample, a page of 128x128 pixels would have an effective page size
15755bd8deadSopenharmony_ci      of 256KB.  If an implementation interleaves samples, each virtual page
15765bd8deadSopenharmony_ci      might be assembled from four consecutive 64K physical pages.  If an
15775bd8deadSopenharmony_ci      implementation has separate "planes", the virtual page might be
15785bd8deadSopenharmony_ci      assembled from four 64K physical pages spread out in memory.
15795bd8deadSopenharmony_ci
15805bd8deadSopenharmony_ci    (19) Should we require support for sparse depth or stencil textures?
15815bd8deadSopenharmony_ci         Sparse support for these formats is optional in ARB_sparse_texture.
15825bd8deadSopenharmony_ci         If so, should we support standard virtual page sizes?
15835bd8deadSopenharmony_ci
15845bd8deadSopenharmony_ci      RESOLVED:  Not in this extension.
15855bd8deadSopenharmony_ci
15865bd8deadSopenharmony_ci      The current ARB_sparse_texture extension already allows implementations
15875bd8deadSopenharmony_ci      to support sparse depth/stencil formats, so the only things a change
15885bd8deadSopenharmony_ci      could accomplish is (a) provide standard page sizes that can be used
15895bd8deadSopenharmony_ci      without querying implementation page sizes, (b) ensure that apps can
15905bd8deadSopenharmony_ci      rely on *some* support by just checking the extension without querying
15915bd8deadSopenharmony_ci      the number of supported page sizes via GetInternalFormat.
15925bd8deadSopenharmony_ci
15935bd8deadSopenharmony_ci      We expect that different implementations may store depth and stencil
15945bd8deadSopenharmony_ci      textures in different ways and might have different "natural" page
15955bd8deadSopenharmony_ci      sizes.  We could deal with this by using a greatest-common-multiple
15965bd8deadSopenharmony_ci      standard page size (i.e., have a standard page size larger than 64K),
15975bd8deadSopenharmony_ci      but it's not clear if that will fly.
15985bd8deadSopenharmony_ci
15995bd8deadSopenharmony_ci      The advantages of (b) seem low relative to (a), so we aren't proposing
16005bd8deadSopenharmony_ci      to add depth and stencil formats to the required list for this
16015bd8deadSopenharmony_ci      extension.
16025bd8deadSopenharmony_ci
16035bd8deadSopenharmony_ci    (20) Should we make a separate extension for the LOD clamp GLSL functions?
16045bd8deadSopenharmony_ci
16055bd8deadSopenharmony_ci      RESOLVED:  No.  While the LOD clamp function doesn't have any real
16065bd8deadSopenharmony_ci      interaction with sparse textures, its intent is to force the use of a
16075bd8deadSopenharmony_ci      coarser level of detail that is known (or suspected) to be populated.
16085bd8deadSopenharmony_ci      We expect that applications using sparse textures may make some of the
16095bd8deadSopenharmony_ci      coarser levels of detail fully resident, but make portions finer levels
16105bd8deadSopenharmony_ci      of detail resident selectively.  Without using the feedback mechanism
16115bd8deadSopenharmony_ci      (from the sparseTexture*) functions or without being able to have
16125bd8deadSopenharmony_ci      portions of the texture non-resident, the LOD clamp built-ins don't
16135bd8deadSopenharmony_ci      really make much sense.
16145bd8deadSopenharmony_ci
16155bd8deadSopenharmony_ci    (21) Should we reconsider re-examining some of the non-orthogonalities in
16165bd8deadSopenharmony_ci         the current set of texture built-ins, which are being extended for
16175bd8deadSopenharmony_ci         sparse.  For example, the texture() built-in for a sampler type of
16185bd8deadSopenharmony_ci         samplerCubeArrayShadow does not include an optional LOD bias despite
16195bd8deadSopenharmony_ci         the fact that cubemap arrays do support multiple LODs.
16205bd8deadSopenharmony_ci
16215bd8deadSopenharmony_ci      RESOLVED:  Not in this extension.
16225bd8deadSopenharmony_ci
16235bd8deadSopenharmony_ci      We chose to create "sparse" variants of existing built-ins without
16245bd8deadSopenharmony_ci      re-examining current capabilities.  It might make sense to have an
16255bd8deadSopenharmony_ci      extension or future core shading language re-examine things and improve
16265bd8deadSopenharmony_ci      orthogonality if implementations can support it.
16275bd8deadSopenharmony_ci
16285bd8deadSopenharmony_ciRevision History
16295bd8deadSopenharmony_ci
16305bd8deadSopenharmony_ci    Revision 1
16315bd8deadSopenharmony_ci      - Internal revisions
16325bd8deadSopenharmony_ci    Revision 2 - December 18, 2014 - mheyer
16335bd8deadSopenharmony_ci      - added ES 3.1 interactions
16345bd8deadSopenharmony_ci    Revision 3 - April 19, 2016 - dkoch
16355bd8deadSopenharmony_ci      - fix typos, add interactions with OES extensions
1636