15bd8deadSopenharmony_ci    Name
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci        EXT_fragment_shading_rate
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ci    Name Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci        GL_EXT_fragment_shading_rate
85bd8deadSopenharmony_ci        GL_EXT_fragment_shading_rate_primitive
95bd8deadSopenharmony_ci        GL_EXT_fragment_shading_rate_attachment
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Contributors
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ci        Jan-Harald Fredriksen, Arm
145bd8deadSopenharmony_ci        Ralph Potter, Samsung
155bd8deadSopenharmony_ci        Tate Hornbeck, Qualcomm
165bd8deadSopenharmony_ci        Laurie Hedge, Imagination Technologies
175bd8deadSopenharmony_ci        Contributors to QCOM_shading_rate
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Contact
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ci        Jan-Harald Fredriksen ( jan-harald.fredriksen 'at' arm.com)
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    Status
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ci        Complete
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    Version
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci        Last Modified Date: July 7, 2022
305bd8deadSopenharmony_ci        Revision: #2
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    Number
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci        OpenGL ES Extension #340
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    Dependencies
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci        OpenGL ES 2.0 is required.  This extension is written against OpenGL ES 3.2.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci        This extension interacts with OVR_multiview.
415bd8deadSopenharmony_ci        This extension interacts with QCOM_framebuffer_foveated and QCOM_texture_foveated
425bd8deadSopenharmony_ci        This extension interacts with EXT_shader_pixel_local_storage and
435bd8deadSopenharmony_ci        EXT_shader_pixel_local_storage2
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ci        When the GL_EXT_fragment_shading_rate extension or the
465bd8deadSopenharmony_ci        GL_EXT_fragment_shading_rate_attachment extension is advertised, the
475bd8deadSopenharmony_ci        implementation must also advertise either GLSL extension
485bd8deadSopenharmony_ci        GL_EXT_fragment_shading_rate or GLSL extension
495bd8deadSopenharmony_ci        GL_EXT_fragment_invocation_density (both documented separately).
505bd8deadSopenharmony_ci        The GLSL extensions provide built-in variables that allow fragment
515bd8deadSopenharmony_ci        shaders to determine the effective shading rate used for fragment
525bd8deadSopenharmony_ci        invocations.
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci        When the GL_EXT_fragment_shading_rate_primitive extension is advertised,
555bd8deadSopenharmony_ci        the implementation must also advertise GLSL
565bd8deadSopenharmony_ci        extension "GL_EXT_fragment_shading_rate" (documented separately), which
575bd8deadSopenharmony_ci        provides new built-in variables that allow vertex and geometry shaders to
585bd8deadSopenharmony_ci        specify the fragment shading per primitive and also allow fragment shaders to
595bd8deadSopenharmony_ci        determine the effective shading rate used for fragment invocations.
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    Overview
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci        By default, OpenGL runs a fragment shader once for each pixel covered by a
645bd8deadSopenharmony_ci        primitive being rasterized.  When using multisampling, the outputs of that
655bd8deadSopenharmony_ci        fragment shader are broadcast to each covered sample of the fragment's
665bd8deadSopenharmony_ci        pixel.  When using multisampling, applications can optionally request that
675bd8deadSopenharmony_ci        the fragment shader be run once per color sample (e.g., by using the "sample"
685bd8deadSopenharmony_ci        qualifier on one or more active fragment shader inputs), or run a minimum
695bd8deadSopenharmony_ci        number of times per pixel using SAMPLE_SHADING enable and the
705bd8deadSopenharmony_ci        MinSampleShading frequency value.
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci        This extension allows applications to specify fragment shading rates of less
735bd8deadSopenharmony_ci        than 1 invocation per pixel.  Instead of invoking the fragment shader
745bd8deadSopenharmony_ci        once for each covered pixel, the fragment shader can be run once for a
755bd8deadSopenharmony_ci        group of adjacent pixels in the framebuffer.  The outputs of that fragment
765bd8deadSopenharmony_ci        shader invocation are broadcast to each covered sample for all of the pixels
775bd8deadSopenharmony_ci        in the group.  The initial version of this extension allows for groups of
785bd8deadSopenharmony_ci        1, 2, 4, 8, and 16 pixels.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci        This can be useful for effects like motion volumetric rendering
815bd8deadSopenharmony_ci        where a portion of scene is processed at full shading rate and a portion can
825bd8deadSopenharmony_ci        be processed at a reduced shading rate, saving power and processing resources.
835bd8deadSopenharmony_ci        The requested rate can vary from (finest and default) 1 fragment shader
845bd8deadSopenharmony_ci        invocation per pixel to (coarsest) one fragment shader invocation for each
855bd8deadSopenharmony_ci        4x4 block of pixels.
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    New Tokens
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci        Accepted by the <attachment> parameter of FramebufferShadingRateEXT
905bd8deadSopenharmony_ci        and GetFramebufferAttachmentParameteriv:
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci            SHADING_RATE_ATTACHMENT_EXT                             0x96D1
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci        Allowed in the <rate> parameter in ShadingRateEXT:
955bd8deadSopenharmony_ci            SHADING_RATE_1X1_PIXELS_EXT                             0x96A6
965bd8deadSopenharmony_ci            SHADING_RATE_1X2_PIXELS_EXT                             0x96A7
975bd8deadSopenharmony_ci            SHADING_RATE_1X4_PIXELS_EXT                             0x96AA
985bd8deadSopenharmony_ci            SHADING_RATE_2X1_PIXELS_EXT                             0x96A8
995bd8deadSopenharmony_ci            SHADING_RATE_2X2_PIXELS_EXT                             0x96A9
1005bd8deadSopenharmony_ci            SHADING_RATE_2X4_PIXELS_EXT                             0x96AD
1015bd8deadSopenharmony_ci            SHADING_RATE_4X1_PIXELS_EXT                             0x96AB
1025bd8deadSopenharmony_ci            SHADING_RATE_4X2_PIXELS_EXT                             0x96AC
1035bd8deadSopenharmony_ci            SHADING_RATE_4X4_PIXELS_EXT                             0x96AE
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci        Accepted by the <combinerOp0> and <combinerOp1> parameters of
1065bd8deadSopenharmony_ci        ShadingRateCombinerOpsEXT:
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT              0x96D2
1095bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT           0x96D3
1105bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT               0x96D4
1115bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT               0x96D5
1125bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT               0x96D6
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci        Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv,
1155bd8deadSopenharmony_ci        and GetInteger64v:
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci            SHADING_RATE_EXT                                                         0x96D0
1185bd8deadSopenharmony_ci            MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT                     0x96D7
1195bd8deadSopenharmony_ci            MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT                     0x96D8
1205bd8deadSopenharmony_ci            MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT                    0x96D9
1215bd8deadSopenharmony_ci            MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT                    0x96DA
1225bd8deadSopenharmony_ci            MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT              0x96DB
1235bd8deadSopenharmony_ci            MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT                          0x96DC
1245bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT     0x96DD
1255bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT                     0x96DE
1265bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT  0x96DF
1275bd8deadSopenharmony_ci            FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT                0x8F6F
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci    New Procedures and Functions
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci        void ShadingRateEXT(enum rate)
1325bd8deadSopenharmony_ci        void ShadingRateCombinerOpsEXT(enum combinerOp0, enum combinerOp1)
1335bd8deadSopenharmony_ci        void FramebufferShadingRateEXT(enum target, enum attachment, uint texture, int baseLayer, sizei numLayers, sizei texelWidth, sizei texelHeight)
1345bd8deadSopenharmony_ci        void GetFragmentShadingRatesEXT(sizei samples, sizei maxCount, sizei *count, enum *shadingRates)
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci    Modifications to the OpenGL ES 3.2 Specification
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci        Modify Section 8.14.1, Scale Factor and Level of Detail, p. 196
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci        (Modify the function approximating Scale Factor (P), to allow implementations
1415bd8deadSopenharmony_ci         to scale implicit derivatives based on the shading rate.  The scale occurs before
1425bd8deadSopenharmony_ci         the LOD bias and before LOD clamping).
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci         Modify the definitions of (mu, mv, mw):
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci                        |   du       du    |
1475bd8deadSopenharmony_ci              mu = max  |  -----  , -----  |
1485bd8deadSopenharmony_ci                        |   dx       dy    |
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci                        |   dv       dv    |
1515bd8deadSopenharmony_ci              mv = max  |  -----  , -----  |
1525bd8deadSopenharmony_ci                        |   dx       dy    |
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci                        |   dw       dw    |
1555bd8deadSopenharmony_ci              mw = max  |  -----  , -----  |
1565bd8deadSopenharmony_ci                        |   dx       dy    |
1575bd8deadSopenharmony_ci         to:
1585bd8deadSopenharmony_ci                        |   du          du        |
1595bd8deadSopenharmony_ci              mu = max  |  ---- * sx , ---- * sy  |
1605bd8deadSopenharmony_ci                        |   dx          dy        |
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci                        |   dv          dv        |
1635bd8deadSopenharmony_ci              mv = max  |  ---- * sx , ---- * sy  |
1645bd8deadSopenharmony_ci                        |   dx          dy        |
1655bd8deadSopenharmony_ci
1665bd8deadSopenharmony_ci                        |   dw          dw        |
1675bd8deadSopenharmony_ci              mw = max  |  ---- * sx , ---- * sy  |
1685bd8deadSopenharmony_ci                        |   dx          dy        |
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci              where (sx, sy) refer to _effective shading rate_ (w', h') specified in
1715bd8deadSopenharmony_ci              section 13.X.2.
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ci        Modifications to Chapter 9 of the OpenGL ES 3.2 Specification (Framebuffers
1745bd8deadSopenharmony_ci        and Framebuffer Objects)
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci            Modify the description of GetFramebufferAttachmentParameteriv to include
1775bd8deadSopenharmony_ci            SHADING_RATE_ATTACHMENT_EXT:
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ci            "Otherwise, attachment must be one of the attachment points of the framebuffer
1805bd8deadSopenharmony_ci             listed in table 9.1 or SHADING_RATE_ATTACHMENT_EXT."
1815bd8deadSopenharmony_ci
1825bd8deadSopenharmony_ci            Add the following to the list of conditions required for framebuffer
1835bd8deadSopenharmony_ci            attachment completeness in section 9.4.1 (Framebuffer Attachment
1845bd8deadSopenharmony_ci            Completeness):
1855bd8deadSopenharmony_ci
1865bd8deadSopenharmony_ci            If <image> is a two-dimensional array and the attachment
1875bd8deadSopenharmony_ci            is SHADING_RATE_ATTACHMENT_EXT, all the selected layers,
1885bd8deadSopenharmony_ci            [<baseLayer>, <baseLayer> + <numLayers>), are less than the layer
1895bd8deadSopenharmony_ci            count of the texture.
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci        Modify Section 13.4, Multisampling, p. 353
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci        (add to the end of the section)
1945bd8deadSopenharmony_ci
1955bd8deadSopenharmony_ci            When SHADING_RATE_EXT is set to a value other than SHADING_RATE_1X1_PIXELS_EXT,
1965bd8deadSopenharmony_ci            the rasterization will occur at the _effective shading rate_ (Section 13.X) and
1975bd8deadSopenharmony_ci            will result in fragments covering a <W>x<H> group of pixels.
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci            When multisample rasterization is enabled, the samples of the fragment will consist
2005bd8deadSopenharmony_ci            of the samples for each of the pixels in the group.  The fragment center will be
2015bd8deadSopenharmony_ci            the center of this group of pixels.  Each fragment will include a coverage value
2025bd8deadSopenharmony_ci            with (W x H x SAMPLES) bits.  For example, if SHADING_RATE_EXT is 2x2 and the
2035bd8deadSopenharmony_ci            currently bound framebuffer object has SAMPLES equal to 4 (4xMSAA), then the fragment
2045bd8deadSopenharmony_ci            will consist of 4 pixels and 16 samples.  Similarly, each fragment will have
2055bd8deadSopenharmony_ci            (W * H * SAMPLES) depth values and associated data.
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci        The contents of Section 13.4.1, Sample Shading, p. 355 is moved to the new Section 13.X.3, "Sample Shading".
2085bd8deadSopenharmony_ci
2095bd8deadSopenharmony_ci        Add new section 13.X before Section 13.5, Points, p. 355
2105bd8deadSopenharmony_ci
2115bd8deadSopenharmony_ci            Section 13.X, Shading Rate
2125bd8deadSopenharmony_ci
2135bd8deadSopenharmony_ci            By default, each fragment processed by programmable fragment processing
2145bd8deadSopenharmony_ci            corresponds to a single pixel with a single (x,y) coordinate. When using
2155bd8deadSopenharmony_ci            multisampling, implementations are permitted to run separate fragment shader
2165bd8deadSopenharmony_ci            invocations for each sample, but often only run a single invocation for all
2175bd8deadSopenharmony_ci            samples of the fragment.  We will refer to the density of fragment shader
2185bd8deadSopenharmony_ci            invocations as the _shading rate_.
2195bd8deadSopenharmony_ci            Applications can use the shading rate to increase the size of fragments to
2205bd8deadSopenharmony_ci            cover multiple pixels and reduce the amount of fragment shader work.
2215bd8deadSopenharmony_ci            Applications can also use the shading rate to explicitly control the minimum
2225bd8deadSopenharmony_ci            number of fragment shader invocations when multisampling.
2235bd8deadSopenharmony_ci
2245bd8deadSopenharmony_ci            Section 13.X.1, Draw Call Fragment Shading Rate
2255bd8deadSopenharmony_ci
2265bd8deadSopenharmony_ci            The draw call fragment shading rate can controlled with the command
2275bd8deadSopenharmony_ci
2285bd8deadSopenharmony_ci               void ShadingRateEXT(enum rate);
2295bd8deadSopenharmony_ci
2305bd8deadSopenharmony_ci            <rate> specifies the value of SHADING_RATE_EXT, and defines the
2315bd8deadSopenharmony_ci            _shading rate_.  Valid values for <rate> are described in
2325bd8deadSopenharmony_ci            table X.1
2335bd8deadSopenharmony_ci
2345bd8deadSopenharmony_ci                Shading Rate                   Size
2355bd8deadSopenharmony_ci                ----------------------------   -----
2365bd8deadSopenharmony_ci                SHADING_RATE_1X1_PIXELS_EXT    1x1
2375bd8deadSopenharmony_ci                SHADING_RATE_1X2_PIXELS_EXT    1x2
2385bd8deadSopenharmony_ci                SHADING_RATE_1X4_PIXELS_EXT    1x4
2395bd8deadSopenharmony_ci                SHADING_RATE_2X1_PIXELS_EXT    2x1
2405bd8deadSopenharmony_ci                SHADING_RATE_2X2_PIXELS_EXT    2x2
2415bd8deadSopenharmony_ci                SHADING_RATE_2X4_PIXELS_EXT    2x4
2425bd8deadSopenharmony_ci                SHADING_RATE_4X1_PIXELS_EXT    4x1
2435bd8deadSopenharmony_ci                SHADING_RATE_4X2_PIXELS_EXT    4x2
2445bd8deadSopenharmony_ci                SHADING_RATE_4X4_PIXELS_EXT    4x4
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci                Table X.1:  Shading rates accepted by ShadingRateEXT.  An
2475bd8deadSopenharmony_ci                entry of "<W>x<H>" in the "Size" column indicates that the shading
2485bd8deadSopenharmony_ci                rate request for fragments with a width and height (in pixels) of <W>
2495bd8deadSopenharmony_ci                and <H>, respectively.
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci            If the shading rate is specified with ShadingRateEXT, it will apply to all
2525bd8deadSopenharmony_ci            draw buffers.  If the shading rate has not been set, the shading rate
2535bd8deadSopenharmony_ci            will be SHADING_RATE_1X1_PIXELS_EXT.  In either case, the shading rate will
2545bd8deadSopenharmony_ci            be further adjusted as described in the following sections.
2555bd8deadSopenharmony_ci
2565bd8deadSopenharmony_ci            Errors
2575bd8deadSopenharmony_ci
2585bd8deadSopenharmony_ci                INVALID_ENUM is generated by ShadingRateEXT if <rate> is not
2595bd8deadSopenharmony_ci                a valid shading rate from table X.1
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci[[If GL_EXT_fragment_shading_rate_primitive is supported]]
2635bd8deadSopenharmony_ci            Section 13.X.2, Primitive Fragment Shading Rate
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ci            The primitive fragment shading rate can be set via the gl_PrimitiveShadingRateEXT
2665bd8deadSopenharmony_ci            built-in in the last active pre-rasterization shader stage. The rate associated
2675bd8deadSopenharmony_ci            with a given primitive is sourced from the value written to gl_PrimitiveShadingRateEXT
2685bd8deadSopenharmony_ci            by that primitive’s provoking vertex.
2695bd8deadSopenharmony_ci            If the last active pre-rasterization shader stage does not write to
2705bd8deadSopenharmony_ci            gl_PrimitiveShadingRateEXT,then it is as if the shader specified a
2715bd8deadSopenharmony_ci            fragment shading rate value of 0, indicating a horizontal and vertical
2725bd8deadSopenharmony_ci            rate of 1 pixel.
2735bd8deadSopenharmony_ci
2745bd8deadSopenharmony_ci[[If GL_EXT_fragment_shading_rate_attachment is supported]]
2755bd8deadSopenharmony_ci            Section 13.X.3, Attachment Fragment Shading Rate
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci            An attachment shading rate can be set by attaching a specified image from a
2785bd8deadSopenharmony_ci            texture object as one of the logical buffers of a framebuffer
2795bd8deadSopenharmony_ci            object with the command:
2805bd8deadSopenharmony_ci
2815bd8deadSopenharmony_ci            void FramebufferShadingRateEXT(enum target, enum attachment, uint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ci            <target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER.
2845bd8deadSopenharmony_ci            FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER.
2855bd8deadSopenharmony_ci
2865bd8deadSopenharmony_ci            <attachment> must be SHADING_RATE_ATTACHMENT_EXT.
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci            If <texture> is not zero, then <texture> must name an existing
2895bd8deadSopenharmony_ci            immutable-format texture with a target of TEXTURE_2D or TEXTURE_2D_ARRAY
2905bd8deadSopenharmony_ci            with a format of R8UI.
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci            If <texture> has multiple mipmap levels, only the base level will be
2935bd8deadSopenharmony_ci            used as the fragment shading rate attachment.
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci            <baseLayer> specifies the base layer of a two-dimensional image within
2965bd8deadSopenharmony_ci            <texture>.
2975bd8deadSopenharmony_ci
2985bd8deadSopenharmony_ci            <numLayers> specifies the number of layers, starting from <baseLayer> from
2995bd8deadSopenharmony_ci            within <texture> to attach.
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci            <texelWidth> is the width of the framebuffer corresponding to each texel
3025bd8deadSopenharmony_ci            in a fragment shading rate attachment. It must be a power-of-two value that
3035bd8deadSopenharmony_ci            is greater or equal to MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT
3045bd8deadSopenharmony_ci            and less than or equal to MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT.
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci            The values of MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT
3075bd8deadSopenharmony_ci            and MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT
3085bd8deadSopenharmony_ci            indicate, respectively, the minimum and maximum supported width of
3095bd8deadSopenharmony_ci            the portion of the framebuffer corresponding to each texel in a
3105bd8deadSopenharmony_ci            fragment shading rate attachment. Both values must be a power-of-two
3115bd8deadSopenharmony_ci            and the value of MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT
3125bd8deadSopenharmony_ci            must be less than or equal to the value of
3135bd8deadSopenharmony_ci            MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT.
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci            <texelHeight> is the height of the framebuffer corresponding to each texel
3165bd8deadSopenharmony_ci            in a fragment shading rate attachment. It must be a power-of-two value that
3175bd8deadSopenharmony_ci            is greater or equal to MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT
3185bd8deadSopenharmony_ci            and less than or equal to MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT.
3195bd8deadSopenharmony_ci
3205bd8deadSopenharmony_ci            The values of MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT
3215bd8deadSopenharmony_ci            and MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT
3225bd8deadSopenharmony_ci            indicate, respectively, the minimum and maximum supported height of
3235bd8deadSopenharmony_ci            the portion of the framebuffer corresponding to each texel in a
3245bd8deadSopenharmony_ci            fragment shading rate attachment. Both values must be a power-of-two
3255bd8deadSopenharmony_ci            and the value of MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT
3265bd8deadSopenharmony_ci            must be less than or equal to the value of
3275bd8deadSopenharmony_ci            MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT.
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ci            Each pixel in the framebuffer is assigned an attachment fragment shading rate
3305bd8deadSopenharmony_ci            by the corresponding texel in the fragment shading rate attachment, according to:
3315bd8deadSopenharmony_ci
3325bd8deadSopenharmony_ci                x' = floor(x / region_x)
3335bd8deadSopenharmony_ci                y' = floor(y / region_y)
3345bd8deadSopenharmony_ci
3355bd8deadSopenharmony_ci            where x' and y' are the coordinates of a texel in the fragment shading
3365bd8deadSopenharmony_ci            rate attachment, x and y are the coordinates of the pixel in the
3375bd8deadSopenharmony_ci            framebuffer, and region_x and region_y are the size of the region each
3385bd8deadSopenharmony_ci            texel corresponds to, as defined by the <texelWidth> and <texelHeight>
3395bd8deadSopenharmony_ci            parameters to FramebufferShadingRateEXT.
3405bd8deadSopenharmony_ci
3415bd8deadSopenharmony_ci            [[If OVR_Multiview is supported]]
3425bd8deadSopenharmony_ci            If multiview is enabled and the shading rate attachment has multiple
3435bd8deadSopenharmony_ci            layers, the shading rate attachment texel is selected from the layer
3445bd8deadSopenharmony_ci            determined by the gl_ViewID_OVR built-in. If multiview is disabled, and
3455bd8deadSopenharmony_ci            both the shading rate attachment and the framebuffer have multiple
3465bd8deadSopenharmony_ci            layers, the shading rate attachment texel is selected from the layer
3475bd8deadSopenharmony_ci            determined by the Layer built-in. Otherwise, the texel is
3485bd8deadSopenharmony_ci            unconditionally selected from the first layer of the attachment.
3495bd8deadSopenharmony_ci
3505bd8deadSopenharmony_ci            The fragment size is encoded into the first component of the identified
3515bd8deadSopenharmony_ci            texel as follows:
3525bd8deadSopenharmony_ci
3535bd8deadSopenharmony_ci                size_w = 2^((texel/4)&3)
3545bd8deadSopenharmony_ci                size_h = 2^(texel&3)
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci            where texel is the value in the first component of the identified
3575bd8deadSopenharmony_ci            texel, and size_w and size_h are the width and height of the fragment
3585bd8deadSopenharmony_ci            size, decoded from the texel.
3595bd8deadSopenharmony_ci            If no fragment shading rate attachment is specified, this size is
3605bd8deadSopenharmony_ci            calculated as size_w = size_h = 1.
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci            Applications must not specify a width or height greater than 4 by this
3635bd8deadSopenharmony_ci            method.
3645bd8deadSopenharmony_ci            The encoding of the gl_ShadingRateEXT built-in in
3655bd8deadSopenharmony_ci            GL_EXT_fragment_shading_rate adheres to the above encoding.
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ci            Errors
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci                An INVALID_ENUM error is generated if <target> is not
3705bd8deadSopenharmony_ci                DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER.
3715bd8deadSopenharmony_ci
3725bd8deadSopenharmony_ci                An INVALID_ENUM error is generated if <attachment> is not
3735bd8deadSopenharmony_ci                SHADING_RATE_ATTACHMENT_EXT.
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ci                An INVALID_VALUE error is generated if <texture> is not zero
3765bd8deadSopenharmony_ci                and is not the name of an immutable texture object.
3775bd8deadSopenharmony_ci
3785bd8deadSopenharmony_ci                An INVALID_VALUE error is generated if <baseLayer> is greater
3795bd8deadSopenharmony_ci                than or equal to the value of
3805bd8deadSopenharmony_ci                MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT.
3815bd8deadSopenharmony_ci
3825bd8deadSopenharmony_ci                An INVALID_VALUE error is generated if <numLayers> is greater
3835bd8deadSopenharmony_ci                than the value of
3845bd8deadSopenharmony_ci                MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT.
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci                An INVALID_VALUE error is generated if
3875bd8deadSopenharmony_ci                <texelWidth> / <texelHeight> is larger than
3885bd8deadSopenharmony_ci                MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT.
3895bd8deadSopenharmony_ci
3905bd8deadSopenharmony_ci                An INVALID_VALUE error is generated if
3915bd8deadSopenharmony_ci                <texelHeight> / <texelWidth> is larger than
3925bd8deadSopenharmony_ci                MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT.
3935bd8deadSopenharmony_ci
3945bd8deadSopenharmony_ci                An INVALID_OPERATION error is generated if the default
3955bd8deadSopenharmony_ci                framebuffer is bound to <target> and the value of
3965bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT
3975bd8deadSopenharmony_ci                is FALSE.
3985bd8deadSopenharmony_ci
3995bd8deadSopenharmony_ci            Section 13.X.4, Combining the Fragment Shading Rates
4005bd8deadSopenharmony_ci
4015bd8deadSopenharmony_ci            The final rate (Cxy') used for fragment shading must be one of the rates returned by
4025bd8deadSopenharmony_ci            GetFragmentShadingRatesEXT for the sample count
4035bd8deadSopenharmony_ci            used by rasterization.
4045bd8deadSopenharmony_ci
4055bd8deadSopenharmony_ci            If any of the following conditions are met, Cxy' must be set to {1,1}:
4065bd8deadSopenharmony_ci                * Per-sample shading is enabled.
4075bd8deadSopenharmony_ci                * The fragment shader statically writes to gl_FragDepth and the
4085bd8deadSopenharmony_ci                  value of FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT
4095bd8deadSopenharmony_ci                  is FALSE.
4105bd8deadSopenharmony_ci                * The value of FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT is FALSE
4115bd8deadSopenharmony_ci                  and either the value of SAMPLE_MASK_VALUE does not have all bits of all words set,
4125bd8deadSopenharmony_ci                  or the fragment shader statically writes to gl_SampleMask.
4135bd8deadSopenharmony_ci                * The fragment shader statically references the gl_FragCoord built-in variable and does
4145bd8deadSopenharmony_ci                  not enable the GL_EXT_fragment_shading_rate extension.
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci            Otherwise, each of the specified shading rates are combined and then used to derive the value of Cxy'.
4175bd8deadSopenharmony_ci            As there are three ways to specify shading rates, two combiner
4185bd8deadSopenharmony_ci            operations are specified - between the pipeline and primitive shading
4195bd8deadSopenharmony_ci            rates, and between the result of that and the attachment shading rate.
4205bd8deadSopenharmony_ci
4215bd8deadSopenharmony_ci            The fragment shading rate combiner operations can controlled with the command
4225bd8deadSopenharmony_ci
4235bd8deadSopenharmony_ci                void ShadingRateCombinerOpsEXT(enum combinerOp0, enum combinerOp1)
4245bd8deadSopenharmony_ci
4255bd8deadSopenharmony_ci            <combinerOps> is an array of combiner equations, specified as:
4265bd8deadSopenharmony_ci
4275bd8deadSopenharmony_ci                * FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT specifies a combiner operation of combine(Axy ,Bxy) = Axy.
4285bd8deadSopenharmony_ci                * FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT specifies a combiner operation of combine(Axy,Bxy) = Bxy.
4295bd8deadSopenharmony_ci                * FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT specifies a combiner operation of combine(Axy,Bxy) = min(Axy,Bxy).
4305bd8deadSopenharmony_ci                * FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT specifies a combiner operation of combine(Axy,Bxy) = max(Axy,Bxy).
4315bd8deadSopenharmony_ci                * FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT specifies a combiner operation of combine(Axy,Bxy) = Axy*Bxy.
4325bd8deadSopenharmony_ci
4335bd8deadSopenharmony_ci            where combine(Axy,Bxy) is the combine operation, and Axy and Bxy are the inputs to the operation.
4345bd8deadSopenharmony_ci
4355bd8deadSopenharmony_ci           The FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT, FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT, and
4365bd8deadSopenharmony_ci           FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT combiner operations are only supported if the value of
4375bd8deadSopenharmony_ci           FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT is TRUE.
4385bd8deadSopenharmony_ci
4395bd8deadSopenharmony_ci           These operations are performed in a component-wise fashion.
4405bd8deadSopenharmony_ci
4415bd8deadSopenharmony_ci           This is used to generate a combined fragment area using the equation:
4425bd8deadSopenharmony_ci
4435bd8deadSopenharmony_ci               Cxy = combine(Axy,Bxy)
4445bd8deadSopenharmony_ci
4455bd8deadSopenharmony_ci           where Cxy is the combined fragment area result, and Axy and Bxy are the fragment areas of the
4465bd8deadSopenharmony_ci           fragment shading rates being combined.
4475bd8deadSopenharmony_ci           Two combine operations are performed, first with Axy equal to the draw call fragment shading rate
4485bd8deadSopenharmony_ci           and Bxy equal to the primitive fragment shading rate, with the combine() operation selected by
4495bd8deadSopenharmony_ci           combinerOp0. A second combination is then performed, with Axy equal to the result of the first
4505bd8deadSopenharmony_ci           combination and Bxy equal to the attachment fragment shading rate, with the combine() operation
4515bd8deadSopenharmony_ci           selected by combinerOp1. The result of the second combination is used as the final fragment
4525bd8deadSopenharmony_ci           shading rate, reported via the ShadingRateKHR built-in.
4535bd8deadSopenharmony_ci           Implementations may clamp the Cxy result of each combiner operation separately, or only after the
4545bd8deadSopenharmony_ci           second combiner operation.
4555bd8deadSopenharmony_ci
4565bd8deadSopenharmony_ci           If the final combined rate is one of the rates returned by GetFragmentShadingRatesEXT for the
4575bd8deadSopenharmony_ci           sample count used by rasterization, Cxy' = Cxy. Otherwise, Cxy' is selected from the rates returned
4585bd8deadSopenharmony_ci           by GetFragmentShadingRatesEXT for the sample count used by rasterization.
4595bd8deadSopenharmony_ci           From this list of supported rates, the following steps are applied in order, to select a single value:
4605bd8deadSopenharmony_ci
4615bd8deadSopenharmony_ci               1. Keep only rates where Cx' ≤ Cx and Cy' ≤ Cy.
4625bd8deadSopenharmony_ci                  * Implementations may also keep rates where Cx' ≤ Cy and Cy' ≤ Cx.
4635bd8deadSopenharmony_ci               2. Keep only rates with the highest area (Cx' × Cy').
4645bd8deadSopenharmony_ci               3. Keep only rates with the lowest aspect ratio (Cx' + Cy').
4655bd8deadSopenharmony_ci               4. In cases where a wide (e.g. 4x1) and tall (e.g. 1x4) rate remain, the implementation may choose
4665bd8deadSopenharmony_ci                  either rate. However, it must choose this rate consistently for the same shading rates and
4675bd8deadSopenharmony_ci                  combiner operations for the lifetime of the GL context.
4685bd8deadSopenharmony_ci
4695bd8deadSopenharmony_ci            Errors
4705bd8deadSopenharmony_ci
4715bd8deadSopenharmony_ci                An INVALID_ENUM error is generated if <combinerOp0> is not
4725bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT,
4735bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT,
4745bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT,
4755bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT, or
4765bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT
4775bd8deadSopenharmony_ci
4785bd8deadSopenharmony_ci                An INVALID_ENUM error is generated if <combinerOp1> is not
4795bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT,
4805bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT,
4815bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT,
4825bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT, or
4835bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT
4845bd8deadSopenharmony_ci
4855bd8deadSopenharmony_ci                An INVALID_OPERATION error is generated if
4865bd8deadSopenharmony_ci                the value of
4875bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT
4885bd8deadSopenharmony_ci                is FALSE and <combinerOp0> is not
4895bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT or
4905bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_ci                An INVALID_OPERATION error is generated if
4935bd8deadSopenharmony_ci                the value of
4945bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT
4955bd8deadSopenharmony_ci                is FALSE and <combinerOp1> is not
4965bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT or
4975bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT
4985bd8deadSopenharmony_ci
4995bd8deadSopenharmony_ci[[If GL_EXT_fragment_shading_rate_primitive is not supported]]
5005bd8deadSopenharmony_ci                An INVALID_OPERATION error is generated if <combinerOp0> is not
5015bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT
5025bd8deadSopenharmony_ci
5035bd8deadSopenharmony_ci[[If GL_EXT_fragment_shading_rate_attachment is not supported]]
5045bd8deadSopenharmony_ci                An INVALID_OPERATION error is generated if <combinerOp1> is not
5055bd8deadSopenharmony_ci                FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT
5065bd8deadSopenharmony_ci
5075bd8deadSopenharmony_ci
5085bd8deadSopenharmony_ci            Section 13.X.5 Sample Shading
5095bd8deadSopenharmony_ci
5105bd8deadSopenharmony_ci            [[The contents from Section 13.4.1, Sample Shading, p. 355 is copied here]]
5115bd8deadSopenharmony_ci
5125bd8deadSopenharmony_ci        Modifications to Section 13.8.2, Scissor Test (p. 367)
5135bd8deadSopenharmony_ci        (add to the end of the section)
5145bd8deadSopenharmony_ci
5155bd8deadSopenharmony_ci        When the _effective shading rate_ results in fragments covering more than one pixel,
5165bd8deadSopenharmony_ci        the scissor tests are performed separately for each pixel in the fragment.
5175bd8deadSopenharmony_ci        If a pixel covered by a fragment fails the scissor test, that pixel is
5185bd8deadSopenharmony_ci        treated as though it was not covered by the primitive.  If all pixels covered
5195bd8deadSopenharmony_ci        by a fragment are either not covered by the primitive being rasterized or fail
5205bd8deadSopenharmony_ci        the scissor test, the fragment is discarded.
5215bd8deadSopenharmony_ci
5225bd8deadSopenharmony_ci        Modifications to Section 13.8.3, Multisample Fragment Operations (p. 368)
5235bd8deadSopenharmony_ci
5245bd8deadSopenharmony_ci       (modify the last sentence of the the first paragraph to indicate that sample mask
5255bd8deadSopenharmony_ci        operations are performed when shading rate is used, even if multisampling is not
5265bd8deadSopenharmony_ci        enabled which can produce fragments covering more than one pixel where each pixel
5275bd8deadSopenharmony_ci        is considered a "sample")
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci        Change the following sentence from:
5305bd8deadSopenharmony_ci            "If the value of SAMPLE_BUFFERS is not one, this step is skipped."
5315bd8deadSopenharmony_ci        to:
5325bd8deadSopenharmony_ci            "This step is skipped if SAMPLE_BUFFERS is not one, unless SHADING_RATE_EXT
5335bd8deadSopenharmony_ci            is set to a value other than SHADING_RATE_1X1_PIXELS_EXT."
5345bd8deadSopenharmony_ci
5355bd8deadSopenharmony_ci        (add to the end of the section)
5365bd8deadSopenharmony_ci
5375bd8deadSopenharmony_ci        When the _effective shading rate_ results in fragments covering more than one pixel,
5385bd8deadSopenharmony_ci        each fragment will generate a composite coverage mask that includes separate
5395bd8deadSopenharmony_ci        coverage bits for each sample in each pixel covered by the fragment.  This
5405bd8deadSopenharmony_ci        composite coverage mask will be used by the GLSL built-in input variable
5415bd8deadSopenharmony_ci        gl_SampleMaskIn[] and updated according to the built-in output variable
5425bd8deadSopenharmony_ci        gl_SampleMask[].  The number of composite coverage mask bits in the built-in
5435bd8deadSopenharmony_ci        variables and their mapping to a specific pixel and sample number
5445bd8deadSopenharmony_ci        within that pixel is implementation-defined.
5455bd8deadSopenharmony_ci
5465bd8deadSopenharmony_ci        Modify Section 14.1, Fragment Shader Variables (p. 370)
5475bd8deadSopenharmony_ci
5485bd8deadSopenharmony_ci        (modify sixth paragraph, p. 371, specifying that the "centroid" location
5495bd8deadSopenharmony_ci         for multi-pixel fragments is implementation-dependent, and is allowed to
5505bd8deadSopenharmony_ci         be outside the primitive)
5515bd8deadSopenharmony_ci
5525bd8deadSopenharmony_ci        After the following sentence:
5535bd8deadSopenharmony_ci            "When interpolating variables declared using "centroid in",
5545bd8deadSopenharmony_ci             the variable is sampled at a location within the pixel covered
5555bd8deadSopenharmony_ci             by the primitive generating the fragment."
5565bd8deadSopenharmony_ci        Add the following sentence:
5575bd8deadSopenharmony_ci            "When the _effective shading rate_ results in fragments covering more than one
5585bd8deadSopenharmony_ci            pixel, variables declared using "centroid in" are sampled from an
5595bd8deadSopenharmony_ci            implementation-dependent location within any one of the covered pixels."
5605bd8deadSopenharmony_ci
5615bd8deadSopenharmony_ci        Modify Section 15.1, Per-Fragment Operations (p. 378)
5625bd8deadSopenharmony_ci
5635bd8deadSopenharmony_ci        (insert a new paragraph after the first paragraph of the section)
5645bd8deadSopenharmony_ci
5655bd8deadSopenharmony_ci        When the _effective shading rate_ results in fragments covering multiple pixels,
5665bd8deadSopenharmony_ci        the operations described in the section are performed independently for
5675bd8deadSopenharmony_ci        each pixel covered by the fragment.  The set of samples covered by each pixel
5685bd8deadSopenharmony_ci        is determined by extracting the portion of the fragment's composite coverage
5695bd8deadSopenharmony_ci        that applies to that pixel, as described in section 13.8.3.
5705bd8deadSopenharmony_ci
5715bd8deadSopenharmony_ci
5725bd8deadSopenharmony_ci        Section 13.X.5 Fragment shading rate queries
5735bd8deadSopenharmony_ci
5745bd8deadSopenharmony_ci        The supported fragment shading rates can be queried with the command
5755bd8deadSopenharmony_ci
5765bd8deadSopenharmony_ci               void GetFragmentShadingRatesEXT(sizei samples, sizei maxCount, sizei *count, enum *shadingRates);
5775bd8deadSopenharmony_ci
5785bd8deadSopenharmony_ci        The actual number of rates written into <shadingRates> is returned in <count>. If no rates are
5795bd8deadSopenharmony_ci        supported, <count> is set to zero. If <count> is NULL then it is ignored. The maximum number of
5805bd8deadSopenharmony_ci        rates that may be written into <shadingRates> is specified by <maxCount>.
5815bd8deadSopenharmony_ci
5825bd8deadSopenharmony_ci        The shading rates must include the combinations listed in Table X.2.
5835bd8deadSopenharmony_ci
5845bd8deadSopenharmony_ci                Samples       |   Shading Rate
5855bd8deadSopenharmony_ci                --------------|--------------------------------
5865bd8deadSopenharmony_ci                1             |   SHADING_RATE_1X1_PIXELS_EXT,
5875bd8deadSopenharmony_ci                              |   SHADING_RATE_1X2_PIXELS_EXT,
5885bd8deadSopenharmony_ci                              |   SHADING_RATE_2X1_PIXELS_EXT,
5895bd8deadSopenharmony_ci                              |   SHADING_RATE_2X2_PIXELS_EXT
5905bd8deadSopenharmony_ci                --------------|--------------------------------
5915bd8deadSopenharmony_ci                4             |   SHADING_RATE_1X1_PIXELS_EXT,
5925bd8deadSopenharmony_ci                              |   SHADING_RATE_1X2_PIXELS_EXT,
5935bd8deadSopenharmony_ci                              |   SHADING_RATE_2X1_PIXELS_EXT,
5945bd8deadSopenharmony_ci                              |   SHADING_RATE_2X2_PIXELS_EXT
5955bd8deadSopenharmony_ci                -----------------------------------------------
5965bd8deadSopenharmony_ci
5975bd8deadSopenharmony_ci                Table X.2:  Required shading rates
5985bd8deadSopenharmony_ci
5995bd8deadSopenharmony_ci
6005bd8deadSopenharmony_ci    New State
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci    Add to table 21.7, Rasterization
6035bd8deadSopenharmony_ci
6045bd8deadSopenharmony_ci    Get Value                               Type  Get Command  Initial Value                     Description              Sec
6055bd8deadSopenharmony_ci    -------------------------------------   ----  -----------  --------------------------------  --------------           ------
6065bd8deadSopenharmony_ci    SHADING_RATE_EXT                        E     GetIntegerv  SHADING_RATE_1X1_PIXELS_EXT       draw call shading rate   13.X.1
6075bd8deadSopenharmony_ci
6085bd8deadSopenharmony_ci
6095bd8deadSopenharmony_ci[[If GL_EXT_fragment_shading_rate_attachment is supported]]
6105bd8deadSopenharmony_ci    Add to table 21.40, Implementation Dependent Values
6115bd8deadSopenharmony_ci
6125bd8deadSopenharmony_ci    Get Value                                                   Type  Get Command  Minimum Value  Description                         Sec
6135bd8deadSopenharmony_ci    -------------------------------------                       ----  -----------  -------------  --------------                      ------
6145bd8deadSopenharmony_ci    MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT        Z+    GetIntegerv  32 (**)        minimum supported width of the      13.X.3
6155bd8deadSopenharmony_ci                                                                                                  portion of the framebuffer
6165bd8deadSopenharmony_ci                                                                                                  corresponding to each texel in
6175bd8deadSopenharmony_ci                                                                                                  a fragment shading rate attachment
6185bd8deadSopenharmony_ci    MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT       Z+    GetIntegerv  32 (**)        minimum supported height of the     13.X.3
6195bd8deadSopenharmony_ci                                                                                                  portion of the framebuffer
6205bd8deadSopenharmony_ci                                                                                                  corresponding to each texel in
6215bd8deadSopenharmony_ci                                                                                                  a fragment shading rate attachment
6225bd8deadSopenharmony_ci    MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT        Z+    GetIntegerv  8              maximum supported width of the      13.X.3
6235bd8deadSopenharmony_ci                                                                                                  portion of the framebuffer
6245bd8deadSopenharmony_ci                                                                                                  corresponding to each texel in
6255bd8deadSopenharmony_ci                                                                                                  a fragment shading rate attachment
6265bd8deadSopenharmony_ci    MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT       Z+    GetIntegerv  8              maximum supported height of the     13.X.3
6275bd8deadSopenharmony_ci                                                                                                  portion of the framebuffer
6285bd8deadSopenharmony_ci                                                                                                  corresponding to each texel in
6295bd8deadSopenharmony_ci                                                                                                  a fragment shading rate attachment
6305bd8deadSopenharmony_ci    MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT Z+    GetIntegerv  1              maximum aspect ratio between the    13.X.3
6315bd8deadSopenharmony_ci                                                                                                  width and height of the portion of
6325bd8deadSopenharmony_ci                                                                                                  the framebuffer corresponding to
6335bd8deadSopenharmony_ci                                                                                                  each texel in a fragment shading
6345bd8deadSopenharmony_ci                                                                                                  rate attachment
6355bd8deadSopenharmony_ci    MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT             Z+    GetIntegerv  1              maximum number of layers in a
6365bd8deadSopenharmony_ci                                                                                                  fragment shading rate attachment    13.X.3     
6375bd8deadSopenharmony_ci    FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT
6385bd8deadSopenharmony_ci                                                                B     GetBooleanv  -              support for writing FragDepth from  13.X.4
6395bd8deadSopenharmony_ci                                                                                                  a fragment shader for multi-pixel
6405bd8deadSopenharmony_ci                                                                                                  fragments                                                                                           
6415bd8deadSopenharmony_ci    FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT        B     GetBooleanv  -              support for sample masks with       13.X.4
6425bd8deadSopenharmony_ci                                                                                                  multi-pixel fragments
6435bd8deadSopenharmony_ci    FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_-                     B    GetBooleanv  -               support for attachment shading      13.X.3
6445bd8deadSopenharmony_ci    DEFAULT_FRAMEBUFFER_SUPPORTED_EXT                                                             rates on the default framebuffer
6455bd8deadSopenharmony_ci    FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT   B    GetBooleanv  -               support for non-trivial combiners   13.X.4
6465bd8deadSopenharmony_ci
6475bd8deadSopenharmony_ci
6485bd8deadSopenharmony_ci    (**) The value of MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT is the maximum allowed, not the minimum
6495bd8deadSopenharmony_ci    (**) The value of MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT is the maximum allowed, not the minimum
6505bd8deadSopenharmony_ci
6515bd8deadSopenharmony_ci
6525bd8deadSopenharmony_ci    Interactions with OVR_Multiview
6535bd8deadSopenharmony_ci
6545bd8deadSopenharmony_ci        If OVR_Multiview is supported, SHADING_RATE_EXT applies to all views.
6555bd8deadSopenharmony_ci
6565bd8deadSopenharmony_ci    Interactions with QCOM_framebuffer_foveated and QCOM_texture_foveated
6575bd8deadSopenharmony_ci
6585bd8deadSopenharmony_ci        QCOM_framebuffer_foveated and QCOM_texture_foveated specify a pixel
6595bd8deadSopenharmony_ci        density which is exposed as a fragment size via the fragment
6605bd8deadSopenharmony_ci        shader built-in gl_FragSizeEXT.  This extension defines an effective
6615bd8deadSopenharmony_ci        shading rate which is exposed to fragment shaders via the shader
6625bd8deadSopenharmony_ci        built-in gl_ShadingRateEXT. If either foveation extension is enabled in
6635bd8deadSopenharmony_ci        conjunction with this extension, then the values of the gl_FragSizeEXT
6645bd8deadSopenharmony_ci        and gl_ShadingRateEXT built-ins will be the component-wise product of
6655bd8deadSopenharmony_ci        both fragment sizes.
6665bd8deadSopenharmony_ci
6675bd8deadSopenharmony_ci    Interactions with GL_EXT_fragment_invocation_density
6685bd8deadSopenharmony_ci
6695bd8deadSopenharmony_ci        If the shader enables the GL_EXT_fragment_invocation_density in combination
6705bd8deadSopenharmony_ci        with this extension, then the gl_FragSizeEXT and gl_FragInvocationCountEXT
6715bd8deadSopenharmony_ci        built-in variables contain the fragment size and the number of invocations,
6725bd8deadSopenharmony_ci        respectively, based on the effective fragment shading rate.
6735bd8deadSopenharmony_ci
6745bd8deadSopenharmony_ci    Interactions with GL_EXT_shader_pixel_local_storage and GL_EXT_shader_pixel_local_storage2
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci        Pixel local storage is not supported in combination with shading
6775bd8deadSopenharmony_ci        rates other than SHADING_RATE_1X1_PIXELS_EXT.
6785bd8deadSopenharmony_ci
6795bd8deadSopenharmony_ci        Attempting to enable pixel local storage while the currently bound
6805bd8deadSopenharmony_ci        framebuffer object has a non-zero value of SHADING_RATE_ATTACHMENT_EXT
6815bd8deadSopenharmony_ci        will generate an INVALID_OPERATION error.
6825bd8deadSopenharmony_ci        Attempting to enable pixel local storage while the current value
6835bd8deadSopenharmony_ci        of SHADING_RATE_EXT is not SHADING_RATE_1X1_PIXELS_EXT will
6845bd8deadSopenharmony_ci        generate an INVALID_OPERATION error.
6855bd8deadSopenharmony_ci        If pixel local storage is enabled, an INVALID_OPERATION error will
6865bd8deadSopenharmony_ci        be generated by ShadingRateEXT if <rate> is not
6875bd8deadSopenharmony_ci        SHADING_RATE_1X1_PIXELS_EXT.
6885bd8deadSopenharmony_ci
6895bd8deadSopenharmony_ci        [[If GL_EXT_fragment_shading_rate_primitive is supported]]
6905bd8deadSopenharmony_ci        A program will fail to link if a per primitive shading rate
6915bd8deadSopenharmony_ci        is specified in a vertex or geometry shader while the fragment
6925bd8deadSopenharmony_ci        shader statically reads or writes to a pixel local storage
6935bd8deadSopenharmony_ci        variable.
6945bd8deadSopenharmony_ci
6955bd8deadSopenharmony_ci    Interactions with GL_EXT_shader_framebuffer_fetch and GL_EXT_shader_framebuffer_fetch_non_coherent
6965bd8deadSopenharmony_ci
6975bd8deadSopenharmony_ci        When the value of SAMPLE_BUFFERS is 0, gl_LastFragData[] is populated with
6985bd8deadSopenharmony_ci        the value last written to one of the pixels to which the current fragment
6995bd8deadSopenharmony_ci        is destined, chosen in an implementation-dependent manner.
7005bd8deadSopenharmony_ci        When the value of SAMPLE_BUFFERS is 1 and the
7015bd8deadSopenharmony_ci        current framebuffer color is accessed in the fragment shader, the fragment
7025bd8deadSopenharmony_ci        shader will be invoked separately for each covered sample. Since this is
7035bd8deadSopenharmony_ci        equivalent to per-sample shading, the fragment shading rate will be set to
7045bd8deadSopenharmony_ci        {1,1} in this case.
7055bd8deadSopenharmony_ci
7065bd8deadSopenharmony_ci    Interactions with GL_ARM_shader_framebuffer_fetch and GL_ARM_shader_framebuffer_fetch_depth_stencil
7075bd8deadSopenharmony_ci
7085bd8deadSopenharmony_ci        If FETCH_PER_SAMPLE_ARM is enabled, the fragment shading rate is set to {1,1}.
7095bd8deadSopenharmony_ci
7105bd8deadSopenharmony_ci        Otherwise, the values of gl_LastFragColorARM, gl_LastFragDepthARM and
7115bd8deadSopenharmony_ci        gl_LastFragStencilARM, is the color, depth, or stencil value, respectively,
7125bd8deadSopenharmony_ci        is an implementation-dependent combination of the values of the pixels to which
7135bd8deadSopenharmony_ci        the current fragment is destined.
7145bd8deadSopenharmony_ci        If the current render target is multisampled, the values are an
7155bd8deadSopenharmony_ci        implementation-dependent combination of the samples covered by the fragment.
7165bd8deadSopenharmony_ci
7175bd8deadSopenharmony_ci    Issues
7185bd8deadSopenharmony_ci
7195bd8deadSopenharmony_ci        (1) Do we need individual 'feature bits' for the draw call, primitive, and
7205bd8deadSopenharmony_ci            attachment shading rates?
7215bd8deadSopenharmony_ci
7225bd8deadSopenharmony_ci        RESOLVED: Yes.
7235bd8deadSopenharmony_ci
7245bd8deadSopenharmony_ci        This extension exposes different extension strings for these features:
7255bd8deadSopenharmony_ci         * GL_EXT_fragment_shading_rate is the baseline, and requires per draw call shading rates
7265bd8deadSopenharmony_ci         * GL_EXT_fragment_shading_rate_attachment adds support for shading rate attachments
7275bd8deadSopenharmony_ci         * GL_EXT_fragment_shading_rate_primitive adds support for per primitive shading rates
7285bd8deadSopenharmony_ci
7295bd8deadSopenharmony_ci        (2) What optional parameters and options should we expose?
7305bd8deadSopenharmony_ci
7315bd8deadSopenharmony_ci        RESOLVED: For reference, the Vulkan VK_KHR_fragment_shading_rate extension has the
7325bd8deadSopenharmony_ci        following properties:
7335bd8deadSopenharmony_ci
7345bd8deadSopenharmony_ci        typedef struct VkPhysicalDeviceFragmentShadingRatePropertiesKHR {
7355bd8deadSopenharmony_ci            VkStructureType          sType;
7365bd8deadSopenharmony_ci            void*                    pNext;
7375bd8deadSopenharmony_ci            VkExtent2D               minFragmentShadingRateAttachmentTexelSize;
7385bd8deadSopenharmony_ci            VkExtent2D               maxFragmentShadingRateAttachmentTexelSize;
7395bd8deadSopenharmony_ci            uint32_t                 maxFragmentShadingRateAttachmentTexelSizeAspectRatio;
7405bd8deadSopenharmony_ci            VkBool32                 primitiveFragmentShadingRateWithMultipleViewports;
7415bd8deadSopenharmony_ci            VkBool32                 layeredShadingRateAttachments;
7425bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateNonTrivialCombinerOps;
7435bd8deadSopenharmony_ci            VkExtent2D               maxFragmentSize;
7445bd8deadSopenharmony_ci            uint32_t                 maxFragmentSizeAspectRatio;
7455bd8deadSopenharmony_ci            uint32_t                 maxFragmentShadingRateCoverageSamples;
7465bd8deadSopenharmony_ci            VkSampleCountFlagBits    maxFragmentShadingRateRasterizationSamples;
7475bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateWithShaderDepthStencilWrites;
7485bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateWithSampleMask;
7495bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateWithShaderSampleMask;
7505bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateWithConservativeRasterization;
7515bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateWithFragmentShaderInterlock;
7525bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateWithCustomSampleLocations;
7535bd8deadSopenharmony_ci            VkBool32                 fragmentShadingRateStrictMultiplyCombiner;
7545bd8deadSopenharmony_ci        } VkPhysicalDeviceFragmentShadingRatePropertiesKHR;
7555bd8deadSopenharmony_ci
7565bd8deadSopenharmony_ci       The mapping to this extension is as follows:
7575bd8deadSopenharmony_ci
7585bd8deadSopenharmony_ci            minFragmentShadingRateAttachmentTexelSize              => MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT
7595bd8deadSopenharmony_ci                                                                      MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT
7605bd8deadSopenharmony_ci            maxFragmentShadingRateAttachmentTexelSize              => MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT
7615bd8deadSopenharmony_ci                                                                      MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT
7625bd8deadSopenharmony_ci            maxFragmentShadingRateAttachmentTexelSizeAspectRatio   => MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT
7635bd8deadSopenharmony_ci            primitiveFragmentShadingRateWithMultipleViewports      => - (not supported; would be an interaction with GL_OES_viewport_array)
7645bd8deadSopenharmony_ci            layeredShadingRateAttachments                          => MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT
7655bd8deadSopenharmony_ci            fragmentShadingRateNonTrivialCombinerOps               => FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT
7665bd8deadSopenharmony_ci            maxFragmentSize                                        => - (not exposed as a limit; min requirements are stated in description of GetFragmentShadingRatesEXT)
7675bd8deadSopenharmony_ci            maxFragmentSizeAspectRatio                             => - (not exposed as a limit; min requirements are stated in description of GetFragmentShadingRatesEXT)
7685bd8deadSopenharmony_ci            maxFragmentShadingRateCoverageSamples                  => - (not exposed as a limit; min requirements are stated in description of GetFragmentShadingRatesEXT)
7695bd8deadSopenharmony_ci            maxFragmentShadingRateRasterizationSamples             => - (not exposed as a limit; min requirements are stated in description of GetFragmentShadingRatesEXT)
7705bd8deadSopenharmony_ci            fragmentShadingRateWithShaderDepthStencilWrites        => FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT
7715bd8deadSopenharmony_ci            fragmentShadingRateWithSampleMask                      => FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT
7725bd8deadSopenharmony_ci            fragmentShadingRateWithShaderSampleMask                => FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT
7735bd8deadSopenharmony_ci            fragmentShadingRateWithConservativeRasterization       => - (not supported; would be an interaction with GL_NV_conservative_raster and GL_INTEL_conservative_rasterization)
7745bd8deadSopenharmony_ci            fragmentShadingRateWithFragmentShaderInterlock         => - (not supported; would be an interaction with GL_NV_fragment_shader_interlock)
7755bd8deadSopenharmony_ci            fragmentShadingRateWithCustomSampleLocations           => - (not supported; would be an interaction with GL_NV_sample_locations)
7765bd8deadSopenharmony_ci            fragmentShadingRateStrictMultiplyCombiner              => - (implicitly required)
7775bd8deadSopenharmony_ci
7785bd8deadSopenharmony_ci      (3) Should we add enumerants for 1x4 and 4x1 shading rates?
7795bd8deadSopenharmony_ci
7805bd8deadSopenharmony_ci        RESOLVED: Yes, they are all included, but support is optional.
7815bd8deadSopenharmony_ci
7825bd8deadSopenharmony_ci      (4) Should we have an equivalent to PRESERVE_SHADING_RATE_ASPECT_RATIO_QCOM
7835bd8deadSopenharmony_ci          from QCOM_shading_rate?
7845bd8deadSopenharmony_ci
7855bd8deadSopenharmony_ci        RESOLVED: No. This extension follows the conventions of the
7865bd8deadSopenharmony_ci        VK_KHR_fragment_shading_rate extension, where the aspect ratios are
7875bd8deadSopenharmony_ci        constrained in a slightly different way than in QCOM_shading_rate.
7885bd8deadSopenharmony_ci
7895bd8deadSopenharmony_ci      (5) Should the GLSL dependency be on GL_EXT_fragment_invocation_density or
7905bd8deadSopenharmony_ci          GLSL_EXT_fragment_shading_rate?
7915bd8deadSopenharmony_ci
7925bd8deadSopenharmony_ci        RESOLVED: Primarily GL_EXT_fragment_shading_rate, but
7935bd8deadSopenharmony_ci        GL_EXT_fragment_invocation_density is also sufficient unless
7945bd8deadSopenharmony_ci        GL_EXT_fragment_shading_rate_primitive is used.
7955bd8deadSopenharmony_ci
7965bd8deadSopenharmony_ci      (6) What is the interaction with QCOM_framebuffer_foveated and QCOM_texture_foveated?
7975bd8deadSopenharmony_ci
7985bd8deadSopenharmony_ci        RESOLVED: See Interactions.
7995bd8deadSopenharmony_ci
8005bd8deadSopenharmony_ci      (7) What fragment shading rates should be required?
8015bd8deadSopenharmony_ci
8025bd8deadSopenharmony_ci        RESOLVED: The current draft matches the minimum requirements in other APIs
8035bd8deadSopenharmony_ci        (assuming 2xMSAA is not supported).
8045bd8deadSopenharmony_ci
8055bd8deadSopenharmony_ci     (8) What are the interactions with GL_EXT_fragment_invocation_density?
8065bd8deadSopenharmony_ci
8075bd8deadSopenharmony_ci        REESOLVED: If a shader declares that extension (and the implementation
8085bd8deadSopenharmony_ci        supports it), then the built-in variables defined by the extension
8095bd8deadSopenharmony_ci        will be filled with values representing the effective fragment shading
8105bd8deadSopenharmony_ci        rate.
8115bd8deadSopenharmony_ci
8125bd8deadSopenharmony_ci     (9) How do we handle gl_FragCoord in the cases where the shader does not
8135bd8deadSopenharmony_ci         enable GL_EXT_fragment_shading_rate?
8145bd8deadSopenharmony_ci
8155bd8deadSopenharmony_ci        RESOLVED: We fall back to 1x1 shading rate.
8165bd8deadSopenharmony_ci
8175bd8deadSopenharmony_ci        The implementation may need to calculate gl_FragCoord differently depending
8185bd8deadSopenharmony_ci        on the shading rate. But the shading rate is not known at shader
8195bd8deadSopenharmony_ci        compile-time. The implementation could add instructions to the shader
8205bd8deadSopenharmony_ci        to handle this, but that could affect performance in the general case
8215bd8deadSopenharmony_ci        - even when no shading rate is specified.
8225bd8deadSopenharmony_ci
8235bd8deadSopenharmony_ci        A potential solution is to fallback to a 1x1 shading rate if the shader
8245bd8deadSopenharmony_ci        accesses gl_FragCoord unless GL_EXT_fragment_shading_rate is enabled.
8255bd8deadSopenharmony_ci        Enabling the extension acts as a hint that the shading rate will be
8265bd8deadSopenharmony_ci        specified at run-time.
8275bd8deadSopenharmony_ci
8285bd8deadSopenharmony_ci    (10) How does this compare to GL_NV_shading_rate_image and
8295bd8deadSopenharmony_ci         GL_NV_primitive_shading_rate?
8305bd8deadSopenharmony_ci
8315bd8deadSopenharmony_ci        RESOLVED: GL_NV_shading_rate_image and GL_NV_primitive_shading_rate
8325bd8deadSopenharmony_ci        offer similar functionality as this extension, but exposes it in a
8335bd8deadSopenharmony_ci        slightly different way.
8345bd8deadSopenharmony_ci
8355bd8deadSopenharmony_ci        Differences include:
8365bd8deadSopenharmony_ci         - This extension does not include the concept of a shader rate image
8375bd8deadSopenharmony_ci           palette. In the case where no shading image is bound,
8385bd8deadSopenharmony_ci           GL_NV_shading_rate_image uses the palette to provide a per draw-call
8395bd8deadSopenharmony_ci           rate. This extension sets the per-draw call rate separately.
8405bd8deadSopenharmony_ci        - GL_NV_shading_rate_image does not include rate combiners.
8415bd8deadSopenharmony_ci        - GL_NV_shading_rate_image does not allow the shading rates to be
8425bd8deadSopenharmony_ci          changed for the default framebuffer.
8435bd8deadSopenharmony_ci        - This extension binds the shading rate as a framebuffer attachment,
8445bd8deadSopenharmony_ci          GL_NV_shading_rate_image binds it directly to the state vector.
8455bd8deadSopenharmony_ci
8465bd8deadSopenharmony_ci    (11) Should we include any functionality or restrictions from
8475bd8deadSopenharmony_ci         GL_NV_shading_rate_image?
8485bd8deadSopenharmony_ci
8495bd8deadSopenharmony_ci       RESOLVED:
8505bd8deadSopenharmony_ci
8515bd8deadSopenharmony_ci       Interactions with ARB_fragment_shader_interlock are not included
8525bd8deadSopenharmony_ci       No equivalent of ShadingRateImageBarrierNV is included
8535bd8deadSopenharmony_ci       No equivalent of ShadingRateSampleOrderNV and ShadingRateSampleOrderCustomNV
8545bd8deadSopenharmony_ci       is included.
8555bd8deadSopenharmony_ci       Restrictions on using fragment shading rate with the default framebuffer
8565bd8deadSopenharmony_ci       are included - by the DEFAULT_FRAMEBUFFER_SUPPORTED_EXT state.
8575bd8deadSopenharmony_ci
8585bd8deadSopenharmony_ci    (12) Can we reuse the shading rate enumeration values from
8595bd8deadSopenharmony_ci         GL_QCOM_shading_rate?
8605bd8deadSopenharmony_ci
8615bd8deadSopenharmony_ci       RESOLVED: Yes, since the semantics are identical.
8625bd8deadSopenharmony_ci
8635bd8deadSopenharmony_ci
8645bd8deadSopenharmony_ci    Revision History
8655bd8deadSopenharmony_ci
8665bd8deadSopenharmony_ci        Rev.    Date     Author    Changes
8675bd8deadSopenharmony_ci        ----  --------   --------  ----------------------------------------------
8685bd8deadSopenharmony_ci         1    2022-05-30 jhf       Initial EXT draft
8695bd8deadSopenharmony_ci         2    2022-07-07 jhf       Fixed typos in the spec text
870