15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    OES_tessellation_shader
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_OES_tessellation_shader
85bd8deadSopenharmony_ci    GL_OES_tessellation_point_size
95bd8deadSopenharmony_ci
105bd8deadSopenharmony_ciContact
115bd8deadSopenharmony_ci
125bd8deadSopenharmony_ci    Jon Leech (oddhack 'at' sonic.net)
135bd8deadSopenharmony_ci    Daniel Koch, NVIDIA (dkoch 'at' nvidia.com)
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ciContributors
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ci    Daniel Koch, NVIDIA (dkoch 'at' nvidia.com)
185bd8deadSopenharmony_ci    Pat Brown, NVIDIA (pbrown 'at' nvidia.com)
195bd8deadSopenharmony_ci    Bill Licea-Kane, Qualcomm (billl 'at' qti.qualcomm.com)
205bd8deadSopenharmony_ci    Jesse Hall, Google (jessehall 'at' google.com)
215bd8deadSopenharmony_ci    Dominik Witczak, Mobica
225bd8deadSopenharmony_ci    Jan-Harald Fredriksen, ARM
235bd8deadSopenharmony_ci    Maurice Ribble, Qualcomm
245bd8deadSopenharmony_ci    Vineet Goel, Qualcomm
255bd8deadSopenharmony_ci    Alex Chalfin, ARM
265bd8deadSopenharmony_ci    Graham Connor, Imagination
275bd8deadSopenharmony_ci    Ben Bowman, Imagination
285bd8deadSopenharmony_ci    Jonathan Putsman, Imagination
295bd8deadSopenharmony_ci    Slawomir Grajewski, Intel
305bd8deadSopenharmony_ci    Contributors to ARB_tessellation_shader
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciNotice
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    Copyright (c) 2010-2016 The Khronos Group Inc. Copyright terms at
355bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ciSpecification Update Policy
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
405bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL ES Working Group. For
415bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
425bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
435bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
445bd8deadSopenharmony_ci    described in more detail at
455bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    Portions Copyright (c) 2013-2014 NVIDIA Corporation.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciStatus
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    Approved by the OpenGL ES Working Group
525bd8deadSopenharmony_ci    Ratified by the Khronos Board of Promoters on November 7, 2014
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ciVersion
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    Last Modified Date: December 10, 2018
575bd8deadSopenharmony_ci    Revision: 7
585bd8deadSopenharmony_ci
595bd8deadSopenharmony_ciNumber
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    OpenGL ES Extension #214
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ciDependencies
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    OpenGL ES 3.1 and OpenGL ES Shading Language 3.10 are required.
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    This specification is written against the OpenGL ES 3.1 (March 17, 2014)
685bd8deadSopenharmony_ci    and OpenGL ES 3.10 Shading Language (March 17, 2014) Specifications.
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    OES_geometry_shader is required in order to share language modifying the
715bd8deadSopenharmony_ci    OpenGL ES 3.1 specifications, which would otherwise have to be repeated
725bd8deadSopenharmony_ci    here.
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ci    OES_shader_io_blocks or EXT_shader_io_blocks is required.
755bd8deadSopenharmony_ci
765bd8deadSopenharmony_ci    OES_gpu_shader5 or EXT_gpu_shader5 is required.
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ci    This extension interacts with OES_shader_multisample_interpolation.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ciOverview
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    This extension introduces new tessellation stages and two new shader types
835bd8deadSopenharmony_ci    to the OpenGL ES primitive processing pipeline.  These pipeline stages
845bd8deadSopenharmony_ci    operate on a new basic primitive type, called a patch.  A patch consists
855bd8deadSopenharmony_ci    of a fixed-size collection of vertices, each with per-vertex attributes,
865bd8deadSopenharmony_ci    plus a number of associated per-patch attributes.  Tessellation control
875bd8deadSopenharmony_ci    shaders transform an input patch specified by the application, computing
885bd8deadSopenharmony_ci    per-vertex and per-patch attributes for a new output patch.  A
895bd8deadSopenharmony_ci    fixed-function tessellation primitive generator subdivides the patch, and
905bd8deadSopenharmony_ci    tessellation evaluation shaders are used to compute the position and
915bd8deadSopenharmony_ci    attributes of each vertex produced by the tessellator.
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    When tessellation is active, it begins by running the optional
945bd8deadSopenharmony_ci    tessellation control shader.  This shader consumes an input patch and
955bd8deadSopenharmony_ci    produces a new fixed-size output patch.  The output patch consists of an
965bd8deadSopenharmony_ci    array of vertices, and a set of per-patch attributes.  The per-patch
975bd8deadSopenharmony_ci    attributes include tessellation levels that control how finely the patch
985bd8deadSopenharmony_ci    will be tessellated.  For each patch processed, multiple tessellation
995bd8deadSopenharmony_ci    control shader invocations are performed -- one per output patch vertex.
1005bd8deadSopenharmony_ci    Each tessellation control shader invocation writes all the attributes of
1015bd8deadSopenharmony_ci    its corresponding output patch vertex.  A tessellation control shader may
1025bd8deadSopenharmony_ci    also read the per-vertex outputs of other tessellation control shader
1035bd8deadSopenharmony_ci    invocations, as well as read and write shared per-patch outputs.  The
1045bd8deadSopenharmony_ci    tessellation control shader invocations for a single patch effectively run
1055bd8deadSopenharmony_ci    as a group.  A built-in barrier() function is provided to allow
1065bd8deadSopenharmony_ci    synchronization points where no shader invocation will continue until all
1075bd8deadSopenharmony_ci    shader invocations have reached the barrier.
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci    The tessellation primitive generator then decomposes a patch into a new
1105bd8deadSopenharmony_ci    set of primitives using the tessellation levels to determine how finely
1115bd8deadSopenharmony_ci    tessellated the output should be.  The primitive generator begins with
1125bd8deadSopenharmony_ci    either a triangle or a quad, and splits each outer edge of the primitive
1135bd8deadSopenharmony_ci    into a number of segments approximately equal to the corresponding element
1145bd8deadSopenharmony_ci    of the outer tessellation level array.  The interior of the primitive is
1155bd8deadSopenharmony_ci    tessellated according to elements of the inner tessellation level array.
1165bd8deadSopenharmony_ci    The primitive generator has three modes:  "triangles" and "quads" split a
1175bd8deadSopenharmony_ci    triangular or quad-shaped patch into a set of triangles that cover the
1185bd8deadSopenharmony_ci    original patch; "isolines" splits a quad-shaped patch into a set of line
1195bd8deadSopenharmony_ci    strips running across the patch horizontally.  Each vertex generated by
1205bd8deadSopenharmony_ci    the tessellation primitive generator is assigned a (u,v) or (u,v,w)
1215bd8deadSopenharmony_ci    coordinate indicating its relative location in the subdivided triangle or
1225bd8deadSopenharmony_ci    quad.
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci    For each vertex produced by the tessellation primitive generator, the
1255bd8deadSopenharmony_ci    tessellation evaluation shader is run to compute its position and other
1265bd8deadSopenharmony_ci    attributes of the vertex, using its (u,v) or (u,v,w) coordinate.  When
1275bd8deadSopenharmony_ci    computing final vertex attributes, the tessellation evaluation shader can
1285bd8deadSopenharmony_ci    also read the attributes of any of the vertices of the patch written by
1295bd8deadSopenharmony_ci    the tessellation control shader.  Tessellation evaluation shader
1305bd8deadSopenharmony_ci    invocations are completely independent, although all invocations for a
1315bd8deadSopenharmony_ci    single patch share the same collection of input vertices and per-patch
1325bd8deadSopenharmony_ci    attributes.
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    The tessellator operates on vertices after they have been transformed by a
1355bd8deadSopenharmony_ci    vertex shader.  The primitives generated by the tessellator are passed
1365bd8deadSopenharmony_ci    further down the OpenGL ES pipeline, where they can be used as inputs to
1375bd8deadSopenharmony_ci    geometry shaders, transform feedback, and the rasterizer.
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ci    The tessellation control and evaluation shaders are both optional.  If
1405bd8deadSopenharmony_ci    neither shader type is present, the tessellation stage has no effect.
1415bd8deadSopenharmony_ci    However, if either a tessellation control or a tessellation evaluation
1425bd8deadSopenharmony_ci    shader is present, the other must also be present.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci    Not all tessellation shader implementations have the ability to write the
1455bd8deadSopenharmony_ci    point size from a tessellation shader. Thus a second extension string and
1465bd8deadSopenharmony_ci    shading language enable are provided for implementations which do
1475bd8deadSopenharmony_ci    support tessellation shader point size.
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci    This extension relies on the OES_shader_io_blocks or EXT_shader_io_blocks
1505bd8deadSopenharmony_ci    extension to provide the required functionality for declaring input and
1515bd8deadSopenharmony_ci    output blocks and interfacing between shaders.
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    This extension relies on the OES_gpu_shader5 or EXT_gpu_shader5 extension
1545bd8deadSopenharmony_ci    to provide the 'precise' and 'fma' functionality which are necessary to
1555bd8deadSopenharmony_ci    ensure crack-free tessellation.
1565bd8deadSopenharmony_ci
1575bd8deadSopenharmony_ciIP Status
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ci    No known IP claims.
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ciNew Procedures and Functions
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci      void PatchParameteriOES(enum pname, int value);
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ciNew Tokens
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    Accepted by the <mode> parameter of DrawArrays, DrawElements,
1685bd8deadSopenharmony_ci    and other commands which draw primitives:
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci        PATCHES_OES                                         0xE
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci    Accepted by the <pname> parameter of PatchParameteriOES, GetBooleanv,
1735bd8deadSopenharmony_ci    GetFloatv, GetIntegerv, and GetInteger64v:
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ci        PATCH_VERTICES_OES                                  0x8E72
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetProgramiv:
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ci        TESS_CONTROL_OUTPUT_VERTICES_OES                    0x8E75
1805bd8deadSopenharmony_ci        TESS_GEN_MODE_OES                                   0x8E76
1815bd8deadSopenharmony_ci        TESS_GEN_SPACING_OES                                0x8E77
1825bd8deadSopenharmony_ci        TESS_GEN_VERTEX_ORDER_OES                           0x8E78
1835bd8deadSopenharmony_ci        TESS_GEN_POINT_MODE_OES                             0x8E79
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ci    Returned by GetProgramiv when <pname> is TESS_GEN_MODE_OES:
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ci        TRIANGLES
1885bd8deadSopenharmony_ci        ISOLINES_OES                                        0x8E7A
1895bd8deadSopenharmony_ci        QUADS_OES                                           0x0007
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci    Returned by GetProgramiv when <pname> is TESS_GEN_SPACING_OES:
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci        EQUAL
1945bd8deadSopenharmony_ci        FRACTIONAL_ODD_OES                                  0x8E7B
1955bd8deadSopenharmony_ci        FRACTIONAL_EVEN_OES                                 0x8E7C
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci    Returned by GetProgramiv when <pname> is TESS_GEN_VERTEX_ORDER_OES:
1985bd8deadSopenharmony_ci
1995bd8deadSopenharmony_ci        CCW
2005bd8deadSopenharmony_ci        CW
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci    Returned by GetProgramiv when <pname> is TESS_GEN_POINT_MODE_OES:
2035bd8deadSopenharmony_ci
2045bd8deadSopenharmony_ci        FALSE
2055bd8deadSopenharmony_ci        TRUE
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetFloatv,
2085bd8deadSopenharmony_ci    GetIntegerv, and GetInteger64v:
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ci        MAX_PATCH_VERTICES_OES                              0x8E7D
2115bd8deadSopenharmony_ci        MAX_TESS_GEN_LEVEL_OES                              0x8E7E
2125bd8deadSopenharmony_ci        MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES             0x8E7F
2135bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES          0x8E80
2145bd8deadSopenharmony_ci        MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES            0x8E81
2155bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES         0x8E82
2165bd8deadSopenharmony_ci        MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES              0x8E83
2175bd8deadSopenharmony_ci        MAX_TESS_PATCH_COMPONENTS_OES                       0x8E84
2185bd8deadSopenharmony_ci        MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES        0x8E85
2195bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES           0x8E86
2205bd8deadSopenharmony_ci        MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES                 0x8E89
2215bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES              0x8E8A
2225bd8deadSopenharmony_ci        MAX_TESS_CONTROL_INPUT_COMPONENTS_OES               0x886C
2235bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES            0x886D
2245bd8deadSopenharmony_ci        MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES    0x8E1E
2255bd8deadSopenharmony_ci        MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES 0x8E1F
2265bd8deadSopenharmony_ci        MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES         0x92CD
2275bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES      0x92CE
2285bd8deadSopenharmony_ci        MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES                0x92D3
2295bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES             0x92D4
2305bd8deadSopenharmony_ci        MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES                 0x90CB
2315bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES              0x90CC
2325bd8deadSopenharmony_ci        MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES          0x90D8
2335bd8deadSopenharmony_ci        MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES       0x90D9
2345bd8deadSopenharmony_ci        PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES         0x8221
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci    Accepted by the <props> parameter of
2375bd8deadSopenharmony_ci    GetProgramResourceiv:
2385bd8deadSopenharmony_ci
2395bd8deadSopenharmony_ci        IS_PER_PATCH_OES                                    0x92E7
2405bd8deadSopenharmony_ci        REFERENCED_BY_TESS_CONTROL_SHADER_OES               0x9307
2415bd8deadSopenharmony_ci        REFERENCED_BY_TESS_EVALUATION_SHADER_OES            0x9308
2425bd8deadSopenharmony_ci
2435bd8deadSopenharmony_ci    Accepted by the <type> parameter of CreateShader, by the <pname>
2445bd8deadSopenharmony_ci    parameter of GetProgramPipelineiv, and returned by the
2455bd8deadSopenharmony_ci    <params> parameter of GetShaderiv:
2465bd8deadSopenharmony_ci
2475bd8deadSopenharmony_ci        TESS_EVALUATION_SHADER_OES                          0x8E87
2485bd8deadSopenharmony_ci        TESS_CONTROL_SHADER_OES                             0x8E88
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ci    Accepted by the <stages> parameter of UseProgramStages:
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci        TESS_CONTROL_SHADER_BIT_OES                     0x00000008
2535bd8deadSopenharmony_ci        TESS_EVALUATION_SHADER_BIT_OES                  0x00000010
2545bd8deadSopenharmony_ci
2555bd8deadSopenharmony_ciAdditions to the OpenGL ES 3.1 Specification
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci    Modify chapter 3 "Dataflow Model"
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ci    Change the second paragraph, on p. 28:
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci    ... In the next stage vertices may be transformed, followed by assembly
2625bd8deadSopenharmony_ci    into geometric primitives. Tessellation and geometry shaders may then
2635bd8deadSopenharmony_ci    optionally generate multiple new primitives from single input
2645bd8deadSopenharmony_ci    primitives. Optionally, the results ...
2655bd8deadSopenharmony_ci
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ci    Modify figure 3.1 "Block diagram of the OpenGL ES pipeline" as modified
2685bd8deadSopenharmony_ci    by OES_geometry_shader to insert new boxes "Tessellation Control
2695bd8deadSopenharmony_ci    Shader", "Tessellation Primitive Generation", and "Tessellation
2705bd8deadSopenharmony_ci    Evaluation Shader" in sequence following "Vertex Shader" and preceding
2715bd8deadSopenharmony_ci    "Geometry Shader". Extend the arrows from the boxes "Image Load/Store"
2725bd8deadSopenharmony_ci    .. "Uniform Block" to the right of "Vertex Shader" to connect to the new
2735bd8deadSopenharmony_ci    "Control" and "Evaluation" boxes.
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci
2765bd8deadSopenharmony_ci    Replace the two paragraphs of chapter 7, "Programs and Shaders" on p. 64
2775bd8deadSopenharmony_ci    starting "Shader stages including ..." with:
2785bd8deadSopenharmony_ci
2795bd8deadSopenharmony_ci    Shader stages including vertex, tessellation control, tessellation
2805bd8deadSopenharmony_ci    evaluation, geometry, fragment, and compute shaders can be created,
2815bd8deadSopenharmony_ci    compiled, and linked into program objects.
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ci    Vertex shaders describe the operations that occur on vertex attributes.
2845bd8deadSopenharmony_ci    Tessellation control and evaluation shaders are used to control
2855bd8deadSopenharmony_ci    the operation of the tessellator (see section 11.1ts). Geometry shaders
2865bd8deadSopenharmony_ci    affect the processing of primitives assembled from vertices (see section
2875bd8deadSopenharmony_ci    11.1gs). Fragment shaders affect the processing of fragments during
2885bd8deadSopenharmony_ci    rasterization (see chapter 14). A single program object can contain all
2895bd8deadSopenharmony_ci    of these shaders, or any subset thereof.
2905bd8deadSopenharmony_ci
2915bd8deadSopenharmony_ci    Compute shaders ...
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ci
2945bd8deadSopenharmony_ci    Add to table 7.1 "CreateShader <type> values" on p. 65:
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci        <type>                     Shader Stage
2975bd8deadSopenharmony_ci        -------------------------- ------------------------------
2985bd8deadSopenharmony_ci        TESS_CONTROL_SHADER_OES    Tessellation control shader
2995bd8deadSopenharmony_ci        TESS_EVALUATION_SHADER_OES Tessellation evaluation shader
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci
3025bd8deadSopenharmony_ci    Add to the bullet list describing reasons for link failure below the
3035bd8deadSopenharmony_ci    LinkProgram command on p. 70, as modified by OES_geometry_shader:
3045bd8deadSopenharmony_ci
3055bd8deadSopenharmony_ci    * The program object contains an object to form a tessellation control
3065bd8deadSopenharmony_ci      shader (see section 11.1ts.1), and
3075bd8deadSopenharmony_ci      - the program is not separable and contains no object to form a
3085bd8deadSopenharmony_ci        vertex shader; or
3095bd8deadSopenharmony_ci      - the program is not separable and contains no object to form a
3105bd8deadSopenharmony_ci        tessellation evaluation shader; or
3115bd8deadSopenharmony_ci      - the output patch vertex count is not specified in the compiled
3125bd8deadSopenharmony_ci        tessellation control shader object.
3135bd8deadSopenharmony_ci    * The program object contains an object to form a tessellation
3145bd8deadSopenharmony_ci      evaluation shader (see section 11.1ts.3), and
3155bd8deadSopenharmony_ci      - the program is not separable and contains no object to form a
3165bd8deadSopenharmony_ci        vertex shader; or
3175bd8deadSopenharmony_ci      - the program is not separable and contains no object to form a
3185bd8deadSopenharmony_ci        tessellation control shader; or
3195bd8deadSopenharmony_ci      - the tessellation primitive mode is not specified in the compiled
3205bd8deadSopenharmony_ci        tessellation evaluation shader object.
3215bd8deadSopenharmony_ci
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci    Modify section 7.3, "Program Objects", as modified by
3245bd8deadSopenharmony_ci    OES_geometry_shader:
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci    Add to the second paragraph after UseProgram on p. 71:
3275bd8deadSopenharmony_ci
3285bd8deadSopenharmony_ci    The executable code ... the results of vertex and/or fragment processing
3295bd8deadSopenharmony_ci    will be undefined. However, this is not an error. If there is no active
3305bd8deadSopenharmony_ci    program for the tessellation control, tessellation evaluation, or
3315bd8deadSopenharmony_ci    geometry shader stages, those stages are ignored. If there is no active
3325bd8deadSopenharmony_ci    program for the compute shader stage ...
3335bd8deadSopenharmony_ci
3345bd8deadSopenharmony_ci
3355bd8deadSopenharmony_ci    Modify section 7.3.1, Program Interfaces:
3365bd8deadSopenharmony_ci
3375bd8deadSopenharmony_ci    Modify table 7.2 "GetProgramResourceiv properties and supported
3385bd8deadSopenharmony_ci    interfaces" on p. 81 to add "REFERENCED_BY_TESS_CONTROL_SHADER_OES" and
3395bd8deadSopenharmony_ci    "REFERENCED_BY_TESS_EVALUATION_SHADER_OES" to the "Property" cell
3405bd8deadSopenharmony_ci    already containing REFERENCED_BY_<stage>_SHADER for VERTEX, GEOMETRY,
3415bd8deadSopenharmony_ci    FRAGMENT, and COMPUTE stages, with the same supported interfaces.
3425bd8deadSopenharmony_ci
3435bd8deadSopenharmony_ci    Add to table 7.2:
3445bd8deadSopenharmony_ci
3455bd8deadSopenharmony_ci      Property                                 Supported Interfaces
3465bd8deadSopenharmony_ci      ---------------------------------------- -----------------------------
3475bd8deadSopenharmony_ci      IS_PER_PATCH_OES                         PROGRAM_INPUT, PROGRAM_OUTPUT
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci    Add a new paragraph preceding the paragraph "For property IS_ROW_MAJOR"
3505bd8deadSopenharmony_ci    on p. 83:
3515bd8deadSopenharmony_ci
3525bd8deadSopenharmony_ci    For the property IS_PER_PATCH_OES, a single integer identifying whether
3535bd8deadSopenharmony_ci    the input or output is a per-patch attribute is written to <params>. If
3545bd8deadSopenharmony_ci    the active variable is a per-patch attribute (declared with the "patch"
3555bd8deadSopenharmony_ci    qualifier), the value one is written to <params>; otherwise the value
3565bd8deadSopenharmony_ci    zero is written to <params>.
3575bd8deadSopenharmony_ci
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci    Add tessellation shaders to the paragraph describing the REFERENCED_BY
3605bd8deadSopenharmony_ci    properties, on p. 83:
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci    For the properties REFERENCED_BY_VERTEX_SHADER,
3635bd8deadSopenharmony_ci    REFERENCED_BY_TESS_CONTROL_SHADER_OES,
3645bd8deadSopenharmony_ci    REFERENCED_BY_TESS_EVALUATION_SHADER_OES,
3655bd8deadSopenharmony_ci    REFERENCED_BY_GEOMETRY_SHADER_OES, REFERENCED_BY_FRAGMENT_SHADER, and
3665bd8deadSopenharmony_ci    REFERENCED_BY_COMPUTE_SHADER, a single integer is written to <params>,
3675bd8deadSopenharmony_ci    identifying whether the active resource is referenced by the vertex,
3685bd8deadSopenharmony_ci    tessellation control, tessellation evaluation, geometry, fragment, or
3695bd8deadSopenharmony_ci    compute shaders, respectively, in the program object. ...
3705bd8deadSopenharmony_ci
3715bd8deadSopenharmony_ci
3725bd8deadSopenharmony_ci    Modify section 7.4, "Program Pipeline Objects" in the first
3735bd8deadSopenharmony_ci    paragraph after UseProgramStages on p. 89:
3745bd8deadSopenharmony_ci
3755bd8deadSopenharmony_ci    ... These stages may include vertex, tessellation control, tessellation
3765bd8deadSopenharmony_ci    evaluation, geometry, fragment, or compute, indicated respectively by
3775bd8deadSopenharmony_ci    VERTEX_SHADER_BIT, TESS_CONTROL_SHADER_BIT_OES, TESS_EVALUATION_BIT_OES,
3785bd8deadSopenharmony_ci    GEOMETRY_SHADER_BIT_OES, FRAGMENT_SHADER_BIT, or COMPUTE_SHADER_BIT. ...
3795bd8deadSopenharmony_ci
3805bd8deadSopenharmony_ci
3815bd8deadSopenharmony_ci    Modify section 7.4.1, "Shader Interface Matching" on p. 91, changing the
3825bd8deadSopenharmony_ci    new paragraph starting "Geometry shader per-vertex ...":
3835bd8deadSopenharmony_ci
3845bd8deadSopenharmony_ci    Tessellation control shader per-vertex output variables and blocks and
3855bd8deadSopenharmony_ci    tessellation control, tessellation evaluation, and geometry shader
3865bd8deadSopenharmony_ci    per-vertex input variables are required to be declared as arrays...
3875bd8deadSopenharmony_ci
3885bd8deadSopenharmony_ci
3895bd8deadSopenharmony_ci    Modify section 7.4.2 "Program Pipeline Object State" on p. 92,
3905bd8deadSopenharmony_ci    replacing the first bullet point:
3915bd8deadSopenharmony_ci
3925bd8deadSopenharmony_ci    * Unsigned integers are required to hold the names of the active program
3935bd8deadSopenharmony_ci      and each of the current vertex, tessellation control, tessellation
3945bd8deadSopenharmony_ci      evaluation, geometry, fragment, and compute stage programs. Each
3955bd8deadSopenharmony_ci      integer is initially zero.
3965bd8deadSopenharmony_ci
3975bd8deadSopenharmony_ci
3985bd8deadSopenharmony_ci    Modify section 7.6, "Uniform Variables"
3995bd8deadSopenharmony_ci
4005bd8deadSopenharmony_ci    Add to table 7.4 "Query targets for default uniform block storage ..."
4015bd8deadSopenharmony_ci    on p. 96:
4025bd8deadSopenharmony_ci
4035bd8deadSopenharmony_ci    Shader Stage                        <pname> for querying default uniform block
4045bd8deadSopenharmony_ci                                        storage, in components
4055bd8deadSopenharmony_ci    ----------------------------------  -------------------------------------------
4065bd8deadSopenharmony_ci    Tess. control (see sec. 11.1ts.1.1) MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES
4075bd8deadSopenharmony_ci    Tess. eval (see sec. 11.1ts.3.1)    MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES
4085bd8deadSopenharmony_ci
4095bd8deadSopenharmony_ci
4105bd8deadSopenharmony_ci    Add to table 7.5 "Query targets for combined uniform block storage ..."
4115bd8deadSopenharmony_ci    on p. 96:
4125bd8deadSopenharmony_ci
4135bd8deadSopenharmony_ci
4145bd8deadSopenharmony_ci    Shader Stage                        <pname> for querying combined uniform block
4155bd8deadSopenharmony_ci                                        storage, in components
4165bd8deadSopenharmony_ci    ----------------------------------  ---------------------------------------------------
4175bd8deadSopenharmony_ci    Tess. control                       MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES
4185bd8deadSopenharmony_ci    Tess. eval                          MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES
4195bd8deadSopenharmony_ci
4205bd8deadSopenharmony_ci
4215bd8deadSopenharmony_ci    Modify section 7.6.2, "Uniform Blocks" on p. 104, changing the second
4225bd8deadSopenharmony_ci    paragraph of the section:
4235bd8deadSopenharmony_ci
4245bd8deadSopenharmony_ci    There is a set of implementation-dependent maximums for the number of
4255bd8deadSopenharmony_ci    active uniform blocks used by each shader. If the number of uniform
4265bd8deadSopenharmony_ci    blocks used by any shader in the program exceeds its corresponding
4275bd8deadSopenharmony_ci    limit, the program will fail to link. The limits for vertex,
4285bd8deadSopenharmony_ci    tessellation control, tessellation evaluation, geometry, fragment, and
4295bd8deadSopenharmony_ci    compute shaders can be obtained by calling GetIntegerv with <pname>
4305bd8deadSopenharmony_ci    values of MAX_VERTEX_UNIFORM_BLOCKS,
4315bd8deadSopenharmony_ci    MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES,
4325bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES, MAX_GEOMETRY_UNIFORM_BLOCKS_OES,
4335bd8deadSopenharmony_ci    MAX_FRAGMENT_UNIFORM_BLOCKS, and MAX_COMPUTE_UNIFORM_BLOCKS,
4345bd8deadSopenharmony_ci    respectively.
4355bd8deadSopenharmony_ci
4365bd8deadSopenharmony_ci
4375bd8deadSopenharmony_ci    Modify section 7.7, "Atomic Counter Buffers" on p. 108, changing the
4385bd8deadSopenharmony_ci    second paragraph of the section:
4395bd8deadSopenharmony_ci
4405bd8deadSopenharmony_ci    There is a set of implementation-dependent maximums for the number of
4415bd8deadSopenharmony_ci    active atomic counter buffers referenced by each shader. If the number
4425bd8deadSopenharmony_ci    of atomic counter buffers referenced by any shader in the program
4435bd8deadSopenharmony_ci    exceeds its corresponding limit, the program will fail to link. The
4445bd8deadSopenharmony_ci    limits for vertex, tessellation control, tessellation evaluation,
4455bd8deadSopenharmony_ci    geometry, fragment, and compute shaders can be obtained by calling
4465bd8deadSopenharmony_ci    GetIntegerv with <pname> values of MAX_VERTEX_ATOMIC_COUNTER_BUFFERS,
4475bd8deadSopenharmony_ci    MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES,
4485bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES,
4495bd8deadSopenharmony_ci    MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES,
4505bd8deadSopenharmony_ci    MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS, or
4515bd8deadSopenharmony_ci    MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS, respectively.
4525bd8deadSopenharmony_ci
4535bd8deadSopenharmony_ci
4545bd8deadSopenharmony_ci    Modify section 7.8, "Shader Buffer Variables and Shader Storage Blocks"
4555bd8deadSopenharmony_ci    on p. 110, changing the fourth paragraph:
4565bd8deadSopenharmony_ci
4575bd8deadSopenharmony_ci    If the number of active shader storage blocks referenced by the shaders
4585bd8deadSopenharmony_ci    in a program exceeds implementation-dependent limits, the program will
4595bd8deadSopenharmony_ci    fail to link. The limits for vertex, tessellation control, tessellation
4605bd8deadSopenharmony_ci    evaluation, geometry, fragment, and compute shaders can be obtained by
4615bd8deadSopenharmony_ci    calling GetIntegerv with pname values of
4625bd8deadSopenharmony_ci    MAX_VERTEX_SHADER_STORAGE_BLOCKS,
4635bd8deadSopenharmony_ci    MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES,
4645bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES,
4655bd8deadSopenharmony_ci    MAX_GEOMETRY_SHADER_STORAGE_BLOCKS_OES,
4665bd8deadSopenharmony_ci    MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, and
4675bd8deadSopenharmony_ci    MAX_COMPUTE_SHADER_STORAGE_BLOCKS, respectively. ...
4685bd8deadSopenharmony_ci
4695bd8deadSopenharmony_ci
4705bd8deadSopenharmony_ci    Modify Section 7.11.1, "Shader Memory Access Ordering":
4715bd8deadSopenharmony_ci
4725bd8deadSopenharmony_ci    The order in which texture or buffer object memory is read or written by
4735bd8deadSopenharmony_ci    shaders is largely undefined. For some shader types (vertex,
4745bd8deadSopenharmony_ci    tessellation evaluation, and in some cases, fragment), even the number
4755bd8deadSopenharmony_ci    of shader invocations that might perform loads and stores is undefined.
4765bd8deadSopenharmony_ci
4775bd8deadSopenharmony_ci    In particular, the following rules apply:
4785bd8deadSopenharmony_ci
4795bd8deadSopenharmony_ci    * While a vertex or tessellation evaluation shader will be executed at
4805bd8deadSopenharmony_ci      least once for each unique vertex specified by the application (vertex
4815bd8deadSopenharmony_ci      shaders) or generated by the tessellation primitive genertor
4825bd8deadSopenharmony_ci      (tessellation evaluation shaders), it may be executed more than once
4835bd8deadSopenharmony_ci      for implementation-dependent reasons. Additionally, ...
4845bd8deadSopenharmony_ci
4855bd8deadSopenharmony_ci
4865bd8deadSopenharmony_ci    Modify section 7.12, "Shader, Program, and Program Pipeline Queries"
4875bd8deadSopenharmony_ci    to add to the list of valid <pname>s for GetProgramiv on p. 120:
4885bd8deadSopenharmony_ci
4895bd8deadSopenharmony_ci    If <pname> is TESS_CONTROL_OUTPUT_VERTICES_OES, the number of vertices
4905bd8deadSopenharmony_ci    in the tessellation control shader output patch is returned.
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_ci    If <pname> is TESS_GEN_MODE_OES, QUADS_OES, TRIANGLES, or ISOLINES_OES
4935bd8deadSopenharmony_ci    is returned, depending on the primitive mode declaration in the
4945bd8deadSopenharmony_ci    tessellation evaluation shader. If <pname> is TESS_GEN_SPACING_OES,
4955bd8deadSopenharmony_ci    EQUAL, FRACTIONAL_EVEN_OES, or FRACTIONAL_ODD_OES is returned, depending
4965bd8deadSopenharmony_ci    on the spacing declaration in the tessellation evaluation shader. If
4975bd8deadSopenharmony_ci    <pname> is TESS_GEN_VERTEX_ORDER_OES, CCW or CW is returned, depending
4985bd8deadSopenharmony_ci    on the vertex order declaration in the tessellation evaluation shader.
4995bd8deadSopenharmony_ci    If <pname> is TESS_GEN_POINT_MODE_OES, TRUE is returned if point mode is
5005bd8deadSopenharmony_ci    enabled in a tessellation evaluation shader declaration; FALSE is
5015bd8deadSopenharmony_ci    returned otherwise.
5025bd8deadSopenharmony_ci
5035bd8deadSopenharmony_ci
5045bd8deadSopenharmony_ci    Add to the Errors for GetProgramiv on p. 121:
5055bd8deadSopenharmony_ci
5065bd8deadSopenharmony_ci    An INVALID_OPERATION error is generated if TESS_CONTROL_OUTPUT_VERTICES
5075bd8deadSopenharmony_ci    is queried for a program which has not been linked successfully, or
5085bd8deadSopenharmony_ci    which does not contain objects to form a tessellation control shader.
5095bd8deadSopenharmony_ci
5105bd8deadSopenharmony_ci    An INVALID_OPERATION error is generated if TESS_GEN_MODE,
5115bd8deadSopenharmony_ci    TESS_GEN_SPACING, TESS_GEN_VERTEX_ORDER, or TESS_GEN_POINT_MODE are
5125bd8deadSopenharmony_ci    queried for a program which has not been linked successfully, or which
5135bd8deadSopenharmony_ci    does not contain objects to form a tessellation evaluation shader,
5145bd8deadSopenharmony_ci
5155bd8deadSopenharmony_ci
5165bd8deadSopenharmony_ci    Add new section 10.1.7sp following section 10.1.7, "Separate Triangles",
5175bd8deadSopenharmony_ci    on p. 234:
5185bd8deadSopenharmony_ci
5195bd8deadSopenharmony_ci    Section 10.1.7sp, Separate Patches
5205bd8deadSopenharmony_ci
5215bd8deadSopenharmony_ci    Separate patches are specified with mode PATCHES_OES. A patch is an
5225bd8deadSopenharmony_ci    ordered collection of vertices used for primitive tessellation (see
5235bd8deadSopenharmony_ci    section 11.1ts). The vertices comprising a patch have no implied
5245bd8deadSopenharmony_ci    geometric ordering. The vertices of a patch are used by tessellation
5255bd8deadSopenharmony_ci    shaders and the fixed-function tessellator to generate new point, line,
5265bd8deadSopenharmony_ci    or triangle primitives.
5275bd8deadSopenharmony_ci
5285bd8deadSopenharmony_ci    Each patch in the series has a fixed number of vertices, which is
5295bd8deadSopenharmony_ci    specified by calling
5305bd8deadSopenharmony_ci
5315bd8deadSopenharmony_ci      void PatchParameteriOES(enum pname, int value);
5325bd8deadSopenharmony_ci
5335bd8deadSopenharmony_ci    with <pname> set to PATCH_VERTICES_OES.
5345bd8deadSopenharmony_ci
5355bd8deadSopenharmony_ci    Errors
5365bd8deadSopenharmony_ci
5375bd8deadSopenharmony_ci    An INVALID_ENUM error is generated if <pname> is not PATCH_VERTICES_OES.
5385bd8deadSopenharmony_ci
5395bd8deadSopenharmony_ci    An INVALID_VALUE error is generated if <value> is less than or equal to
5405bd8deadSopenharmony_ci    zero, or is greater than the implementation-dependent maximum patch size
5415bd8deadSopenharmony_ci    (the value of MAX_PATCH_VERTICES_OES). The patch size is initially three
5425bd8deadSopenharmony_ci    vertices.
5435bd8deadSopenharmony_ci
5445bd8deadSopenharmony_ci    If the number of vertices in a patch is given by <v>, the <v>*<i>+1st
5455bd8deadSopenharmony_ci    through <v>*<i>+<v>th vertices (in that order) determine a patch for
5465bd8deadSopenharmony_ci    each i = 0, 1, ..., n-1, where there are <v>*<n>+<k> vertices. <k> is in
5475bd8deadSopenharmony_ci    the range [0,<v>-1]; if <k> is not zero, the final <k> vertices are
5485bd8deadSopenharmony_ci    ignored.
5495bd8deadSopenharmony_ci
5505bd8deadSopenharmony_ci
5515bd8deadSopenharmony_ci    Add to the end of section 10.3.4, "Primitive Restart" on p. 243:
5525bd8deadSopenharmony_ci
5535bd8deadSopenharmony_ci    Implementations are not required to support primitive restart for
5545bd8deadSopenharmony_ci    separate patch primitives (primitive type PATCHES_OES). Support can be
5555bd8deadSopenharmony_ci    queried by calling GetBooleanv with the symbolic constant
5565bd8deadSopenharmony_ci    PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES. A value of FALSE indicates
5575bd8deadSopenharmony_ci    that primitive restart is treated as disabled when drawing patches, no
5585bd8deadSopenharmony_ci    matter the value of the enable. A value of TRUE indicates that primitive
5595bd8deadSopenharmony_ci    restart behaves normally for patches.
5605bd8deadSopenharmony_ci
5615bd8deadSopenharmony_ci
5625bd8deadSopenharmony_ci    Modify section 11.1.2.1, "Output Variables" on p. 262, starting with the
5635bd8deadSopenharmony_ci    second paragraph of the section:
5645bd8deadSopenharmony_ci
5655bd8deadSopenharmony_ci    ... These output variables are used to communicate values to the next
5665bd8deadSopenharmony_ci    active stage in the vertex processing pipeline; either the tessellation
5675bd8deadSopenharmony_ci    control or geometry shader, or the fixed-function vertex processing
5685bd8deadSopenharmony_ci    stages leading to rasterization.
5695bd8deadSopenharmony_ci
5705bd8deadSopenharmony_ci    ...
5715bd8deadSopenharmony_ci
5725bd8deadSopenharmony_ci    The number of components (individual scalar numeric values) of output
5735bd8deadSopenharmony_ci    variables that can be written by the vertex shader, whether or not a
5745bd8deadSopenharmony_ci    tessellation control or geometry shader is active, is given by the value
5755bd8deadSopenharmony_ci    of the implementation-dependent constant MAX_VERTEX_OUTPUT_COMPONENTS.
5765bd8deadSopenharmony_ci    For the purposes of counting ...
5775bd8deadSopenharmony_ci
5785bd8deadSopenharmony_ci    ...
5795bd8deadSopenharmony_ci
5805bd8deadSopenharmony_ci    Each program object can specify a set of output variables from one
5815bd8deadSopenharmony_ci    shader to be recorded in transform feedback mode (see section 2.14). The
5825bd8deadSopenharmony_ci    variables that can be recorded are those emitted by the first active
5835bd8deadSopenharmony_ci    shader, in order, from the following list:
5845bd8deadSopenharmony_ci
5855bd8deadSopenharmony_ci    * geometry shader
5865bd8deadSopenharmony_ci    * tessellation evaluation shader
5875bd8deadSopenharmony_ci    * vertex shader
5885bd8deadSopenharmony_ci
5895bd8deadSopenharmony_ci    The set of variables to record is specified with the command
5905bd8deadSopenharmony_ci
5915bd8deadSopenharmony_ci    void TransformFeedbackVaryings ...
5925bd8deadSopenharmony_ci
5935bd8deadSopenharmony_ci
5945bd8deadSopenharmony_ci    Modify the bullet point starting "the <count> specified" in the list of
5955bd8deadSopenharmony_ci    TransformFeedbackVaryings link failures on p. 263:
5965bd8deadSopenharmony_ci
5975bd8deadSopenharmony_ci    * the <count> specified by TransformFeedbackVaryings is non-zero, but
5985bd8deadSopenharmony_ci      the program object has no vertex, tessellation evaluation, or geometry
5995bd8deadSopenharmony_ci      shader; ...
6005bd8deadSopenharmony_ci
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci    Modify Section 11.1.3, Shader Execution
6035bd8deadSopenharmony_ci
6045bd8deadSopenharmony_ci    Change the first paragraph and bullet list on p. 264:
6055bd8deadSopenharmony_ci
6065bd8deadSopenharmony_ci    If there is an active program object present for the vertex,
6075bd8deadSopenharmony_ci    tessellation control, tessellation evaluation, or geometry shader
6085bd8deadSopenharmony_ci    stages, the executable code for those active programs is used to process
6095bd8deadSopenharmony_ci    incoming vertex values. The following sequence of operations is
6105bd8deadSopenharmony_ci    performed:
6115bd8deadSopenharmony_ci
6125bd8deadSopenharmony_ci    * Vertices are processed by the vertex shader (see section 11.1) and
6135bd8deadSopenharmony_ci      assembled into primitives as described in sections 10.1 through 10.3.
6145bd8deadSopenharmony_ci    * If the current program contains a tessellation control shader, each
6155bd8deadSopenharmony_ci      individual patch primitive is processed by the tessellation control
6165bd8deadSopenharmony_ci      shader (section 11.1ts.1). Otherwise, primitives are passed through
6175bd8deadSopenharmony_ci      unmodified. If active, the tessellation control shader consumes its
6185bd8deadSopenharmony_ci      input patch and produces a new patch primitive, which is passed to
6195bd8deadSopenharmony_ci      subsequent pipeline stages.
6205bd8deadSopenharmony_ci    * If the current program contains a tessellation evaluation shader, each
6215bd8deadSopenharmony_ci      individual patch primitive is processed by the tessellation primitive
6225bd8deadSopenharmony_ci      generator (section 11.1ts.2) and tessellation evaluation shader (see
6235bd8deadSopenharmony_ci      section 11.1ts.3). Otherwise, primitives are passed through unmodified.
6245bd8deadSopenharmony_ci      When a tessellation evaluation shader is active, the tessellation
6255bd8deadSopenharmony_ci      primitive generator produces a new collection of point, line, or
6265bd8deadSopenharmony_ci      triangle primitives to be passed to subsequent pipeline stages. The
6275bd8deadSopenharmony_ci      vertices of these primitives are processed by the tessellation
6285bd8deadSopenharmony_ci      evaluation shader. The patch primitive passed to the tessellation
6295bd8deadSopenharmony_ci      primitive generator is consumed by this process.
6305bd8deadSopenharmony_ci    * If the current program contains a geometry shader, ...
6315bd8deadSopenharmony_ci
6325bd8deadSopenharmony_ci
6335bd8deadSopenharmony_ci    Modify the bullet list in section 11.1.3.5 "Texture Access" on p. 266 to
6345bd8deadSopenharmony_ci    add limits for tessellation shaders:
6355bd8deadSopenharmony_ci
6365bd8deadSopenharmony_ci    * MAX_VERTEX_TEXTURE_IMAGE_UNITS (for vertex shaders),
6375bd8deadSopenharmony_ci    * MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES (for tessellation control
6385bd8deadSopenharmony_ci      shaders),
6395bd8deadSopenharmony_ci    * MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES (for tessellation
6405bd8deadSopenharmony_ci      evaluation shaders),
6415bd8deadSopenharmony_ci    * MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_OES (for geometry shaders), and
6425bd8deadSopenharmony_ci    * MAX_TEXTURE_IMAGE_UNITS (for fragment shaders).
6435bd8deadSopenharmony_ci
6445bd8deadSopenharmony_ci
6455bd8deadSopenharmony_ci    Modify the bullet list in section 11.1.3.6 "Atomic Counter Access" on p.
6465bd8deadSopenharmony_ci    268 to add a limit for geometry shaders:
6475bd8deadSopenharmony_ci
6485bd8deadSopenharmony_ci    * MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES (for tessellation control
6495bd8deadSopenharmony_ci      shaders),
6505bd8deadSopenharmony_ci    * MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES (for tessellation evaluation
6515bd8deadSopenharmony_ci      shaders),
6525bd8deadSopenharmony_ci
6535bd8deadSopenharmony_ci
6545bd8deadSopenharmony_ci    Modify the bullet list in section 11.1.3.7 "Image Access" on p. 268 to
6555bd8deadSopenharmony_ci    add a limit for geometry shaders:
6565bd8deadSopenharmony_ci
6575bd8deadSopenharmony_ci    * MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES (for tessellation control
6585bd8deadSopenharmony_ci      shaders),
6595bd8deadSopenharmony_ci    * MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES (for tessellation evaluation
6605bd8deadSopenharmony_ci      shaders),
6615bd8deadSopenharmony_ci
6625bd8deadSopenharmony_ci
6635bd8deadSopenharmony_ci    Modify the bullet list in section 11.1.3.8 "Shader Storage Buffer
6645bd8deadSopenharmony_ci    Access" on p. 268 to add a limit for geometry shaders:
6655bd8deadSopenharmony_ci
6665bd8deadSopenharmony_ci    * MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES (for tessellation control
6675bd8deadSopenharmony_ci      shaders),
6685bd8deadSopenharmony_ci    * MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES (for tessellation
6695bd8deadSopenharmony_ci      evaluation shaders),
6705bd8deadSopenharmony_ci
6715bd8deadSopenharmony_ci
6725bd8deadSopenharmony_ci    Modify section 11.1.3.11, "Validation" to replace the bullet point
6735bd8deadSopenharmony_ci    starting "There is an active program for the geometry stage ..." on p.
6745bd8deadSopenharmony_ci    270:
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci    * There is an active program for tessellation control, tessellation
6775bd8deadSopenharmony_ci      evaluation, or geometry stages with corresponding executable shader,
6785bd8deadSopenharmony_ci      but there is no active program with an executable vertex shader.
6795bd8deadSopenharmony_ci
6805bd8deadSopenharmony_ci
6815bd8deadSopenharmony_ci    Add a new bullet point in the same section:
6825bd8deadSopenharmony_ci
6835bd8deadSopenharmony_ci    * One but not both of the tessellation control and tessellation
6845bd8deadSopenharmony_ci      evaluation stages have an active program with corresponding executable
6855bd8deadSopenharmony_ci      shader.
6865bd8deadSopenharmony_ci
6875bd8deadSopenharmony_ci
6885bd8deadSopenharmony_ci    Insert new section 11.1ts, "Tessellation", between section 11.1 "Vertex
6895bd8deadSopenharmony_ci    Shaders" and section 11.1gs "Geometry Shaders":
6905bd8deadSopenharmony_ci
6915bd8deadSopenharmony_ci    Tessellation is a process that reads a patch primitive and generates new
6925bd8deadSopenharmony_ci    primitives used by subsequent pipeline stages. The generated primitives
6935bd8deadSopenharmony_ci    are formed by subdividing a single triangle or quad primitive according
6945bd8deadSopenharmony_ci    to fixed or shader-computed levels of detail and transforming each of
6955bd8deadSopenharmony_ci    the vertices produced during this subdivision.
6965bd8deadSopenharmony_ci
6975bd8deadSopenharmony_ci    Tessellation functionality is controlled by two types of tessellation
6985bd8deadSopenharmony_ci    shaders: tessellation control shaders and tessellation evaluation
6995bd8deadSopenharmony_ci    shaders. Tessellation is considered active if and only if the active
7005bd8deadSopenharmony_ci    program object or program pipeline object includes both a tessellation
7015bd8deadSopenharmony_ci    control shader and a tessellation evaluation shader.
7025bd8deadSopenharmony_ci
7035bd8deadSopenharmony_ci    The tessellation control shader is used to read an input patch provided
7045bd8deadSopenharmony_ci    by the application, and emit an output patch. The tessellation control
7055bd8deadSopenharmony_ci    shader is run once for each vertex in the output patch and computes the
7065bd8deadSopenharmony_ci    attributes of that vertex. Additionally, the tessellation control shader
7075bd8deadSopenharmony_ci    may compute additional per-patch attributes of the output patch. The
7085bd8deadSopenharmony_ci    most important per-patch outputs are the tessellation levels, which are
7095bd8deadSopenharmony_ci    used to control the number of subdivisions performed by the tessellation
7105bd8deadSopenharmony_ci    primitive generator. The tessellation control shader may also write
7115bd8deadSopenharmony_ci    additional per-patch attributes for use by the tessellation evaluation
7125bd8deadSopenharmony_ci    shader. If no tessellation control shader is active, patch primitives
7135bd8deadSopenharmony_ci    may not be provided by the application.
7145bd8deadSopenharmony_ci
7155bd8deadSopenharmony_ci    If a tessellation evaluation shader is active, the tessellation
7165bd8deadSopenharmony_ci    primitive generator subdivides a triangle or quad primitive into a
7175bd8deadSopenharmony_ci    collection of points, lines, or triangles according to the tessellation
7185bd8deadSopenharmony_ci    levels of the patch and the set of layout declarations specified in the
7195bd8deadSopenharmony_ci    tessellation evaluation shader text.
7205bd8deadSopenharmony_ci
7215bd8deadSopenharmony_ci    When a tessellation evaluation shader is active, it is run on each
7225bd8deadSopenharmony_ci    vertex generated by the tessellation primitive generator to compute the
7235bd8deadSopenharmony_ci    final position and other attributes of the vertex. The tessellation
7245bd8deadSopenharmony_ci    evaluation shader can read the relative location of the vertex in the
7255bd8deadSopenharmony_ci    subdivided output primitive, given by an (u,v) or (u,v,w) coordinate, as
7265bd8deadSopenharmony_ci    well as the position and attributes of any or all of the vertices in the
7275bd8deadSopenharmony_ci    input patch.
7285bd8deadSopenharmony_ci
7295bd8deadSopenharmony_ci    Tessellation operates only on patch primitives.
7305bd8deadSopenharmony_ci
7315bd8deadSopenharmony_ci    Patch primitives are not supported by pipeline stages below the
7325bd8deadSopenharmony_ci    tessellation evaluation shader.
7335bd8deadSopenharmony_ci
7345bd8deadSopenharmony_ci    A non-separable program object or program pipeline object that includes
7355bd8deadSopenharmony_ci    a tessellation shader of any kind must also include a vertex shader.
7365bd8deadSopenharmony_ci
7375bd8deadSopenharmony_ci
7385bd8deadSopenharmony_ci    Errors
7395bd8deadSopenharmony_ci
7405bd8deadSopenharmony_ci    An INVALID_OPERATION error is generated by any command that transfers
7415bd8deadSopenharmony_ci    vertices to the GL if the current program state has one but not both of
7425bd8deadSopenharmony_ci    a tessellation control shader and tessellation evaluation shader.
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci    An INVALID_OPERATION error is generated by any command that transfers
7455bd8deadSopenharmony_ci    vertices to the GL if tessellation is active and the primitive mode is
7465bd8deadSopenharmony_ci    not PATCHES_OES.
7475bd8deadSopenharmony_ci
7485bd8deadSopenharmony_ci    An INVALID_OPERATION error is generated by any command that transfers
7495bd8deadSopenharmony_ci    vertices to the GL if tessellation is not active and the primitive mode
7505bd8deadSopenharmony_ci    is PATCHES_OES.
7515bd8deadSopenharmony_ci
7525bd8deadSopenharmony_ci    An INVALID_OPERATION error is generated by any command that transfers
7535bd8deadSopenharmony_ci    vertices to the GL if the current program state has a tessellation
7545bd8deadSopenharmony_ci    shader but no vertex shader.
7555bd8deadSopenharmony_ci
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci    Section 11.1ts.1, Tessellation Control Shaders
7585bd8deadSopenharmony_ci
7595bd8deadSopenharmony_ci    The tessellation control shader consumes an input patch provided by the
7605bd8deadSopenharmony_ci    application and emits a new output patch. The input patch is an array of
7615bd8deadSopenharmony_ci    vertices with attributes corresponding to output variables written by
7625bd8deadSopenharmony_ci    the vertex shader. The output patch consists of an array of vertices
7635bd8deadSopenharmony_ci    with attributes corresponding to per-vertex output variables written by
7645bd8deadSopenharmony_ci    the tessellation control shader and a set of per-patch attributes
7655bd8deadSopenharmony_ci    corresponding to per-patch output variables written by the tessellation
7665bd8deadSopenharmony_ci    control shader. Tessellation control output variables are per-vertex by
7675bd8deadSopenharmony_ci    default, but may be declared as per-patch using the "patch" qualifier.
7685bd8deadSopenharmony_ci
7695bd8deadSopenharmony_ci    The number of vertices in the output patch is fixed when the program is
7705bd8deadSopenharmony_ci    linked, and is specified in tessellation control shader source code
7715bd8deadSopenharmony_ci    using the output layout qualifier "vertices", as described in the OpenGL
7725bd8deadSopenharmony_ci    ES Shading Language Specification. A program will fail to link if the
7735bd8deadSopenharmony_ci    output patch vertex count is not specified by the tessellation control
7745bd8deadSopenharmony_ci    shader object attached to the program, if it is less than or equal to
7755bd8deadSopenharmony_ci    zero, or if it is greater than the implementation-dependent maximum
7765bd8deadSopenharmony_ci    patch size. The output patch vertex count may be queried by calling
7775bd8deadSopenharmony_ci    GetProgramiv with the symbolic constant
7785bd8deadSopenharmony_ci    TESS_CONTROL_OUTPUT_VERTICES_OES.
7795bd8deadSopenharmony_ci
7805bd8deadSopenharmony_ci    Tessellation control shaders are created as described in section 7.1,
7815bd8deadSopenharmony_ci    using a <type> of TESS_CONTROL_SHADER_OES. When a new input patch is
7825bd8deadSopenharmony_ci    received, the tessellation control shader is run once for each vertex in
7835bd8deadSopenharmony_ci    the output patch. The tessellation control shader invocations
7845bd8deadSopenharmony_ci    collectively specify the per-vertex and per-patch attributes of the
7855bd8deadSopenharmony_ci    output patch. The per-vertex attributes are obtained from the per-vertex
7865bd8deadSopenharmony_ci    output variables written by each invocation. Each tessellation control
7875bd8deadSopenharmony_ci    shader invocation may only write to per-vertex output variables
7885bd8deadSopenharmony_ci    corresponding to its own output patch vertex. The output patch vertex
7895bd8deadSopenharmony_ci    number corresponding to a given tessellation control point shader
7905bd8deadSopenharmony_ci    invocation is given by the built-in variable gl_InvocationID. Per-patch
7915bd8deadSopenharmony_ci    attributes are taken from the per-patch output variables, which may be
7925bd8deadSopenharmony_ci    written by any tessellation control shader invocation. While
7935bd8deadSopenharmony_ci    tessellation control shader invocations may read any per-vertex and
7945bd8deadSopenharmony_ci    per-patch output variable and write any per-patch output variable,
7955bd8deadSopenharmony_ci    reading or writing output variables also written by other invocations
7965bd8deadSopenharmony_ci    has ordering hazards discussed below.
7975bd8deadSopenharmony_ci
7985bd8deadSopenharmony_ci
7995bd8deadSopenharmony_ci    Section 11.1ts.1.1, Tessellation Control Shader Variables
8005bd8deadSopenharmony_ci
8015bd8deadSopenharmony_ci    Tessellation control shaders can access uniforms belonging to the
8025bd8deadSopenharmony_ci    current program object. Limits on uniform storage and methods for
8035bd8deadSopenharmony_ci    manipulating uniforms are described in section 7.6.
8045bd8deadSopenharmony_ci
8055bd8deadSopenharmony_ci    Tessellation control shaders also have access to samplers to perform
8065bd8deadSopenharmony_ci    texturing operations, as described in section 7.9.
8075bd8deadSopenharmony_ci
8085bd8deadSopenharmony_ci    Tessellation control shaders can access the transformed attributes of
8095bd8deadSopenharmony_ci    all vertices for their input primitive using input variables. A vertex
8105bd8deadSopenharmony_ci    shader writing to output variables generates the values of these input
8115bd8deadSopenharmony_ci    variables. Values for any inputs that are not written by a vertex shader
8125bd8deadSopenharmony_ci    are undefined.
8135bd8deadSopenharmony_ci
8145bd8deadSopenharmony_ci    Additionally, tessellation control shaders can write to one or more
8155bd8deadSopenharmony_ci    output variables, including per-vertex attributes for the vertices of
8165bd8deadSopenharmony_ci    the output patch and per-patch attributes of the patch. Tessellation
8175bd8deadSopenharmony_ci    control shaders can also write to a set of built-in per-vertex and
8185bd8deadSopenharmony_ci    per-patch outputs defined in the OpenGL ES Shading Language. The
8195bd8deadSopenharmony_ci    per-vertex and per-patch attributes of the output patch are used by the
8205bd8deadSopenharmony_ci    tessellation primitive generator (section 11.1ts.2) and may be read by
8215bd8deadSopenharmony_ci    tessellation evaluation shader (section 11.1ts.3).
8225bd8deadSopenharmony_ci
8235bd8deadSopenharmony_ci
8245bd8deadSopenharmony_ci    Section 11.1ts.1.2, Tessellation Control Shader Execution Environment
8255bd8deadSopenharmony_ci
8265bd8deadSopenharmony_ci    If there is an active program for the tessellation control stage, the
8275bd8deadSopenharmony_ci    executable version of the program's tessellation control shader is used
8285bd8deadSopenharmony_ci    to process patches resulting from the primitive assembly stage. When
8295bd8deadSopenharmony_ci    tessellation control shader execution completes, the input patch is
8305bd8deadSopenharmony_ci    consumed. A new patch is assembled from the per-vertex and per-patch
8315bd8deadSopenharmony_ci    output variables written by the shader and is passed to subsequent
8325bd8deadSopenharmony_ci    pipeline stages.
8335bd8deadSopenharmony_ci
8345bd8deadSopenharmony_ci    There are several special considerations for tessellation control shader
8355bd8deadSopenharmony_ci    execution described in the following sections.
8365bd8deadSopenharmony_ci
8375bd8deadSopenharmony_ci
8385bd8deadSopenharmony_ci    Section 11.1ts.1.2.1, Texture Access
8395bd8deadSopenharmony_ci
8405bd8deadSopenharmony_ci    Section 11.1.3.1 describes texture lookup functionality accessible to a
8415bd8deadSopenharmony_ci    vertex shader. The texel fetch and texture size query functionality
8425bd8deadSopenharmony_ci    described there also applies to tessellation control shaders.
8435bd8deadSopenharmony_ci
8445bd8deadSopenharmony_ci
8455bd8deadSopenharmony_ci    Section 11.1ts.1.2.2, Tessellation Control Shader Inputs
8465bd8deadSopenharmony_ci
8475bd8deadSopenharmony_ci    Section 7.1 ("Built-In Variables") of the OpenGL ES Shading Language
8485bd8deadSopenharmony_ci    Specification describes the built-in variable array gl_in[] available as
8495bd8deadSopenharmony_ci    input to a tessellation control shader. gl_in[] receives values from
8505bd8deadSopenharmony_ci    equivalent built-in output variables written by the vertex shader. Each
8515bd8deadSopenharmony_ci    array element of gl_in[] is a structure holding values for a specific
8525bd8deadSopenharmony_ci    vertex of the input patch. The length of gl_in[] is equal to the
8535bd8deadSopenharmony_ci    implementation-dependent maximum patch size (gl_MaxPatchVertices).
8545bd8deadSopenharmony_ci    Behavior is undefined if gl_in[] is indexed with a vertex index greater
8555bd8deadSopenharmony_ci    than or equal to the current patch size. The members of each element of
8565bd8deadSopenharmony_ci    the gl_in[] array are gl_Position
8575bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported: ]]
8585bd8deadSopenharmony_ci        and gl_PointSize.
8595bd8deadSopenharmony_ci
8605bd8deadSopenharmony_ci    Tessellation control shaders have available several other special input
8615bd8deadSopenharmony_ci    variables not replicated per-vertex and not contained in gl_in[],
8625bd8deadSopenharmony_ci    including:
8635bd8deadSopenharmony_ci
8645bd8deadSopenharmony_ci      * The variable gl_PatchVerticesIn holds the number of vertices in the
8655bd8deadSopenharmony_ci        input patch being processed by the tessellation control shader.
8665bd8deadSopenharmony_ci
8675bd8deadSopenharmony_ci      * The variable gl_PrimitiveID is filled with the number of primitives
8685bd8deadSopenharmony_ci        processed by the drawing command which generated the input vertices.
8695bd8deadSopenharmony_ci        The first primitive generated by a drawing command is numbered zero,
8705bd8deadSopenharmony_ci        and the primitive ID counter is incremented after every individual
8715bd8deadSopenharmony_ci        point, line, or triangle primitive is processed. The counter is
8725bd8deadSopenharmony_ci        reset to zero between each instance drawn. Restarting a primitive
8735bd8deadSopenharmony_ci        topology using the primitive restart index has no effect on the
8745bd8deadSopenharmony_ci        primitive ID counter.
8755bd8deadSopenharmony_ci
8765bd8deadSopenharmony_ci      * The variable gl_InvocationID holds an invocation number for the
8775bd8deadSopenharmony_ci        current tessellation control shader invocation. Tessellation control
8785bd8deadSopenharmony_ci        shaders are invoked once per output patch vertex, and invocations
8795bd8deadSopenharmony_ci        are numbered beginning with zero.
8805bd8deadSopenharmony_ci
8815bd8deadSopenharmony_ci    Similarly to the built-in inputs, each user-defined input variable has a
8825bd8deadSopenharmony_ci    value for each vertex and thus needs to be declared as arrays or inside
8835bd8deadSopenharmony_ci    input blocks declared as arrays. Declaring an array size is optional. If
8845bd8deadSopenharmony_ci    no size is specified, it will be taken from the implementation-dependent
8855bd8deadSopenharmony_ci    maximum patch size (gl_MaxPatchVertices). If a size is specified, it must
8865bd8deadSopenharmony_ci    match the maximum patch size; otherwise, a compile or link error will
8875bd8deadSopenharmony_ci    occur. Since the array size may be larger than the number of vertices
8885bd8deadSopenharmony_ci    found in the input patch, behavior is undefined if a per-vertex input
8895bd8deadSopenharmony_ci    variable is accessed using an index greater than or equal to the number of
8905bd8deadSopenharmony_ci    vertices in the input patch. The OpenGL ES Shading Language doesn't
8915bd8deadSopenharmony_ci    support multi-dimensional arrays as shader inputs or outputs; therefore,
8925bd8deadSopenharmony_ci    user-defined tessellation control shader inputs corresponding to vertex
8935bd8deadSopenharmony_ci    shader outputs declared as arrays must be declared as array members of
8945bd8deadSopenharmony_ci    an input block that is itself declared as an array.
8955bd8deadSopenharmony_ci
8965bd8deadSopenharmony_ci    Similarly to the limit on vertex shader output components (see section
8975bd8deadSopenharmony_ci    11.1.2.1), there is a limit on the number of components of input
8985bd8deadSopenharmony_ci    variables that can be read by the tessellation control shader, given by
8995bd8deadSopenharmony_ci    the value of the implementation-dependent constant
9005bd8deadSopenharmony_ci    MAX_TESS_CONTROL_INPUT_COMPONENTS_OES.
9015bd8deadSopenharmony_ci
9025bd8deadSopenharmony_ci    When a program is linked, all components of any input read by a
9035bd8deadSopenharmony_ci    tessellation control shader will count against this limit. A program
9045bd8deadSopenharmony_ci    whose tessellation control shader exceeds this limit may fail to link,
9055bd8deadSopenharmony_ci    unless device-dependent optimizations are able to make the program fit
9065bd8deadSopenharmony_ci    within available hardware resources.
9075bd8deadSopenharmony_ci
9085bd8deadSopenharmony_ci    Component counting rules for different variable types and variable
9095bd8deadSopenharmony_ci    declarations are the same as for MAX_VERTEX_OUTPUT_COMPONENTS (see
9105bd8deadSopenharmony_ci    section 11.1.2.1).
9115bd8deadSopenharmony_ci
9125bd8deadSopenharmony_ci
9135bd8deadSopenharmony_ci    Section 11.1ts.1.2.3, Tessellation Control Shader Outputs
9145bd8deadSopenharmony_ci
9155bd8deadSopenharmony_ci    Section 7.1 ("Built-In Variables") of the OpenGL ES Shading Language
9165bd8deadSopenharmony_ci    Specification describes the built-in variable array gl_out[] available
9175bd8deadSopenharmony_ci    as an output for a tessellation control shader. gl_out[] passes values
9185bd8deadSopenharmony_ci    to equivalent built-in input variables read by subsequent shader stages
9195bd8deadSopenharmony_ci    or to subsequent fixed functionality vertex processing pipeline stages.
9205bd8deadSopenharmony_ci    Each array element of gl_out[] is a structure holding values for a
9215bd8deadSopenharmony_ci    specific vertex of the output patch. The length of gl_out[] is equal to
9225bd8deadSopenharmony_ci    the output patch size specified in the tessellation control shader
9235bd8deadSopenharmony_ci    output layout declaration. The members of each element of the gl_out[]
9245bd8deadSopenharmony_ci    array are gl_Position
9255bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported: ]]
9265bd8deadSopenharmony_ci        and gl_PointSize.
9275bd8deadSopenharmony_ci    They behave identically to equivalently named vertex shader outputs
9285bd8deadSopenharmony_ci    (see section 11.1.2.1).
9295bd8deadSopenharmony_ci
9305bd8deadSopenharmony_ci    Tessellation shaders additionally have two built-in per-patch output
9315bd8deadSopenharmony_ci    arrays, gl_TessLevelOuter[] and gl_TessLevelInner[]. These arrays are not
9325bd8deadSopenharmony_ci    replicated for each output patch vertices and are not members of gl_out[].
9335bd8deadSopenharmony_ci    gl_TessLevelOuter[] is an array of four floating-point values specifying
9345bd8deadSopenharmony_ci    the approximate number of segments that the tessellation primitive
9355bd8deadSopenharmony_ci    generator should use when subdividing each outer edge of the primitive it
9365bd8deadSopenharmony_ci    subdivides.  gl_TessLevelInner[] is an array of two floating-point values
9375bd8deadSopenharmony_ci    specifying the approximate number of segments used to produce a
9385bd8deadSopenharmony_ci    regularly-subdivided primitive interior.  The values written to
9395bd8deadSopenharmony_ci    gl_TessLevelOuter and gl_TessLevelInner need not be integers, and their
9405bd8deadSopenharmony_ci    interpretation depends on the type of primitive the tessellation
9415bd8deadSopenharmony_ci    primitive generator will subdivide and other tessellation parameters, as
9425bd8deadSopenharmony_ci    discussed in the following section.
9435bd8deadSopenharmony_ci
9445bd8deadSopenharmony_ci    A tessellation control shader may also declare user-defined per-vertex
9455bd8deadSopenharmony_ci    output variables. User-defined per-vertex output variables are declared
9465bd8deadSopenharmony_ci    with the qualifier "out" and have a value for each vertex in the output
9475bd8deadSopenharmony_ci    patch. Such variables must be declared as arrays or inside output blocks
9485bd8deadSopenharmony_ci    declared as arrays. Declaring an array size is optional. If no size is
9495bd8deadSopenharmony_ci    specified, it will be taken from output patch size declared in the
9505bd8deadSopenharmony_ci    shader. If a size is specified, it must match the maximum patch size;
9515bd8deadSopenharmony_ci    otherwise, a compile or link error will occur. The OpenGL ES Shading
9525bd8deadSopenharmony_ci    Language doesn't support multi-dimensional arrays as shader inputs or
9535bd8deadSopenharmony_ci    outputs; therefore, user-defined per-vertex tessellation control shader
9545bd8deadSopenharmony_ci    outputs with multiple elements per vertex must be declared as array members
9555bd8deadSopenharmony_ci    of an output block that is itself declared as an array.
9565bd8deadSopenharmony_ci
9575bd8deadSopenharmony_ci    While per-vertex output variables are declared as arrays indexed by
9585bd8deadSopenharmony_ci    vertex number, each tessellation control shader invocation may write
9595bd8deadSopenharmony_ci    only to those outputs corresponding to its output patch vertex.
9605bd8deadSopenharmony_ci    Tessellation control shaders must use the special variable
9615bd8deadSopenharmony_ci    gl_InvocationID as the vertex number index when writing to per-vertex
9625bd8deadSopenharmony_ci    output variables.
9635bd8deadSopenharmony_ci
9645bd8deadSopenharmony_ci    Additionally, a tessellation control shader may declare per-patch output
9655bd8deadSopenharmony_ci    variables using the qualifier "patch out". Unlike per-vertex outputs,
9665bd8deadSopenharmony_ci    per-patch outputs do not correspond to any specific vertex in the patch,
9675bd8deadSopenharmony_ci    and are not indexed by vertex number. Per-patch outputs declared as
9685bd8deadSopenharmony_ci    arrays have multiple values for the output patch; similarly declared
9695bd8deadSopenharmony_ci    per-vertex outputs would indicate a single value for each vertex in the
9705bd8deadSopenharmony_ci    output patch. User-defined per-patch outputs are not used by the
9715bd8deadSopenharmony_ci    tessellation primitive generator, but may be read by tessellation
9725bd8deadSopenharmony_ci    evaluation shaders.
9735bd8deadSopenharmony_ci
9745bd8deadSopenharmony_ci    There are several limits on the number of components of built-in and
9755bd8deadSopenharmony_ci    user-defined output variables that can be written by the tessellation
9765bd8deadSopenharmony_ci    control shader. The number of components of active per-vertex output
9775bd8deadSopenharmony_ci    variables may not exceed the value of
9785bd8deadSopenharmony_ci    MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES. The number of components of
9795bd8deadSopenharmony_ci    active per-patch output variables may not exceed the value of
9805bd8deadSopenharmony_ci    MAX_TESS_PATCH_COMPONENTS_OES. The built-in outputs gl_TessLevelOuter[]
9815bd8deadSopenharmony_ci    and gl_TessLevelInner[] are not counted against the per-patch limit. The
9825bd8deadSopenharmony_ci    total number of components of active per-vertex and per-patch outputs is
9835bd8deadSopenharmony_ci    derived by multiplying the per-vertex output component count by the output
9845bd8deadSopenharmony_ci    patch size and then adding the per-patch output component count. The total
9855bd8deadSopenharmony_ci    component count may not exceed
9865bd8deadSopenharmony_ci    MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES.
9875bd8deadSopenharmony_ci
9885bd8deadSopenharmony_ci    When a program is linked, all components of any output variable written
9895bd8deadSopenharmony_ci    by a tessellation control shader will count against this limit. A
9905bd8deadSopenharmony_ci    program exceeding any of these limits may fail to link, unless
9915bd8deadSopenharmony_ci    device-dependent optimizations are able to make the program fit within
9925bd8deadSopenharmony_ci    available hardware resources.
9935bd8deadSopenharmony_ci
9945bd8deadSopenharmony_ci    Component counting rules for different variable types and variable
9955bd8deadSopenharmony_ci    declarations are the same as for MAX_VERTEX_OUTPUT_COMPONENTS. (see
9965bd8deadSopenharmony_ci    section 11.1.2.1).
9975bd8deadSopenharmony_ci
9985bd8deadSopenharmony_ci
9995bd8deadSopenharmony_ci    Section 11.1ts.1.2.4, Tessellation Control Shader Execution Order
10005bd8deadSopenharmony_ci
10015bd8deadSopenharmony_ci    For tessellation control shaders with a declared output patch size
10025bd8deadSopenharmony_ci    greater than one, the shader is invoked more than once for each input
10035bd8deadSopenharmony_ci    patch. The order of execution of one tessellation control shader
10045bd8deadSopenharmony_ci    invocation relative to the other invocations for the same input patch is
10055bd8deadSopenharmony_ci    largely undefined. The built-in function barrier() provides some control
10065bd8deadSopenharmony_ci    over relative execution order. When a tessellation control shader calls
10075bd8deadSopenharmony_ci    the barrier() function, its execution pauses until all other invocations
10085bd8deadSopenharmony_ci    have also called the same function. Output variable assignments
10095bd8deadSopenharmony_ci    performed by any invocation executed prior to calling barrier() will be
10105bd8deadSopenharmony_ci    visible to any other invocation after the call to barrier() returns.
10115bd8deadSopenharmony_ci    Shader output values read in one invocation but written by another may
10125bd8deadSopenharmony_ci    be undefined without proper use of barrier(); full rules are found in
10135bd8deadSopenharmony_ci    the OpenGL ES Shading Language Specification.
10145bd8deadSopenharmony_ci
10155bd8deadSopenharmony_ci    The barrier() function may only be called inside the main entry point of
10165bd8deadSopenharmony_ci    the tessellation control shader and may not be called in potentially
10175bd8deadSopenharmony_ci    divergent flow control. In particular, barrier() may not be called
10185bd8deadSopenharmony_ci    inside a switch statement, in either sub-statement of an if statement,
10195bd8deadSopenharmony_ci    inside a do, for, or while loop, or at any point after a return
10205bd8deadSopenharmony_ci    statement in the function main().
10215bd8deadSopenharmony_ci
10225bd8deadSopenharmony_ci
10235bd8deadSopenharmony_ci    Section 11.1ts.2, Tessellation Primitive Generation
10245bd8deadSopenharmony_ci
10255bd8deadSopenharmony_ci    The tessellation primitive generator consumes the input patch and
10265bd8deadSopenharmony_ci    produces a new set of basic primitives (points, lines, or triangles).
10275bd8deadSopenharmony_ci    These primitives are produced by subdividing a geometric primitive
10285bd8deadSopenharmony_ci    (rectangle or triangle) according to the per-patch tessellation levels
10295bd8deadSopenharmony_ci    written by the tessellation control shader. This subdivision is
10305bd8deadSopenharmony_ci    performed in an implementation- dependent manner.
10315bd8deadSopenharmony_ci
10325bd8deadSopenharmony_ci    The type of subdivision performed by the tessellation primitive
10335bd8deadSopenharmony_ci    generator is specified by an input layout declaration in the
10345bd8deadSopenharmony_ci    tessellation evaluation shader using one of the identifiers "triangles",
10355bd8deadSopenharmony_ci    "quads", and "isolines". For "triangles", the primitive generator
10365bd8deadSopenharmony_ci    subdivides a triangle primitive into smaller triangles. For "quads", the
10375bd8deadSopenharmony_ci    primitive generator subdivides a rectangle primitive into smaller
10385bd8deadSopenharmony_ci    triangles. For "isolines", the primitive generator subdivides a
10395bd8deadSopenharmony_ci    rectangle primitive into a collection of line segments arranged in
10405bd8deadSopenharmony_ci    strips stretching horizontally across the rectangle. Each vertex
10415bd8deadSopenharmony_ci    produced by the primitive generator has an associated (u,v,w) or (u,v)
10425bd8deadSopenharmony_ci    position in a normalized parameter space, with parameter values in the
10435bd8deadSopenharmony_ci    range [0,1], as illustrated in Figure 11.X1. For "triangles", the vertex
10445bd8deadSopenharmony_ci    position is a barycentric coordinate (u,v,w), where u+v+w==1, and
10455bd8deadSopenharmony_ci    indicates the relative influence of the three vertices of the triangle
10465bd8deadSopenharmony_ci    on the position of the vertex. For "quads" and "isolines", the position
10475bd8deadSopenharmony_ci    is a (u,v) coordinate indicating the relative horizontal and vertical
10485bd8deadSopenharmony_ci    position of the vertex relative to the subdivided rectangle. The
10495bd8deadSopenharmony_ci    subdivision process is explained in more detail in subsequent sections.
10505bd8deadSopenharmony_ci
10515bd8deadSopenharmony_ci        (0,1)   OL3   (1,1)          (0,1,0)         (0,1)          (1,1)
10525bd8deadSopenharmony_ci         +--------------+              +             ^  +  <no edge>   +
10535bd8deadSopenharmony_ci         |              |             / \            |
10545bd8deadSopenharmony_ci         |  +--------+  |            /   \           |  +--------------+
10555bd8deadSopenharmony_ci         |  |   IL0  |  |       OL0 /  +  \ OL2      |
10565bd8deadSopenharmony_ci      OL0|  |IL1     |  |OL2       /  / \  \         |  +--------------+
10575bd8deadSopenharmony_ci         |  |        |  |         /  /IL0\  \       OL0
10585bd8deadSopenharmony_ci         |  +--------+  |        /  +-----+  \       |  +--------------+
10595bd8deadSopenharmony_ci         |              |       /             \      |
10605bd8deadSopenharmony_ci         +--------------+      +---------------+     v  +--------------+
10615bd8deadSopenharmony_ci        (0,0)   OL1   (1,0) (0,0,1)   OL1   (1,0,0)   (0,0)   OL1   (1,0)
10625bd8deadSopenharmony_ci
10635bd8deadSopenharmony_ci              quads                triangles                isolines
10645bd8deadSopenharmony_ci
10655bd8deadSopenharmony_ci      Figure 11.X1: Domain parameterization for tessellation generator
10665bd8deadSopenharmony_ci      primitive modes (triangles, quads, or isolines). The coordinates
10675bd8deadSopenharmony_ci      illustrate the value of gl_TessCoord at the corners of the domain. The
10685bd8deadSopenharmony_ci      labels on the edges indicate the inner (IL0 and IL1) and outer (OL0
10695bd8deadSopenharmony_ci      through OL3) tessellation level values used to control the number of
10705bd8deadSopenharmony_ci      subdivisions along each edge of the domain.
10715bd8deadSopenharmony_ci
10725bd8deadSopenharmony_ci    A patch is discarded by the tessellation primitive generator if any
10735bd8deadSopenharmony_ci    relevant outer tessellation level is less than or equal to zero. Patches
10745bd8deadSopenharmony_ci    will also be discarded if any relevant outer tessellation level
10755bd8deadSopenharmony_ci    corresponds to a floating-point NaN (not a number) in implementations
10765bd8deadSopenharmony_ci    supporting NaN. When patches are discarded, no new primitives will be
10775bd8deadSopenharmony_ci    generated and the tessellation evaluation program will not be run. For
10785bd8deadSopenharmony_ci    "quads", all four outer levels are relevant. For "triangles" and
10795bd8deadSopenharmony_ci    "isolines", only the first three or two outer levels, respectively, are
10805bd8deadSopenharmony_ci    relevant. Negative inner levels will not cause a patch to be discarded;
10815bd8deadSopenharmony_ci    they will be clamped as described below.
10825bd8deadSopenharmony_ci
10835bd8deadSopenharmony_ci    Each of the tessellation levels is used to determine the number and
10845bd8deadSopenharmony_ci    spacing of segments used to subdivide a corresponding edge. The method
10855bd8deadSopenharmony_ci    used to derive the number and spacing of segments is specified by an
10865bd8deadSopenharmony_ci    input layout declaration in the tessellation evaluation shader using one
10875bd8deadSopenharmony_ci    of the identifiers "equal_spacing", "fractional_even_spacing", or
10885bd8deadSopenharmony_ci    "fractional_odd_spacing". If no spacing is specified in the tessellation
10895bd8deadSopenharmony_ci    evaluation shader, "equal_spacing" will be used.
10905bd8deadSopenharmony_ci
10915bd8deadSopenharmony_ci    If "equal_spacing" is used, the floating-point tessellation level is
10925bd8deadSopenharmony_ci    first clamped to the range [1,<max>], where <max> is the
10935bd8deadSopenharmony_ci    implementation-dependent maximum tessellation level (the value of
10945bd8deadSopenharmony_ci    MAX_TESS_GEN_LEVEL_OES). The result is rounded up to the nearest integer
10955bd8deadSopenharmony_ci    <n>, and the corresponding edge is divided into <n> segments of equal
10965bd8deadSopenharmony_ci    length in (u,v) space.
10975bd8deadSopenharmony_ci
10985bd8deadSopenharmony_ci    If "fractional_even_spacing" is used, the tessellation level is first
10995bd8deadSopenharmony_ci    clamped to the range [2,<max>] and then rounded up to the nearest even
11005bd8deadSopenharmony_ci    integer <n>. If "fractional_odd_spacing" is used, the tessellation level
11015bd8deadSopenharmony_ci    is clamped to the range [1,<max>-1] and then rounded up to the nearest
11025bd8deadSopenharmony_ci    odd integer <n>. If <n> is one, the edge will not be subdivided.
11035bd8deadSopenharmony_ci    Otherwise, the corresponding edge will be divided into <n>-2 segments of
11045bd8deadSopenharmony_ci    equal length, and two additional segments of equal length that are
11055bd8deadSopenharmony_ci    typically shorter than the other segments. The length of the two
11065bd8deadSopenharmony_ci    additional segments relative to the others will decrease monotonically
11075bd8deadSopenharmony_ci    with the value of <n>-<f>, where <f> is the clamped floating-point
11085bd8deadSopenharmony_ci    tessellation level. When <n>-<f> is zero, the additional segments will
11095bd8deadSopenharmony_ci    have equal length to the other segments. As <n>-<f> approaches 2.0, the
11105bd8deadSopenharmony_ci    relative length of the additional segments approaches zero. The two
11115bd8deadSopenharmony_ci    additional segments should be placed symmetrically on opposite sides of
11125bd8deadSopenharmony_ci    the subdivided edge. The relative location of these two segments is
11135bd8deadSopenharmony_ci    undefined, but must be identical for any pair of subdivided edges with
11145bd8deadSopenharmony_ci    identical values of <f>.
11155bd8deadSopenharmony_ci
11165bd8deadSopenharmony_ci    When the tessellation primitive generator produces triangles (in the
11175bd8deadSopenharmony_ci    "triangles" or "quads" modes), the orientation of all triangles can be
11185bd8deadSopenharmony_ci    specified by an input layout declaration in the tessellation evaluation
11195bd8deadSopenharmony_ci    shader using the identifiers "cw" and "ccw". If the order is "cw", the
11205bd8deadSopenharmony_ci    vertices of all generated triangles will have a clockwise ordering in
11215bd8deadSopenharmony_ci    (u,v) or (u,v,w) space, as illustrated in Figure 11.X1. If the order is
11225bd8deadSopenharmony_ci    "ccw", the vertices will be specified in counter-clockwise order. If no
11235bd8deadSopenharmony_ci    layout is specified, "ccw" will be used.
11245bd8deadSopenharmony_ci
11255bd8deadSopenharmony_ci    For all primitive modes, the tessellation primitive generator is capable
11265bd8deadSopenharmony_ci    of generating points instead of lines or triangles. If an input layout
11275bd8deadSopenharmony_ci    declaration in the tessellation evaluation shader specifies the identifier
11285bd8deadSopenharmony_ci    "point_mode", the primitive generator will generate one point for each
11295bd8deadSopenharmony_ci    distinct vertex produced by tessellation.  Otherwise, the primitive
11305bd8deadSopenharmony_ci    generator will produce a collection of line segments or triangles
11315bd8deadSopenharmony_ci    according to the primitive mode.  When tessellating triangles or quads in
11325bd8deadSopenharmony_ci    point mode with fractional odd spacing, the tessellation primitive
11335bd8deadSopenharmony_ci    generator may produce "interior" vertices that are positioned on the edge
11345bd8deadSopenharmony_ci    of the patch if an inner tessellation level is less than or equal to one.
11355bd8deadSopenharmony_ci    Such vertices are considered distinct from vertices produced by
11365bd8deadSopenharmony_ci    subdividing the outer edge of the patch, even if there are pairs of
11375bd8deadSopenharmony_ci    vertices with identical coordinates.
11385bd8deadSopenharmony_ci
11395bd8deadSopenharmony_ci    The points, lines, or triangles produced by the tessellation primitive
11405bd8deadSopenharmony_ci    generator are passed to subsequent pipeline stages in an
11415bd8deadSopenharmony_ci    implementation-dependent order.
11425bd8deadSopenharmony_ci
11435bd8deadSopenharmony_ci
11445bd8deadSopenharmony_ci    Section 11.1ts.2.1, Triangle Tessellation
11455bd8deadSopenharmony_ci
11465bd8deadSopenharmony_ci    If the tessellation primitive mode is "triangles", an equilateral
11475bd8deadSopenharmony_ci    triangle is subdivided into a collection of triangles covering the area
11485bd8deadSopenharmony_ci    of the original triangle. First, the original triangle is subdivided
11495bd8deadSopenharmony_ci    into a collection of concentric equilateral triangles. The edges of each
11505bd8deadSopenharmony_ci    of these triangles are subdivided, and the area between each triangle
11515bd8deadSopenharmony_ci    pair is filled by triangles produced by joining the vertices on the
11525bd8deadSopenharmony_ci    subdivided edges. The number of concentric triangles and the number of
11535bd8deadSopenharmony_ci    subdivisions along each triangle except the outermost is derived from
11545bd8deadSopenharmony_ci    the first inner tessellation level. The edges of the outermost triangle
11555bd8deadSopenharmony_ci    are subdivided independently, using the first, second, and third outer
11565bd8deadSopenharmony_ci    tessellation levels to control the number of subdivisions of the u==0
11575bd8deadSopenharmony_ci    (left), v==0 (bottom), and w==0 (right) edges, respectively. The second
11585bd8deadSopenharmony_ci    inner tessellation level and the fourth outer tessellation level have no
11595bd8deadSopenharmony_ci    effect in this mode.
11605bd8deadSopenharmony_ci
11615bd8deadSopenharmony_ci    If the first inner tessellation level and all three outer tessellation
11625bd8deadSopenharmony_ci    levels are exactly one after clamping and rounding, only a single
11635bd8deadSopenharmony_ci    triangle with (u,v,w) coordinates of (0,0,1), (1,0,0), and (0,1,0) is
11645bd8deadSopenharmony_ci    generated. If the inner tessellation level is one and any of the outer
11655bd8deadSopenharmony_ci    tessellation levels is greater than one, the inner tessellation level is
11665bd8deadSopenharmony_ci    treated as though it were originally specified as 1+epsilon and will be
11675bd8deadSopenharmony_ci    rounded up to result in a two- or three-segment subdivision according to
11685bd8deadSopenharmony_ci    the tessellation spacing.
11695bd8deadSopenharmony_ci
11705bd8deadSopenharmony_ci    If any tessellation level is greater than one, tessellation begins by
11715bd8deadSopenharmony_ci    producing a set of concentric inner triangles and subdividing their
11725bd8deadSopenharmony_ci    edges. First, the three outer edges are temporarily subdivided using the
11735bd8deadSopenharmony_ci    clamped and rounded first inner tessellation level and the specified
11745bd8deadSopenharmony_ci    tessellation spacing, generating <n> segments. For the outermost inner
11755bd8deadSopenharmony_ci    triangle, the inner triangle is degenerate -- a single point at the
11765bd8deadSopenharmony_ci    center of the triangle -- if <n> is two. Otherwise, for each corner of
11775bd8deadSopenharmony_ci    the outer triangle, an inner triangle corner is produced at the
11785bd8deadSopenharmony_ci    intersection of two lines extended perpendicular to the corner's two
11795bd8deadSopenharmony_ci    adjacent edges running through the vertex of the subdivided outer edge
11805bd8deadSopenharmony_ci    nearest that corner. If <n> is three, the edges of the inner triangle
11815bd8deadSopenharmony_ci    are not subdivided and is the final triangle in the set of concentric
11825bd8deadSopenharmony_ci    triangles. Otherwise, each edge of the inner triangle is divided into
11835bd8deadSopenharmony_ci    <n>-2 segments, with the <n>-1 vertices of this subdivision produced by
11845bd8deadSopenharmony_ci    intersecting the inner edge with lines perpendicular to the edge running
11855bd8deadSopenharmony_ci    through the <n>-1 innermost vertices of the subdivision of the outer
11865bd8deadSopenharmony_ci    edge. Once the outermost inner triangle is subdivided, the previous
11875bd8deadSopenharmony_ci    subdivision process repeats itself, using the generated triangle as an
11885bd8deadSopenharmony_ci    outer triangle. This subdivision process is illustrated in Figure 11.X2.
11895bd8deadSopenharmony_ci
11905bd8deadSopenharmony_ci                                                   (0,1,0)
11915bd8deadSopenharmony_ci                                                      +
11925bd8deadSopenharmony_ci                                                     / \
11935bd8deadSopenharmony_ci                 (0,1,0)                            O. .O
11945bd8deadSopenharmony_ci                    +                              /  +  \
11955bd8deadSopenharmony_ci                   / \                            O. / \ .O
11965bd8deadSopenharmony_ci                  O. .O                          /  O. .O  \
11975bd8deadSopenharmony_ci                 /  +  \                        /  /  +  \  \
11985bd8deadSopenharmony_ci                O. / \ .O                      /  /  / \  \  \
11995bd8deadSopenharmony_ci               /  O. .O  \                    O. /  /   \  \ .O
12005bd8deadSopenharmony_ci              /  /  O  \  \                  /  O. /     \ .O  \
12015bd8deadSopenharmony_ci             O. /   .   \ .O                /  /  O-------O  \  \
12025bd8deadSopenharmony_ci            /  O----O----O  \              O. /   .       .   \ .O
12035bd8deadSopenharmony_ci           /   .    .    .   \            /  O----O-------O----O  \
12045bd8deadSopenharmony_ci          O----O----O----O----O          /   .    .       .    .   \
12055bd8deadSopenharmony_ci       (0,0,1)             (1,0,0)      O----O----O-------O----O----O
12065bd8deadSopenharmony_ci                                     (0,0,1)                     (1,0,0)
12075bd8deadSopenharmony_ci
12085bd8deadSopenharmony_ci      Figure 11.X2, Inner Triangle Tessellation with inner tessellation
12095bd8deadSopenharmony_ci      levels of four and five (not to scale). This figure depicts the
12105bd8deadSopenharmony_ci      vertices along the bottom edge of the concentric triangles. The edges
12115bd8deadSopenharmony_ci      of inner triangles are subdivided by intersecting the edge with
12125bd8deadSopenharmony_ci      segments perpendicular to the edge passing through each inner vertex
12135bd8deadSopenharmony_ci      of the subdivided outer edge.
12145bd8deadSopenharmony_ci
12155bd8deadSopenharmony_ci    Once all the concentric triangles are produced and their edges are
12165bd8deadSopenharmony_ci    subdivided, the area between each pair of adjacent inner triangles is
12175bd8deadSopenharmony_ci    filled completely with a set of non-overlapping triangles. In this
12185bd8deadSopenharmony_ci    subdivision, two of the three vertices of each triangle are taken from
12195bd8deadSopenharmony_ci    adjacent vertices on a subdivided edge of one triangle; the third is one
12205bd8deadSopenharmony_ci    of the vertices on the corresponding edge of the other triangle. If the
12215bd8deadSopenharmony_ci    innermost triangle is degenerate (i.e., a point), the triangle
12225bd8deadSopenharmony_ci    containing it is subdivided into six triangles by connecting each of the
12235bd8deadSopenharmony_ci    six vertices on that triangle with the center point. If the innermost
12245bd8deadSopenharmony_ci    triangle is not degenerate, that triangle is added to the set of
12255bd8deadSopenharmony_ci    generated triangles as-is.
12265bd8deadSopenharmony_ci
12275bd8deadSopenharmony_ci    After the area corresponding to any inner triangles is filled, the
12285bd8deadSopenharmony_ci    primitive generator generates triangles to cover area between the
12295bd8deadSopenharmony_ci    outermost triangle and the outermost inner triangle. To do this, the
12305bd8deadSopenharmony_ci    temporary subdivision of the outer triangle edge above is discarded.
12315bd8deadSopenharmony_ci    Instead, the u==0, v==0, and w==0 edges are subdivided according to the
12325bd8deadSopenharmony_ci    first, second, and third outer tessellation levels, respectively, and
12335bd8deadSopenharmony_ci    the tessellation spacing. The original subdivision of the first inner
12345bd8deadSopenharmony_ci    triangle is retained. The area between the outer and first inner
12355bd8deadSopenharmony_ci    triangles is completely filled by non-overlapping triangles as described
12365bd8deadSopenharmony_ci    above. If the first (and only) inner triangle is degenerate, a set of
12375bd8deadSopenharmony_ci    triangles is produced by connecting each vertex on the outer triangle
12385bd8deadSopenharmony_ci    edges with the center point.
12395bd8deadSopenharmony_ci
12405bd8deadSopenharmony_ci    After all triangles are generated, each vertex in the subdivided
12415bd8deadSopenharmony_ci    triangle is assigned a barycentric (u,v,w) coordinate based on its
12425bd8deadSopenharmony_ci    location relative to the three vertices of the outer triangle.
12435bd8deadSopenharmony_ci
12445bd8deadSopenharmony_ci    The algorithm used to subdivide the triangular domain in (u,v,w) space
12455bd8deadSopenharmony_ci    into individual triangles is implementation-dependent. However, the set
12465bd8deadSopenharmony_ci    of triangles produced will completely cover the domain, and no portion
12475bd8deadSopenharmony_ci    of the domain will be covered by multiple triangles. The order in which
12485bd8deadSopenharmony_ci    the generated triangles passed to subsequent pipeline stages and the
12495bd8deadSopenharmony_ci    order of the vertices in those triangles are both
12505bd8deadSopenharmony_ci    implementation-dependent. However, when depicted in a manner similar to
12515bd8deadSopenharmony_ci    Figure 11.X2, the order of the vertices in the generated triangles will
12525bd8deadSopenharmony_ci    be either all clockwise or all counter-clockwise, according to the
12535bd8deadSopenharmony_ci    vertex order layout declaration.
12545bd8deadSopenharmony_ci
12555bd8deadSopenharmony_ci
12565bd8deadSopenharmony_ci    Section 11.1ts.2.2, Quad Tessellation
12575bd8deadSopenharmony_ci
12585bd8deadSopenharmony_ci    If the tessellation primitive mode is "quads", a rectangle is subdivided
12595bd8deadSopenharmony_ci    into a collection of triangles covering the area of the original
12605bd8deadSopenharmony_ci    rectangle. First, the original rectangle is subdivided into a regular
12615bd8deadSopenharmony_ci    mesh of rectangles, where the number of rectangles along the u==0 and
12625bd8deadSopenharmony_ci    u==1 (vertical) and v==0 and v==1 (horizontal) edges are derived from
12635bd8deadSopenharmony_ci    the first and second inner tessellation levels, respectively. All
12645bd8deadSopenharmony_ci    rectangles, except those adjacent to one of the outer rectangle edges,
12655bd8deadSopenharmony_ci    are decomposed into triangle pairs. The outermost rectangle edges are
12665bd8deadSopenharmony_ci    subdivided independently, using the first, second, third, and fourth
12675bd8deadSopenharmony_ci    outer tessellation levels to control the number of subdivisions of the
12685bd8deadSopenharmony_ci    u==0 (left), v==0 (bottom), u==1 (right), and v==1 (top) edges,
12695bd8deadSopenharmony_ci    respectively. The area between the inner rectangles of the mesh and the
12705bd8deadSopenharmony_ci    outer rectangle edges are filled by triangles produced by joining the
12715bd8deadSopenharmony_ci    vertices on the subdivided outer edges to the vertices on the edge of
12725bd8deadSopenharmony_ci    the inner rectangle mesh.
12735bd8deadSopenharmony_ci
12745bd8deadSopenharmony_ci    If both clamped inner tessellation levels and all four clamped outer
12755bd8deadSopenharmony_ci    tessellation levels are exactly one, only a single triangle pair covering
12765bd8deadSopenharmony_ci    the outer rectangle is generated. Otherwise, if either clamped inner
12775bd8deadSopenharmony_ci    tessellation level is one, that tessellation level is treated as though it
12785bd8deadSopenharmony_ci    were originally specified as 1+epsilon and will result in a two- or
12795bd8deadSopenharmony_ci    three-segment subdivision depending on the tessellation spacing.  When
12805bd8deadSopenharmony_ci    used with fractional odd spacing, the three-segment subdivision may
12815bd8deadSopenharmony_ci    produce "inner" vertices positioned on the edge of the rectangle.
12825bd8deadSopenharmony_ci
12835bd8deadSopenharmony_ci    If any tessellation level is greater than one, tessellation begins by
12845bd8deadSopenharmony_ci    subdividing the u==0 and u==1 edges of the outer rectangle into <m>
12855bd8deadSopenharmony_ci    segments using the clamped and rounded first inner tessellation level
12865bd8deadSopenharmony_ci    and the tessellation spacing. The v==0 and v==1 edges are subdivided
12875bd8deadSopenharmony_ci    into <n> segments using using the second inner tessellation level. Each
12885bd8deadSopenharmony_ci    vertex on the u==0 and v==0 edges are joined with the corresponding
12895bd8deadSopenharmony_ci    vertex on the u==1 and v==1 edges to produce a set of vertical and
12905bd8deadSopenharmony_ci    horizontal lines that divide the rectangle into a grid of smaller
12915bd8deadSopenharmony_ci    rectangles. The primitive generator emits a pair of non-overlapping
12925bd8deadSopenharmony_ci    triangles covering each such rectangle not adjacent to an edge of the
12935bd8deadSopenharmony_ci    outer rectangle. The boundary of the region covered by these triangles
12945bd8deadSopenharmony_ci    forms an inner rectangle, the edges of which are subdivided by the grid
12955bd8deadSopenharmony_ci    vertices that lie on the edge. If either <m> or <n> is two, the inner
12965bd8deadSopenharmony_ci    rectangle is degenerate, and one or both of the rectangle's "edges"
12975bd8deadSopenharmony_ci    consist of a single point. This subdivision is illustrated in Figure
12985bd8deadSopenharmony_ci    11.X3.
12995bd8deadSopenharmony_ci
13005bd8deadSopenharmony_ci                                     (0,1)                (1,1)
13015bd8deadSopenharmony_ci                                       +--+--+--+--+--+--+--+
13025bd8deadSopenharmony_ci                                       |  .  .  .  .  .  .  |
13035bd8deadSopenharmony_ci              (0,1)       (1,1)        |  .  .  .  .  .  .  |
13045bd8deadSopenharmony_ci                +--+--+--+--+          +..O--O--O--O--O--O..+
13055bd8deadSopenharmony_ci                |  .  .  .  |          |  |**|**|**|**|**|  |
13065bd8deadSopenharmony_ci                |  .  .  .  |          |  |**|**|**|**|**|  |
13075bd8deadSopenharmony_ci                +..O--O--O..+          +..O--+--+--+--+--O..+
13085bd8deadSopenharmony_ci                |  .  .  .  |          |  |**|**|**|**|**|  |
13095bd8deadSopenharmony_ci                |  .  .  .  |          |  |**|**|**|**|**|  |
13105bd8deadSopenharmony_ci                +--+--+--+--+          +..O--O--O--O--O--O..+
13115bd8deadSopenharmony_ci              (0,0)       (1,0)        |  .  .  .  .  .  .  |
13125bd8deadSopenharmony_ci                                       |  .  .  .  .  .  .  |
13135bd8deadSopenharmony_ci                                       +--+--+--+--+--+--+--+
13145bd8deadSopenharmony_ci                                     (0,0)                (1,0)
13155bd8deadSopenharmony_ci
13165bd8deadSopenharmony_ci      Figure 11.X3, Inner Quad Tessellation with inner tessellation levels
13175bd8deadSopenharmony_ci      of (4,2) and (7,4). The areas labeled with "*" on the right depict the
13185bd8deadSopenharmony_ci      10 inner rectangles, each of which will be subdivided into two
13195bd8deadSopenharmony_ci      triangles. The points labeled "O" depict vertices on the boundary of
13205bd8deadSopenharmony_ci      the inner rectangle, where the inner rectangle on the left side is
13215bd8deadSopenharmony_ci      degenerate (a single line segment). The dotted lines (".") depict the
13225bd8deadSopenharmony_ci      horizontal and vertical edges connecting corresponding points on the
13235bd8deadSopenharmony_ci      outer rectangle edge.
13245bd8deadSopenharmony_ci
13255bd8deadSopenharmony_ci    After the area corresponding to the inner rectangle is filled, the
13265bd8deadSopenharmony_ci    primitive generator must produce triangles to cover area between the
13275bd8deadSopenharmony_ci    inner and outer rectangles. To do this, the subdivision of the outer
13285bd8deadSopenharmony_ci    rectangle edge above is discarded. Instead, the u==0, v==0, u==1, and
13295bd8deadSopenharmony_ci    v==1 edges are subdivided according to the first, second, third, and
13305bd8deadSopenharmony_ci    fourth outer tessellation levels, respectively, and the tessellation
13315bd8deadSopenharmony_ci    spacing. The original subdivision of the inner rectangle is retained.
13325bd8deadSopenharmony_ci    The area between the outer and inner rectangles is completely filled by
13335bd8deadSopenharmony_ci    non-overlapping triangles. Two of the three vertices of each triangle
13345bd8deadSopenharmony_ci    are adjacent vertices on a subdivided edge of one rectangle; the third
13355bd8deadSopenharmony_ci    is one of the vertices on the corresponding edge of the other triangle.
13365bd8deadSopenharmony_ci    If either edge of the innermost rectangle is degenerate, the area near
13375bd8deadSopenharmony_ci    the corresponding outer edges is filled by connecting each vertex on the
13385bd8deadSopenharmony_ci    outer edge with the single vertex making up the inner "edge".
13395bd8deadSopenharmony_ci
13405bd8deadSopenharmony_ci    The algorithm used to subdivide the rectangular domain in (u,v) space
13415bd8deadSopenharmony_ci    into individual triangles is implementation-dependent. However, the set
13425bd8deadSopenharmony_ci    of triangles produced will completely cover the domain, and no portion
13435bd8deadSopenharmony_ci    of the domain will be covered by multiple triangles. The order in which
13445bd8deadSopenharmony_ci    the generated triangles passed to subsequent pipeline stages and the
13455bd8deadSopenharmony_ci    order of the vertices in those triangles are both
13465bd8deadSopenharmony_ci    implementation-dependent. However, when depicted in a manner similar to
13475bd8deadSopenharmony_ci    Figure 11.X3, the order of the vertices in the generated triangles will
13485bd8deadSopenharmony_ci    be either all clockwise or all counter-clockwise, according to the
13495bd8deadSopenharmony_ci    vertex order layout declaration.
13505bd8deadSopenharmony_ci
13515bd8deadSopenharmony_ci
13525bd8deadSopenharmony_ci    Isoline Tessellation
13535bd8deadSopenharmony_ci
13545bd8deadSopenharmony_ci    If the tessellation primitive mode is "isolines", a set of independent
13555bd8deadSopenharmony_ci    horizontal line segments is drawn. The segments are arranged into
13565bd8deadSopenharmony_ci    connected strips called "isolines", where the vertices of each isoline
13575bd8deadSopenharmony_ci    have a constant v coordinate and u coordinates covering the full range
13585bd8deadSopenharmony_ci    [0,1]. The number of isolines generated is derived from the first outer
13595bd8deadSopenharmony_ci    tessellation level; the number of segments in each isoline is derived
13605bd8deadSopenharmony_ci    from the second outer tessellation level. Both inner tessellation levels
13615bd8deadSopenharmony_ci    and the third and fourth outer tessellation levels have no effect in
13625bd8deadSopenharmony_ci    this mode.
13635bd8deadSopenharmony_ci
13645bd8deadSopenharmony_ci    As with quad tessellation above, isoline tessellation begins with a
13655bd8deadSopenharmony_ci    rectangle. The u==0 and u==1 edges of the rectangle are subdivided
13665bd8deadSopenharmony_ci    according to the first outer tessellation level. For the purposes of
13675bd8deadSopenharmony_ci    this subdivision, the tessellation spacing mode is ignored and treated
13685bd8deadSopenharmony_ci    as "equal_spacing". A line is drawn connecting each vertex on the u==0
13695bd8deadSopenharmony_ci    rectangle edge to the corresponding vertex on the u==1 rectangle edge,
13705bd8deadSopenharmony_ci    except that no line is drawn between (0,1) and (1,1). If the number of
13715bd8deadSopenharmony_ci    segments on the subdivided u==0 and u==1 edges is <n>, this process will
13725bd8deadSopenharmony_ci    result in <n> equally spaced lines with constant v coordinates of 0,
13735bd8deadSopenharmony_ci    1/<n>, 2/<n>, ..., (<n>-1)/<n>.
13745bd8deadSopenharmony_ci
13755bd8deadSopenharmony_ci    Each of the <n> lines is then subdivided according to the second outer
13765bd8deadSopenharmony_ci    tessellation level and the tessellation spacing, resulting in <m> line
13775bd8deadSopenharmony_ci    segments. Each segment of each line is emitted by the tessellation
13785bd8deadSopenharmony_ci    primitive generator, as illustrated in Figure 11.X4.
13795bd8deadSopenharmony_ci
13805bd8deadSopenharmony_ci       (0,1)                   (1,1)
13815bd8deadSopenharmony_ci         +                       +          (0,1)             (1,1)
13825bd8deadSopenharmony_ci                                              +                 +
13835bd8deadSopenharmony_ci         O---O---O---O---O---O---O
13845bd8deadSopenharmony_ci
13855bd8deadSopenharmony_ci         O---O---O---O---O---O---O
13865bd8deadSopenharmony_ci
13875bd8deadSopenharmony_ci         O---O---O---O---O---O---O
13885bd8deadSopenharmony_ci                                              O-----O-----O-----O
13895bd8deadSopenharmony_ci         O---O---O---O---O---O---O          (0,0)             (1,0)
13905bd8deadSopenharmony_ci       (0,0)                   (1,0)
13915bd8deadSopenharmony_ci
13925bd8deadSopenharmony_ci      Figure 11.X4, Isoline Tessellation with the first two outer
13935bd8deadSopenharmony_ci      tessellation levels of (4,6) and (1,3), respectively. The lines
13945bd8deadSopenharmony_ci      connecting the vertices labeled "O" are emitted by the primitive
13955bd8deadSopenharmony_ci      generator. The vertices labeled "+" correspond to (u,v) coordinates of
13965bd8deadSopenharmony_ci      (0,1) and (1,1), where no line segments are generated.
13975bd8deadSopenharmony_ci
13985bd8deadSopenharmony_ci    The order in which the generated line segments are passed to subsequent
13995bd8deadSopenharmony_ci    pipeline stages and the order of the vertices in each generated line
14005bd8deadSopenharmony_ci    segment are both implementation-dependent.
14015bd8deadSopenharmony_ci
14025bd8deadSopenharmony_ci
14035bd8deadSopenharmony_ci    Section 11.1ts.3, Tessellation Evaluation Shaders
14045bd8deadSopenharmony_ci
14055bd8deadSopenharmony_ci    If active, the tessellation evaluation shader takes the (u,v) or (u,v,w)
14065bd8deadSopenharmony_ci    location of each vertex in the primitive subdivided by the tessellation
14075bd8deadSopenharmony_ci    primitive generator, and generates a vertex with a position and
14085bd8deadSopenharmony_ci    associated attributes. The tessellation evaluation shader can read any
14095bd8deadSopenharmony_ci    of the vertices of its input patch, which is the output patch produced
14105bd8deadSopenharmony_ci    by the tessellation control shader. Tessellation evaluation shaders are
14115bd8deadSopenharmony_ci    created as described in section 7.1, using a <type> of
14125bd8deadSopenharmony_ci    TESS_EVALUATION_SHADER_OES.
14135bd8deadSopenharmony_ci
14145bd8deadSopenharmony_ci    Each invocation of the tessellation evaluation shader writes the
14155bd8deadSopenharmony_ci    attributes of exactly one vertex. The number of vertices evaluated per
14165bd8deadSopenharmony_ci    patch depends on the tessellation level values computed by the
14175bd8deadSopenharmony_ci    tessellation control shaders. Tessellation evaluation shader invocations
14185bd8deadSopenharmony_ci    run independently, and no invocation can access the variables belonging
14195bd8deadSopenharmony_ci    to another invocation. All invocations are capable of accessing all the
14205bd8deadSopenharmony_ci    vertices of their corresponding input patch.
14215bd8deadSopenharmony_ci
14225bd8deadSopenharmony_ci    The number of the vertices in the input patch is fixed and is equal to
14235bd8deadSopenharmony_ci    the tessellation control shader output patch size parameter in effect
14245bd8deadSopenharmony_ci    when the program was last linked.
14255bd8deadSopenharmony_ci
14265bd8deadSopenharmony_ci
14275bd8deadSopenharmony_ci    Section 11.1ts.3.1, Tessellation Evaluation Shader Variables
14285bd8deadSopenharmony_ci
14295bd8deadSopenharmony_ci    Tessellation evaluation shaders can access uniforms belonging to the
14305bd8deadSopenharmony_ci    current program object. The amount of storage available for uniform
14315bd8deadSopenharmony_ci    variables, except for atomic counters, in the default uniform block
14325bd8deadSopenharmony_ci    accessed by a tessellation evaluation shader is specified by the value
14335bd8deadSopenharmony_ci    of the implementation-dependent constant
14345bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES. The total amount of combined
14355bd8deadSopenharmony_ci    storage available for uniform variables in all uniform blocks accessed
14365bd8deadSopenharmony_ci    by a tessellation evaluation shader (including the default uniform
14375bd8deadSopenharmony_ci    block) is specified by the value of the implementation-dependent
14385bd8deadSopenharmony_ci    constant MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES. These
14395bd8deadSopenharmony_ci    values represent the numbers of individual floating-point, integer, or
14405bd8deadSopenharmony_ci    boolean values that can be held in uniform variable storage for a
14415bd8deadSopenharmony_ci    tessellation evaluation shader. A uniform matrix in the default uniform
14425bd8deadSopenharmony_ci    block with single-precision components will consume no more than 4 x
14435bd8deadSopenharmony_ci    min(r,c) uniform components. A link error is generated if an attempt is
14445bd8deadSopenharmony_ci    made to utilize more than the space available for tessellation
14455bd8deadSopenharmony_ci    evaluation shader uniform variables. Uniforms are manipulated as
14465bd8deadSopenharmony_ci    described in section 2.11.6. Tessellation evaluation shaders also have
14475bd8deadSopenharmony_ci    access to samplers to perform texturing operations, as described in
14485bd8deadSopenharmony_ci    section 2.11.7.
14495bd8deadSopenharmony_ci
14505bd8deadSopenharmony_ci    Tessellation evaluation shaders can access the transformed attributes of
14515bd8deadSopenharmony_ci    all vertices for their input primitive using input variables. A
14525bd8deadSopenharmony_ci    tessellation control shader writing to output variables generates the
14535bd8deadSopenharmony_ci    values of these input varying variables, including values for built-in
14545bd8deadSopenharmony_ci    as well as user- defined varying variables. Values for any varying
14555bd8deadSopenharmony_ci    variables that are not written by a tessellation control shader are
14565bd8deadSopenharmony_ci    undefined.
14575bd8deadSopenharmony_ci
14585bd8deadSopenharmony_ci    Additionally, tessellation evaluation shaders can write to one or more
14595bd8deadSopenharmony_ci    output variables that will be passed to subsequent programmable shader
14605bd8deadSopenharmony_ci    stages or fixed functionality vertex pipeline stages.
14615bd8deadSopenharmony_ci
14625bd8deadSopenharmony_ci
14635bd8deadSopenharmony_ci    Section 11.1ts.3.2, Tessellation Evaluation Shader Execution Environment
14645bd8deadSopenharmony_ci
14655bd8deadSopenharmony_ci    If there is an active program for the tessellation evaluation stage, the
14665bd8deadSopenharmony_ci    executable version of the program's tessellation evaluation shader is
14675bd8deadSopenharmony_ci    used to process vertices produced by the tessellation primitive
14685bd8deadSopenharmony_ci    generator. During this processing, the shader may access the input patch
14695bd8deadSopenharmony_ci    processed by the primitive generator. When tessellation evaluation
14705bd8deadSopenharmony_ci    shader execution completes, a new vertex is assembled from the output
14715bd8deadSopenharmony_ci    variables written by the shader and is passed to subsequent pipeline
14725bd8deadSopenharmony_ci    stages.
14735bd8deadSopenharmony_ci
14745bd8deadSopenharmony_ci    There are several special considerations for tessellation evaluation
14755bd8deadSopenharmony_ci    shader execution described in the following sections.
14765bd8deadSopenharmony_ci
14775bd8deadSopenharmony_ci
14785bd8deadSopenharmony_ci    Section 11.1ts.3.2.1, Texture Access
14795bd8deadSopenharmony_ci
14805bd8deadSopenharmony_ci    Section 11.1.3.1 describes texture lookup functionality accessible to a
14815bd8deadSopenharmony_ci    vertex shader. The texel fetch and texture size query functionality
14825bd8deadSopenharmony_ci    described there also applies to tessellation evaluation shaders.
14835bd8deadSopenharmony_ci
14845bd8deadSopenharmony_ci
14855bd8deadSopenharmony_ci    Section 11.1ts.3.3, Tessellation Evaluation Shader Inputs
14865bd8deadSopenharmony_ci
14875bd8deadSopenharmony_ci    Section 7.1 ("Built-In Variables") of the OpenGL ES Shading Language
14885bd8deadSopenharmony_ci    Specification describes the built-in variable array gl_in[] available as
14895bd8deadSopenharmony_ci    input to a tessellation evaluation shader. gl_in[] receives values from
14905bd8deadSopenharmony_ci    equivalent built-in output variables written by a previous shader
14915bd8deadSopenharmony_ci    (section 11.1.3). Each array element of gl_in[] is a structure holding
14925bd8deadSopenharmony_ci    values for a specific vertex of the input patch. The length of gl_in[]
14935bd8deadSopenharmony_ci    is equal to the implementation- dependent maximum patch size
14945bd8deadSopenharmony_ci    (gl_MaxPatchVertices). Behavior is undefined if gl_in[] is indexed with
14955bd8deadSopenharmony_ci    a vertex index greater than or equal to the current patch size. The
14965bd8deadSopenharmony_ci    members of each element of the gl_in[] array are gl_Position
14975bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported: ]]
14985bd8deadSopenharmony_ci        and gl_PointSize.
14995bd8deadSopenharmony_ci
15005bd8deadSopenharmony_ci    Tessellation evaluation shaders have available several other special
15015bd8deadSopenharmony_ci    input variables not replicated per-vertex and not contained in gl_in[],
15025bd8deadSopenharmony_ci    including:
15035bd8deadSopenharmony_ci
15045bd8deadSopenharmony_ci      * The variables gl_PatchVerticesIn and gl_PrimitiveID are filled with
15055bd8deadSopenharmony_ci        the number of the vertices in the input patch and a primitive
15065bd8deadSopenharmony_ci        number, respectively. They behave exactly as the identically named
15075bd8deadSopenharmony_ci        inputs for tessellation control shaders.
15085bd8deadSopenharmony_ci
15095bd8deadSopenharmony_ci      * The variable gl_TessCoord is a three-component floating-point vector
15105bd8deadSopenharmony_ci        consisting of the (u,v,w) coordinate of the vertex being processed
15115bd8deadSopenharmony_ci        by the tessellation evaluation shader. The values of u, v, and w are
15125bd8deadSopenharmony_ci        in the range [0,1], and vary linearly across the primitive being
15135bd8deadSopenharmony_ci        subdivided. For tessellation primitive modes of "quads" or
15145bd8deadSopenharmony_ci        "isolines", the w value is always zero. The (u,v,w) coordinates are
15155bd8deadSopenharmony_ci        generated by the tessellation primitive generator in a manner
15165bd8deadSopenharmony_ci        dependent on the primitive mode, as described in section 11.1ts.2.
15175bd8deadSopenharmony_ci        gl_TessCoord is not an array; it specifies the location of the
15185bd8deadSopenharmony_ci        vertex being processed by the tessellation evaluation shader, not of
15195bd8deadSopenharmony_ci        any vertex in the input patch.
15205bd8deadSopenharmony_ci
15215bd8deadSopenharmony_ci      * The variables gl_TessLevelOuter[] and gl_TessLevelInner[] are arrays
15225bd8deadSopenharmony_ci        holding outer and inner tessellation levels of the patch, as used by
15235bd8deadSopenharmony_ci        the tessellation primitive generator. Tessellation level values
15245bd8deadSopenharmony_ci        loaded in these variables will be prior to the clamping and rounding
15255bd8deadSopenharmony_ci        operations performed by the primitive generator as described in
15265bd8deadSopenharmony_ci        Section 11.1ts.2. For triangular tessellation, gl_TessLevelOuter[3]
15275bd8deadSopenharmony_ci        and gl_TessLevelInner[1] will be undefined. For isoline
15285bd8deadSopenharmony_ci        tessellation, gl_TessLevelOuter[2], gl_TessLevelOuter[3], and both
15295bd8deadSopenharmony_ci        values in gl_TessLevelInner[] are undefined.
15305bd8deadSopenharmony_ci
15315bd8deadSopenharmony_ci    A tessellation evaluation shader may also declare user-defined
15325bd8deadSopenharmony_ci    per-vertex input variables. User-defined per-vertex input variables are
15335bd8deadSopenharmony_ci    declared with the qualifier "in" and have a value for each vertex in the
15345bd8deadSopenharmony_ci    input patch. User-defined per-vertex input varying variables have a
15355bd8deadSopenharmony_ci    value for each vertex and thus need to be declared as arrays or inside
15365bd8deadSopenharmony_ci    input blocks declared as arrays. Declaring an array size is optional. If
15375bd8deadSopenharmony_ci    no size is specified, it will be taken from the implementation-dependent
15385bd8deadSopenharmony_ci    maximum patch size (gl_MaxPatchVertices). If a size is specified, it must
15395bd8deadSopenharmony_ci    match the maximum patch size; otherwise, a compile or link error will
15405bd8deadSopenharmony_ci    occur. Since the array size may be larger than the number of vertices
15415bd8deadSopenharmony_ci    found in the input patch, behavior is undefined if a per-vertex input
15425bd8deadSopenharmony_ci    variable is accessed using an index greater than or equal to the number of
15435bd8deadSopenharmony_ci    vertices in the input patch. The OpenGL ES Shading Language doesn't
15445bd8deadSopenharmony_ci    support multi-dimensional arrays as shader inputs or outputs; therefore,
15455bd8deadSopenharmony_ci    user-defined tessellation evaluation shader inputs corresponding to
15465bd8deadSopenharmony_ci    shader outputs declared as arrays must be declared as array members of
15475bd8deadSopenharmony_ci    an input block that is itself declared as an array.
15485bd8deadSopenharmony_ci
15495bd8deadSopenharmony_ci    Additionally, a tessellation evaluation shader may declare per-patch
15505bd8deadSopenharmony_ci    input variables using the qualifier "patch in". Unlike per-vertex
15515bd8deadSopenharmony_ci    inputs, per-patch inputs do not correspond to any specific vertex in the
15525bd8deadSopenharmony_ci    patch, and are not indexed by vertex number. Per-patch inputs declared
15535bd8deadSopenharmony_ci    as arrays have multiple values for the input patch; similarly declared
15545bd8deadSopenharmony_ci    per-vertex inputs would indicate a single value for each vertex in the
15555bd8deadSopenharmony_ci    output patch. User-defined per-patch input variables are filled with
15565bd8deadSopenharmony_ci    corresponding per-patch output values written by the tessellation
15575bd8deadSopenharmony_ci    control shader.
15585bd8deadSopenharmony_ci
15595bd8deadSopenharmony_ci    Similarly to the limit on vertex shader output components (see section
15605bd8deadSopenharmony_ci    11.1.2.1), there is a limit on the number of components of per-vertex
15615bd8deadSopenharmony_ci    and per-patch input variables that can be read by the tessellation
15625bd8deadSopenharmony_ci    evaluation shader, given by the values of the implementation-dependent
15635bd8deadSopenharmony_ci    constants MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES and
15645bd8deadSopenharmony_ci    MAX_TESS_PATCH_COMPONENTS_OES, respectively. The built-in inputs
15655bd8deadSopenharmony_ci    gl_TessLevelOuter[] and gl_TessLevelInner[] are not counted against the
15665bd8deadSopenharmony_ci    per-patch limit.
15675bd8deadSopenharmony_ci
15685bd8deadSopenharmony_ci    When a program is linked, all components of any input variable read by a
15695bd8deadSopenharmony_ci    tessellation evaluation shader will count against this limit. A program
15705bd8deadSopenharmony_ci    whose tessellation evaluation shader exceeds this limit may fail to
15715bd8deadSopenharmony_ci    link, unless device-dependent optimizations are able to make the program
15725bd8deadSopenharmony_ci    fit within available hardware resources.
15735bd8deadSopenharmony_ci
15745bd8deadSopenharmony_ci    Component counting rules for different variable types and variable
15755bd8deadSopenharmony_ci    declarations are the same as for MAX_VERTEX_OUTPUT_COMPONENTS (see
15765bd8deadSopenharmony_ci    section 11.1.2.1).
15775bd8deadSopenharmony_ci
15785bd8deadSopenharmony_ci
15795bd8deadSopenharmony_ci    Section 11.1ts.3.4, Tessellation Evaluation Shader Outputs
15805bd8deadSopenharmony_ci
15815bd8deadSopenharmony_ci    Tessellation evaluation shaders have a number of built-in output
15825bd8deadSopenharmony_ci    variables used to pass values to equivalent built-in input variables
15835bd8deadSopenharmony_ci    read by subsequent shader stages or to subsequent fixed functionality
15845bd8deadSopenharmony_ci    vertex processing pipeline stages. These variables are gl_Position
15855bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported: ]]
15865bd8deadSopenharmony_ci        and gl_PointSize,
15875bd8deadSopenharmony_ci    and behave identically to equivalently named vertex shader outputs (see
15885bd8deadSopenharmony_ci    section 11.1.3). A tessellation evaluation shader may also declare
15895bd8deadSopenharmony_ci    user-defined per-vertex output variables.
15905bd8deadSopenharmony_ci
15915bd8deadSopenharmony_ci    Similarly to the limit on vertex shader output components (see section
15925bd8deadSopenharmony_ci    11.1.2.1), there is a limit on the number of components of built-in and
15935bd8deadSopenharmony_ci    user-defined output variables that can be written by the tessellation
15945bd8deadSopenharmony_ci    evaluation shader, given by the values of the implementation-dependent
15955bd8deadSopenharmony_ci    constant MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES.
15965bd8deadSopenharmony_ci
15975bd8deadSopenharmony_ci    When a program is linked, all components of any output variable written
15985bd8deadSopenharmony_ci    by a tessellation evaluation shader will count against this limit. A
15995bd8deadSopenharmony_ci    program whose tessellation evaluation shader exceeds this limit may fail
16005bd8deadSopenharmony_ci    to link, unless device-dependent optimizations are able to make the
16015bd8deadSopenharmony_ci    program fit within available hardware resources.
16025bd8deadSopenharmony_ci
16035bd8deadSopenharmony_ci    Component counting rules for different variable types and variable
16045bd8deadSopenharmony_ci    declarations are the same as for MAX_VERTEX_OUTPUT_COMPONENTS. (see
16055bd8deadSopenharmony_ci    section 11.1.2.1).
16065bd8deadSopenharmony_ci
16075bd8deadSopenharmony_ci
16085bd8deadSopenharmony_ci    Modify section 12.1, "Transform Feedback"
16095bd8deadSopenharmony_ci
16105bd8deadSopenharmony_ci    Replace the second paragraph of the section on p. 274 (as modified
16115bd8deadSopenharmony_ci    by OES_geometry_shader):
16125bd8deadSopenharmony_ci
16135bd8deadSopenharmony_ci    The data captured in transform feedback mode depends on the active
16145bd8deadSopenharmony_ci    programs on each of the shader stages. If a program is active for the
16155bd8deadSopenharmony_ci    geometry shader stage, transform feedback captures the vertices of each
16165bd8deadSopenharmony_ci    primitive emitted by the geometry shader. Otherwise, if a program is
16175bd8deadSopenharmony_ci    active for the tessellation evaluation shader stage, transform feedback
16185bd8deadSopenharmony_ci    captures each primitive produced by the tessellation primitive generator,
16195bd8deadSopenharmony_ci    whose vertices are processed by the tessellation evaluation shader.
16205bd8deadSopenharmony_ci    Otherwise, transform feedback captures each primitive processed by the
16215bd8deadSopenharmony_ci    vertex shader.
16225bd8deadSopenharmony_ci
16235bd8deadSopenharmony_ci    Modify the second paragraph following ResumeTransformFeedback on p. 277
16245bd8deadSopenharmony_ci    (as modified by OES_geometry_shader):
16255bd8deadSopenharmony_ci
16265bd8deadSopenharmony_ci    When transform feedback is active and not paused ... If a tessellation
16275bd8deadSopenharmony_ci    evaluation or geometry shader is active, the type of primitive emitted
16285bd8deadSopenharmony_ci    by that shader is used instead of the <mode> parameter passed to drawing
16295bd8deadSopenharmony_ci    commands for the purposes of this error check. If tessellation
16305bd8deadSopenharmony_ci    evaluation and geometry shaders are both active, the output primitive
16315bd8deadSopenharmony_ci    type of the geometry shader will be used for the purposes of this error.
16325bd8deadSopenharmony_ci    Any primitive type may be used while transform feedback is paused.
16335bd8deadSopenharmony_ci
16345bd8deadSopenharmony_ci
16355bd8deadSopenharmony_ci    Modify the second paragraph of section 12.2, "Primitive Queries" on p.
16365bd8deadSopenharmony_ci    281:
16375bd8deadSopenharmony_ci
16385bd8deadSopenharmony_ci    When BeginQuery is called with a target of PRIMITIVES_GENERATED_OES, ...
16395bd8deadSopenharmony_ci    This counter counts the number of primitives emitted by a geometry
16405bd8deadSopenharmony_ci    shader, if active, possibly further tessellated into separate primitives
16415bd8deadSopenharmony_ci    during the transform feedback stage, if active.
16425bd8deadSopenharmony_ci
16435bd8deadSopenharmony_ci
16445bd8deadSopenharmony_ci    Modify section 13.3, "Points"
16455bd8deadSopenharmony_ci
16465bd8deadSopenharmony_ci    Replace the text starting "The point size is determined ..." on p. 290:
16475bd8deadSopenharmony_ci
16485bd8deadSopenharmony_ci    The point size is determined by the last active stage before the
16495bd8deadSopenharmony_ci    rasterizer:
16505bd8deadSopenharmony_ci
16515bd8deadSopenharmony_ci    * the geometry shader, if active; or
16525bd8deadSopenharmony_ci    * the tessellation evaluation shader, if active and no geometry shader
16535bd8deadSopenharmony_ci      is active;
16545bd8deadSopenharmony_ci    * the vertex shader, otherwise.
16555bd8deadSopenharmony_ci
16565bd8deadSopenharmony_ci    If the last active stage is not a vertex shader and does not statically
16575bd8deadSopenharmony_ci    assign a value to gl_PointSize, the point size is 1.0. Otherwise, the
16585bd8deadSopenharmony_ci    point size is taken from the shader built-in gl_PointSize written by
16595bd8deadSopenharmony_ci    that stage.
16605bd8deadSopenharmony_ci      [[ Note that it is impossible to assign a value to gl_PointSize
16615bd8deadSopenharmony_ci         if OES_geometry_point_size or OES_tessellation_point_size is not
16625bd8deadSopenharmony_ci         supported and enabled in the relevant shader stages. ]]
16635bd8deadSopenharmony_ci
16645bd8deadSopenharmony_ci    If the last active stage is a vertex shader, the point size is taken
16655bd8deadSopenharmony_ci    from the shader built-in gl_PointSize written by the vertex shader.
16665bd8deadSopenharmony_ci
16675bd8deadSopenharmony_ci    In all cases, the point size is clamped to the implementation-dependent
16685bd8deadSopenharmony_ci    point size range. If the value written to gl_PointSize is less than or
16695bd8deadSopenharmony_ci    equal to zero, or if no value is written to gl_PointSize (except as
16705bd8deadSopenharmony_ci    noted above) the point size is undefined. The supported range ...
16715bd8deadSopenharmony_ci
16725bd8deadSopenharmony_ci
16735bd8deadSopenharmony_ci    Add new section A.3ts in Appendix A before section A.4, "Atomic Counter
16745bd8deadSopenharmony_ci    Invariance" on p. 405:
16755bd8deadSopenharmony_ci
16765bd8deadSopenharmony_ci    Section A.3ts, Tessellation Invariance
16775bd8deadSopenharmony_ci
16785bd8deadSopenharmony_ci    When using a program containing tessellation evaluation shaders, the
16795bd8deadSopenharmony_ci    fixed-function tessellation primitive generator consumes the input patch
16805bd8deadSopenharmony_ci    specified by an application and emits a new set of primitives. The
16815bd8deadSopenharmony_ci    following invariance rules are intended to provide repeatability
16825bd8deadSopenharmony_ci    guarantees. Additionally, they are intended to allow an application with
16835bd8deadSopenharmony_ci    a carefully crafted tessellation evaluation shader to ensure that the
16845bd8deadSopenharmony_ci    sets of triangles generated for two adjacent patches have identical
16855bd8deadSopenharmony_ci    vertices along shared patch edges, avoiding "cracks" caused by minor
16865bd8deadSopenharmony_ci    differences in the positions of vertices along shared edges.
16875bd8deadSopenharmony_ci
16885bd8deadSopenharmony_ci    Rule 1: When processing two patches with identical outer and inner
16895bd8deadSopenharmony_ci    tessellation levels, the tessellation primitive generator will emit an
16905bd8deadSopenharmony_ci    identical set of point, line, or triangle primitives as long as the
16915bd8deadSopenharmony_ci    active program used to process the patch primitives has tessellation
16925bd8deadSopenharmony_ci    evaluation shaders specifying the same tessellation mode, spacing,
16935bd8deadSopenharmony_ci    vertex order, and point mode input layout qualifiers. Two sets of
16945bd8deadSopenharmony_ci    primitives are considered identical if and only if they contain the same
16955bd8deadSopenharmony_ci    number and type of primitives and the generated tessellation coordinates
16965bd8deadSopenharmony_ci    for the vertex numbered <m> of the primitive numbered <n> are identical
16975bd8deadSopenharmony_ci    for all values of <m> and <n>.
16985bd8deadSopenharmony_ci
16995bd8deadSopenharmony_ci    Rule 2: The set of vertices generated along the outer edge of the
17005bd8deadSopenharmony_ci    subdivided primitive in triangle and quad tessellation, and the
17015bd8deadSopenharmony_ci    tessellation coordinates of each, depends only on the corresponding
17025bd8deadSopenharmony_ci    outer tessellation level and the spacing input layout qualifier in the
17035bd8deadSopenharmony_ci    tessellation evaluation shader of the active program.
17045bd8deadSopenharmony_ci
17055bd8deadSopenharmony_ci    Rule 3: The set of vertices generated when subdividing any outer
17065bd8deadSopenharmony_ci    primitive edge is always symmetric. For triangle tessellation, if the
17075bd8deadSopenharmony_ci    subdivision generates a vertex with tessellation coordinates of the form
17085bd8deadSopenharmony_ci    (0,x,1-x), (x,0,1-x), or (x,1-x,0), it will also generate a vertex with
17095bd8deadSopenharmony_ci    coordinates of exactly (0,1-x,x), (1-x,0,x), or (1-x,x,0), respectively.
17105bd8deadSopenharmony_ci    For quad tessellation, if the subdivision generates a vertex with
17115bd8deadSopenharmony_ci    coordinates of (x,0) or (0,x), it will also generate a vertex with
17125bd8deadSopenharmony_ci    coordinates of exactly (1-x,0) or (0,1-x), respectively. For isoline
17135bd8deadSopenharmony_ci    tessellation, if it generates vertices at (0,x) and (1,x) where <x> is
17145bd8deadSopenharmony_ci    not zero, it will also generate vertices at exactly (0,1-x) and (1,1-x),
17155bd8deadSopenharmony_ci    respectively.
17165bd8deadSopenharmony_ci
17175bd8deadSopenharmony_ci    Rule 4: The set of vertices generated when subdividing outer edges in
17185bd8deadSopenharmony_ci    triangular and quad tessellation must be independent of the specific
17195bd8deadSopenharmony_ci    edge subdivided, given identical outer tessellation levels and spacing.
17205bd8deadSopenharmony_ci    For example, if vertices at (x,1-x,0) and (1-x,x,0) are generated when
17215bd8deadSopenharmony_ci    subdividing the w==0 edge in triangular tessellation, vertices must be
17225bd8deadSopenharmony_ci    generated at (x,0,1-x) and (1-x,0,x) when subdividing an otherwise
17235bd8deadSopenharmony_ci    identical v==0 edge. For quad tessellation, if vertices at (x,0) and
17245bd8deadSopenharmony_ci    (1-x,0) are generated when subdividing the v==0 edge, vertices must be
17255bd8deadSopenharmony_ci    generated at (0,x) and (0,1-x) when subdividing an otherwise identical
17265bd8deadSopenharmony_ci    u==0 edge.
17275bd8deadSopenharmony_ci
17285bd8deadSopenharmony_ci    Rule 5: When processing two patches that are identical in all respects
17295bd8deadSopenharmony_ci    enumerated in rule 1 except for vertex order, the set of triangles
17305bd8deadSopenharmony_ci    generated for triangle and quad tessellation must be identical except
17315bd8deadSopenharmony_ci    for vertex and triangle order. For each triangle <n1> produced by
17325bd8deadSopenharmony_ci    processing the first patch, there must be a triangle <n2> produced when
17335bd8deadSopenharmony_ci    processing the second patch each of whose vertices has the same
17345bd8deadSopenharmony_ci    tessellation coordinates as one of the vertices in <n1>.
17355bd8deadSopenharmony_ci
17365bd8deadSopenharmony_ci    Rule 6: When processing two patches that are identical in all respects
17375bd8deadSopenharmony_ci    enumerated in rule 1 other than matching outer tessellation levels
17385bd8deadSopenharmony_ci    and/or vertex order, the set of interior triangles generated for
17395bd8deadSopenharmony_ci    triangle and quad tessellation must be identical in all respects except
17405bd8deadSopenharmony_ci    for vertex and triangle order. For each interior triangle <n1> produced
17415bd8deadSopenharmony_ci    by processing the first patch, there must be a triangle <n2> produced
17425bd8deadSopenharmony_ci    when processing the second patch each of whose vertices has the same
17435bd8deadSopenharmony_ci    tessellation coordinates as one of the vertices in <n1>. A triangle
17445bd8deadSopenharmony_ci    produced by the tessellator is considered an interior triangle if none
17455bd8deadSopenharmony_ci    of its vertices lie on an outer edge of the subdivided primitive.
17465bd8deadSopenharmony_ci
17475bd8deadSopenharmony_ci    Rule 7: For quad and triangle tessellation, the set of triangles
17485bd8deadSopenharmony_ci    connecting an inner and outer edge depends only on the inner and outer
17495bd8deadSopenharmony_ci    tessellation levels corresponding to that edge and the spacing input
17505bd8deadSopenharmony_ci    layout qualifier.
17515bd8deadSopenharmony_ci
17525bd8deadSopenharmony_ci    Rule 8: The value of all defined components of gl_TessCoord will be in
17535bd8deadSopenharmony_ci    the range [0,1]. Additionally, for any defined component <x> of
17545bd8deadSopenharmony_ci    gl_TessCoord, the results of computing (1.0-<x>) in a tessellation
17555bd8deadSopenharmony_ci    evaluation shader will be exact. Some floating-point values in the range
17565bd8deadSopenharmony_ci    [0,1] may fail to satisfy this property, but such values may never be
17575bd8deadSopenharmony_ci    used as tessellation coordinate components.
17585bd8deadSopenharmony_ci
17595bd8deadSopenharmony_ci
17605bd8deadSopenharmony_ciDependencies on OES_shader_multisample_interpolation
17615bd8deadSopenharmony_ci
17625bd8deadSopenharmony_ci    If OES_shader_multisample_interpolation is not supported ignore all
17635bd8deadSopenharmony_ci    references to the "sample in" and "sample out" qualifiers.
17645bd8deadSopenharmony_ci
17655bd8deadSopenharmony_ciNew State
17665bd8deadSopenharmony_ci
17675bd8deadSopenharmony_ci    Add new table 20.1ts "Current Values and Associated Data" preceding table
17685bd8deadSopenharmony_ci    20.2 on p. 354:
17695bd8deadSopenharmony_ci
17705bd8deadSopenharmony_ci                                                            Default
17715bd8deadSopenharmony_ci    Get Value                         Type  Get Command     Value     Description              Sec.
17725bd8deadSopenharmony_ci    ------------------------          ----  --------------  --------- ------------------------ ------------
17735bd8deadSopenharmony_ci    PATCH_VERTICES_OES                Z+    GetIntegerv     3         Number of vertices in    10.1.7sp
17745bd8deadSopenharmony_ci                                                                      input patch
17755bd8deadSopenharmony_ci
17765bd8deadSopenharmony_ci    Add to table 20.19, "Program Pipeline Object State":
17775bd8deadSopenharmony_ci
17785bd8deadSopenharmony_ci                                                         Initial
17795bd8deadSopenharmony_ci    Get Value                  Type Get Command          Value    Description                      Sec
17805bd8deadSopenharmony_ci    -------------------------- ---- -------------------- -------  -------------------------------- ---
17815bd8deadSopenharmony_ci    TESS_CONTROL_SHADER_OES    Z+   GetProgramPipelineiv 0        Name of current tess. control    7.4
17825bd8deadSopenharmony_ci                                                                  shader program object
17835bd8deadSopenharmony_ci    TESS_EVALUATION_SHADER_OES Z+   GetProgramPipelineiv 0        Name of current tess. evaluation 7.4
17845bd8deadSopenharmony_ci                                                                  shader program object
17855bd8deadSopenharmony_ci
17865bd8deadSopenharmony_ci    Add new table 20.25ts, "Program Object State (cont.)":
17875bd8deadSopenharmony_ci
17885bd8deadSopenharmony_ci                                                         Default
17895bd8deadSopenharmony_ci    Get Value                        Type  Get Command   Value      Description                Sec.
17905bd8deadSopenharmony_ci    -------------------------------- ----  ------------  ---------  ------------------------   --------
17915bd8deadSopenharmony_ci    TESS_CONTROL_OUTPUT_VERTICES_OES Z+    GetProgramiv  0          Output patch size          11.1ts.1
17925bd8deadSopenharmony_ci                                                                    for tess. control shader
17935bd8deadSopenharmony_ci    TESS_GEN_MODE_OES                E     GetProgramiv  QUADS_OES  Base primitive type for    11.1ts.2
17945bd8deadSopenharmony_ci                                                                    tess. prim. generator
17955bd8deadSopenharmony_ci    TESS_GEN_SPACING_OES             E     GetProgramiv  EQUAL      Spacing of tess. prim.     11.1ts.2
17965bd8deadSopenharmony_ci                                                                    generator edge subdivision
17975bd8deadSopenharmony_ci    TESS_GEN_VERTEX_ORDER_OES        E     GetProgramiv  CCW        Order of vertices in       11.1ts.2
17985bd8deadSopenharmony_ci                                                                    primitives generated by
17995bd8deadSopenharmony_ci                                                                    tess. prim generator
18005bd8deadSopenharmony_ci    TESS_GEN_POINT_MODE_OES          B     GetProgramiv  FALSE      Tess prim. generator       11.1ts.2
18015bd8deadSopenharmony_ci                                                                    emits points?
18025bd8deadSopenharmony_ci
18035bd8deadSopenharmony_ci    Add to table 20.28, "Program Object Resource State (cont.)":
18045bd8deadSopenharmony_ci
18055bd8deadSopenharmony_ci                                                                        Initial
18065bd8deadSopenharmony_ci    Get Value                                Type  Get Command          Value   Description             Sec.
18075bd8deadSopenharmony_ci    ---------------------------------------- ----  -------------------- ------- ----------------------- -----
18085bd8deadSopenharmony_ci    REFERENCED_BY_TESS_CONTROL_SHADER_OES    Z+    GetProgramResourceiv -       Active resource used by 7.3.1
18095bd8deadSopenharmony_ci                                                                                tess. control shader?
18105bd8deadSopenharmony_ci    REFERENCED_BY_TESS_EVALUATION_SHADER_OES Z+    GetProgramResourceiv -       Active resource used by 7.3.1
18115bd8deadSopenharmony_ci                                                                                tess. eval. shader?
18125bd8deadSopenharmony_ci
18135bd8deadSopenharmony_ciNew Implementation Dependent State
18145bd8deadSopenharmony_ci
18155bd8deadSopenharmony_ci    Add to table 20.39 "Implementation Dependent Values":
18165bd8deadSopenharmony_ci
18175bd8deadSopenharmony_ci                                                                  Minimum
18185bd8deadSopenharmony_ci    Get Value                                   Type  Get Command  Value  Description                  Sec.
18195bd8deadSopenharmony_ci    ------------------------------------------- ----  ----------- ------- ---------------------------- ------
18205bd8deadSopenharmony_ci    PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED_OES B     GetBooleanv   -     True if primitive restart is 10.3.4
18215bd8deadSopenharmony_ci                                                                          supported for patches
18225bd8deadSopenharmony_ci
18235bd8deadSopenharmony_ci    Add new table 20.43ts "Implementation Dependent Tessellation Shader Limits"
18245bd8deadSopenharmony_ci    following table 6.31 "Implementation Dependent Vertex Shader Limits":
18255bd8deadSopenharmony_ci
18265bd8deadSopenharmony_ci                                                                          Minimum
18275bd8deadSopenharmony_ci    Get Value                                           Type  Get Command  Value  Description                     Sec.
18285bd8deadSopenharmony_ci    -------------------------                           ----  ----------- ------- ------------------------------- ------
18295bd8deadSopenharmony_ci    MAX_TESS_GEN_LEVEL_OES                              Z+    GetIntegerv   64    Max. level supported by         11.1ts.2
18305bd8deadSopenharmony_ci                                                                                  tess. primitive generator
18315bd8deadSopenharmony_ci    MAX_PATCH_VERTICES_OES                              Z+    GetIntegerv   32    Maximum patch size              10.1
18325bd8deadSopenharmony_ci    MAX_TESS_CONTROL_UNIFORM_COMPONENTS_OES             Z+    GetIntegerv   1024  No. of words for TCS uniforms   11.1ts.1.1
18335bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_UNIFORM_COMPONENTS_OES          Z+    GetIntegerv   1024  No. of words for TES uniforms   11.1ts.3.1
18345bd8deadSopenharmony_ci    MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS_OES            Z+    GetIntegerv   16    No. of tex. image units for TCS 11.1.3.5
18355bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS_OES         Z+    GetIntegerv   16    No. of tex. image units for TES 11.1.3.5
18365bd8deadSopenharmony_ci    MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES              Z+    GetIntegerv   64    No. components for per-patch    11.1ts.1.2
18375bd8deadSopenharmony_ci                                                                                  vertex outputs in TCS
18385bd8deadSopenharmony_ci    MAX_TESS_PATCH_COMPONENTS_OES                       Z+    GetIntegerv   120   No. components for per-patch    11.1ts.1.2
18395bd8deadSopenharmony_ci                                                                                  output varyings for TCS
18405bd8deadSopenharmony_ci    MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS_OES        Z+    GetIntegerv   2048  Total no. components for TCS    11.1ts.1.2
18415bd8deadSopenharmony_ci                                                                                  outputs
18425bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_OUTPUT_COMPONENTS_OES           Z+    GetIntegerv   64    No. components for per-vertex   11.1ts.3.2
18435bd8deadSopenharmony_ci                                                                                  outputs in TES
18445bd8deadSopenharmony_ci    MAX_TESS_CONTROL_INPUT_COMPONENTS_OES               Z+    GetIntegerv   64    No. components for per-vertex   11.1ts.1.2
18455bd8deadSopenharmony_ci                                                                                  inputs in TCS
18465bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_INPUT_COMPONENTS_OES            Z+    GetIntegerv   64    No. components for per-vertex   11.1ts.3.2
18475bd8deadSopenharmony_ci                                                                                  inputs in TES
18485bd8deadSopenharmony_ci    MAX_TESS_CONTROL_UNIFORM_BLOCKS_OES                 Z+    GetIntegerv   12    No. of supported uniform        7.6.2
18495bd8deadSopenharmony_ci                                                                                  blocks for TCS
18505bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_UNIFORM_BLOCKS_OES              Z+    GetIntegerv   12    No. of supported uniform        7.6.2
18515bd8deadSopenharmony_ci                                                                                  blocks for TES
18525bd8deadSopenharmony_ci    MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS_OES         Z+    GetIntegerv   0     No. of AC (atomic counter)      7.7
18535bd8deadSopenharmony_ci                                                                                  buffers accessed by a TCS
18545bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS_OES      Z+    GetIntegerv   0     No. of AC (atomic counter)      7.7
18555bd8deadSopenharmony_ci                                                                                  buffers accessed by a TES
18565bd8deadSopenharmony_ci    MAX_TESS_CONTROL_ATOMIC_COUNTERS_OES                Z+    GetIntegerv   0     Number of ACs accessed by a TCS 11.1.3.6
18575bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_ATOMIC_COUNTERS_OES             Z+    GetIntegerv   0     Number of ACs accessed by a TES 11.1.3.6
18585bd8deadSopenharmony_ci    MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS_OES          Z+    GetIntegerv   0     No. of shader storage blocks    7.8
18595bd8deadSopenharmony_ci                                                                                  accessed by a TCS
18605bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS_OES       Z+    GetIntegerv   0     No. of shader storage blocks    7.8
18615bd8deadSopenharmony_ci                                                                                  accessed by a TES
18625bd8deadSopenharmony_ci
18635bd8deadSopenharmony_ci
18645bd8deadSopenharmony_ci    Add to table 20.46 "Implementation Dependent Aggregate Shader Limits"
18655bd8deadSopenharmony_ci    ([fn] is a dagger mark referring to existing text in the table caption):
18665bd8deadSopenharmony_ci
18675bd8deadSopenharmony_ci
18685bd8deadSopenharmony_ci                                                                          Minimum
18695bd8deadSopenharmony_ci    Get Value                                           Type  Get Command Value   Description                   Sec.
18705bd8deadSopenharmony_ci    --------------------------------------------------- ----  ----------- ------- ----------------------------- ----------
18715bd8deadSopenharmony_ci    MAX_TESS_CONTROL_IMAGE_UNIFORMS_OES                 Z+    GetIntegerv 0       No. of image variables in TCS 11.1.3.7
18725bd8deadSopenharmony_ci                                                                                  in TCS
18735bd8deadSopenharmony_ci    MAX_TESS_EVALUATION_IMAGE_UNIFORMS_OES              Z+    GetIntegerv 0       No. of image variables in TES 11.1.3.7
18745bd8deadSopenharmony_ci    MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS_OES    Z+    GetIntegerv [fn]    No. of words for TCS uniform  11.1ts.1.1
18755bd8deadSopenharmony_ci                                                                                  variables in all uniform
18765bd8deadSopenharmony_ci                                                                                  blocks (including default)
18775bd8deadSopenharmony_ci    MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS_OES Z+    GetIntegerv [fn]    No. of words for TES uniform  11.1ts.3.1
18785bd8deadSopenharmony_ci                                                                                  variables in all uniform
18795bd8deadSopenharmony_ci                                                                                  blocks (including default)
18805bd8deadSopenharmony_ci
18815bd8deadSopenharmony_ci    Modify existing entries in table 20.46:
18825bd8deadSopenharmony_ci
18835bd8deadSopenharmony_ci                                                                          Minimum
18845bd8deadSopenharmony_ci    Get Value                                           Type  Get Command Value   Description                Sec.
18855bd8deadSopenharmony_ci    --------------------------------------------        ----  ----------- ------- -------------------------- -------
18865bd8deadSopenharmony_ci    MAX_UNIFORM_BUFFER_BINDINGS                         Z+    GetIntegerv 72      Max. no. of uniform buffer 7.6.2
18875bd8deadSopenharmony_ci                                                                                  binding points
18885bd8deadSopenharmony_ci    MAX_COMBINED_UNIFORM_BLOCKS                         Z+    GetIntegerv 60      Max. no. of uniform        7.6.2
18895bd8deadSopenharmony_ci                                                                                  buffers per program
18905bd8deadSopenharmony_ci    MAX_COMBINED_TEXTURE_IMAGE_UNITS                    Z+    GetIntegerv 96      Total no. of tex. units    11.1.3.5
18915bd8deadSopenharmony_ci                                                                                  accessible by the GL
18925bd8deadSopenharmony_ci
18935bd8deadSopenharmony_ciAdditions to the OpenGL ES Shading Language 3.10 Specification
18945bd8deadSopenharmony_ci
18955bd8deadSopenharmony_ci    Including the following line in a shader can be used to control the
18965bd8deadSopenharmony_ci    language features described in this extension:
18975bd8deadSopenharmony_ci
18985bd8deadSopenharmony_ci      #extension GL_OES_tessellation_shader : <behavior>
18995bd8deadSopenharmony_ci      #extension GL_OES_tessellation_point_size : <behavior>
19005bd8deadSopenharmony_ci
19015bd8deadSopenharmony_ci    where <behavior> is as specified in section 3.4.
19025bd8deadSopenharmony_ci
19035bd8deadSopenharmony_ci    A new preprocessor #define is added to the OpenGL ES Shading Language:
19045bd8deadSopenharmony_ci
19055bd8deadSopenharmony_ci      #define GL_OES_tessellation_shader 1
19065bd8deadSopenharmony_ci      #define GL_OES_tessellation_point_size 1
19075bd8deadSopenharmony_ci
19085bd8deadSopenharmony_ci    If the OES_tessellation_shader extension is enabled, the
19095bd8deadSopenharmony_ci    OES_shader_io_blocks extension is also implicitly enabled.
19105bd8deadSopenharmony_ci
19115bd8deadSopenharmony_ci
19125bd8deadSopenharmony_ci    Change the introduction to Chapter 2 "Overview of OpenGL ES Shading" as
19135bd8deadSopenharmony_ci    follows:
19145bd8deadSopenharmony_ci
19155bd8deadSopenharmony_ci    The OpenGL ES Shading Language is actually several closely related
19165bd8deadSopenharmony_ci    languages. These languages are used to create shaders for each of the
19175bd8deadSopenharmony_ci    programmable processors contained in the OpenGL ES processing pipeline.
19185bd8deadSopenharmony_ci    Currently, these processors are the compute, vertex, tessellation
19195bd8deadSopenharmony_ci    control, tessellation evaluation, geometry, and fragment processors.
19205bd8deadSopenharmony_ci
19215bd8deadSopenharmony_ci    Unless otherwise noted in this Specification, a language feature applies
19225bd8deadSopenharmony_ci    to all languages, and common usage will refer to these languages as a
19235bd8deadSopenharmony_ci    single language. The specific languages will be referred to by the name
19245bd8deadSopenharmony_ci    of the processor they target: compute, vertex, tessellation control,
19255bd8deadSopenharmony_ci    tessellation evalution, geometry, or fragment.
19265bd8deadSopenharmony_ci
19275bd8deadSopenharmony_ci
19285bd8deadSopenharmony_ci    Add new subsections 2.ts1 and 2.ts2 preceding subsection 2.gs "Geometry
19295bd8deadSopenharmony_ci    Processor":
19305bd8deadSopenharmony_ci
19315bd8deadSopenharmony_ci    Section 2.ts1, Tessellation Control Processor
19325bd8deadSopenharmony_ci
19335bd8deadSopenharmony_ci    The <tessellation control processor> is a programmable unit that
19345bd8deadSopenharmony_ci    operates on a patch of incoming vertices and their associated data,
19355bd8deadSopenharmony_ci    emitting a new output patch. Compilation units written in the OpenGL ES
19365bd8deadSopenharmony_ci    Shading Language to run on this processor are called tessellation
19375bd8deadSopenharmony_ci    control shaders. When a tessellation control shader is compiled and
19385bd8deadSopenharmony_ci    linked, it results in a tessellation control shader executable that runs
19395bd8deadSopenharmony_ci    on the tessellation control processor.
19405bd8deadSopenharmony_ci
19415bd8deadSopenharmony_ci    The tessellation control processor is invoked for each each vertex of
19425bd8deadSopenharmony_ci    the output patch. Each invocation can read the attributes of any vertex
19435bd8deadSopenharmony_ci    in the input or output patches, but can only write per-vertex attributes
19445bd8deadSopenharmony_ci    for the corresponding output patch vertex. The shader invocations
19455bd8deadSopenharmony_ci    collectively produce a set of per-patch attributes for the output patch.
19465bd8deadSopenharmony_ci    After all tessellation control shader invocations have completed, the
19475bd8deadSopenharmony_ci    output vertices and per-patch attributes are assembled to form a patch
19485bd8deadSopenharmony_ci    to be used by subsequent pipeline stages.
19495bd8deadSopenharmony_ci
19505bd8deadSopenharmony_ci    Tessellation control shader invocations run mostly independently, with
19515bd8deadSopenharmony_ci    undefined relative execution order. However, the built-in function
19525bd8deadSopenharmony_ci    barrier() can be used to control execution order by synchronizing
19535bd8deadSopenharmony_ci    invocations, effectively dividing tessellation control shader execution
19545bd8deadSopenharmony_ci    into a set of phases. Tessellation control shaders will get undefined
19555bd8deadSopenharmony_ci    results if one invocation reads a per-vertex or per-patch attribute
19565bd8deadSopenharmony_ci    written by another invocation at any point during the same phase, or if
19575bd8deadSopenharmony_ci    two invocations attempt to write different values to the same per-patch
19585bd8deadSopenharmony_ci    output in a single phase.
19595bd8deadSopenharmony_ci
19605bd8deadSopenharmony_ci    Section 2.ts2, Tessellation Evaluation Processor
19615bd8deadSopenharmony_ci
19625bd8deadSopenharmony_ci    The <tessellation evaluation processor> is a programmable unit that
19635bd8deadSopenharmony_ci    evaluates the position and other attributes of a vertex generated by the
19645bd8deadSopenharmony_ci    tessellation primitive generator, using a patch of incoming vertices and
19655bd8deadSopenharmony_ci    their associated data. Compilation units written in the OpenGL ES
19665bd8deadSopenharmony_ci    Shading Language to run on this processor are called tessellation
19675bd8deadSopenharmony_ci    evaluation shaders. When a tessellation evaluation shader is compiled
19685bd8deadSopenharmony_ci    and linked, it results in a tessellation evaluation shader executable
19695bd8deadSopenharmony_ci    that runs on the tessellation evaluation processor.
19705bd8deadSopenharmony_ci
19715bd8deadSopenharmony_ci    Each invocation of the tessellation evaluation executable computes the
19725bd8deadSopenharmony_ci    position and attributes of a single vertex generated by the tessellation
19735bd8deadSopenharmony_ci    primitive generator. The executable can read the attributes of any
19745bd8deadSopenharmony_ci    vertex in the input patch, plus the tessellation coordinate, which is
19755bd8deadSopenharmony_ci    the relative location of the vertex in the primitive being tessellated.
19765bd8deadSopenharmony_ci    The executable writes the position and other attributes of the vertex.
19775bd8deadSopenharmony_ci
19785bd8deadSopenharmony_ci
19795bd8deadSopenharmony_ci    Modifications to Section 3.7 (Keywords)
19805bd8deadSopenharmony_ci
19815bd8deadSopenharmony_ci    Remove "patch" from the list of reserved keywords and add it to the list
19825bd8deadSopenharmony_ci    of keywords.
19835bd8deadSopenharmony_ci
19845bd8deadSopenharmony_ci
19855bd8deadSopenharmony_ci    Modify Section 4.3, Storage Qualifiers
19865bd8deadSopenharmony_ci
19875bd8deadSopenharmony_ci    Add two new qualifiers to the storage qualifier table on p. 38:
19885bd8deadSopenharmony_ci
19895bd8deadSopenharmony_ci    Qualifier   Meaning
19905bd8deadSopenharmony_ci    ---------   -------------------------------------------------------------
19915bd8deadSopenharmony_ci    patch in    linkage of per-patch attributes into a shader from a previous
19925bd8deadSopenharmony_ci                stage (tessellation evaluation shaders only)
19935bd8deadSopenharmony_ci
19945bd8deadSopenharmony_ci    patch out   linkage out of a shader to a subsequent stage (tessellation
19955bd8deadSopenharmony_ci                control shaders only)
19965bd8deadSopenharmony_ci
19975bd8deadSopenharmony_ci
19985bd8deadSopenharmony_ci    Modify section 4.3.4, Input Variables
19995bd8deadSopenharmony_ci
20005bd8deadSopenharmony_ci    Replace the paragraphs starting with "Geometry shader input variables
20015bd8deadSopenharmony_ci    get ..." and ending with "Fragment shader inputs get ..." on p. 40:
20025bd8deadSopenharmony_ci
20035bd8deadSopenharmony_ci    Tessellation control, evaluation, and geometry shader input variables
20045bd8deadSopenharmony_ci    get the per-vertex values written out by output variables of the same
20055bd8deadSopenharmony_ci    names in the previous active (vertex) shader stage. For these inputs,
20065bd8deadSopenharmony_ci    "centroid in", "sample in", and interpolation qualifiers are allowed,
20075bd8deadSopenharmony_ci    but are equivalent to "in". Since these shader stages operate on a set
20085bd8deadSopenharmony_ci    of vertices, each input variable or input block (see section 4.3.9
20095bd8deadSopenharmony_ci    "Interface Blocks") needs to be declared as an array. For example,
20105bd8deadSopenharmony_ci
20115bd8deadSopenharmony_ci       in float foo[];    // geometry shader input for vertex "out float foo"
20125bd8deadSopenharmony_ci
20135bd8deadSopenharmony_ci    Each element of such an array corresponds to one vertex of the primitive
20145bd8deadSopenharmony_ci    being processed. Each array can optionally have a size declared. The
20155bd8deadSopenharmony_ci    array size will be set by (or if provided must be consistent with) the
20165bd8deadSopenharmony_ci    input layout declaration(s) establishing the type of input primitive, as
20175bd8deadSopenharmony_ci    described later in section 4.4.1 "Input Layout Qualifiers".
20185bd8deadSopenharmony_ci
20195bd8deadSopenharmony_ci    Some inputs and outputs are <arrayed>, meaning that for an interface
20205bd8deadSopenharmony_ci    between two shader stages either the input or output declaration
20215bd8deadSopenharmony_ci    requires an extra level of array indexing for the declarations to match.
20225bd8deadSopenharmony_ci    For example, with the interface between a vertex shader and a geometry
20235bd8deadSopenharmony_ci    shader, vertex shader output variables and geometry shader input
20245bd8deadSopenharmony_ci    variables of the same name must match in type and qualification (other
20255bd8deadSopenharmony_ci    than precision and "out" matching to "in"), except that the geometry
20265bd8deadSopenharmony_ci    shader will have one more array dimension than the vertex shader, to
20275bd8deadSopenharmony_ci    allow for vertex indexing. If such an arrayed interface variable is not
20285bd8deadSopenharmony_ci    declared with the necessary additional input or output array dimension,
20295bd8deadSopenharmony_ci    a link-time error will result.
20305bd8deadSopenharmony_ci
20315bd8deadSopenharmony_ci    For non-arrayed interfaces (meaning array dimensionally stays the same
20325bd8deadSopenharmony_ci    between stages), it is a link-time error if the input variable is not
20335bd8deadSopenharmony_ci    declared with the same type, including array dimensionality, and
20345bd8deadSopenharmony_ci    qualification (other than precision and "out" matching to "in") as the
20355bd8deadSopenharmony_ci    matching output variable.
20365bd8deadSopenharmony_ci
20375bd8deadSopenharmony_ci    Additionally, tessellation evaluation shaders support per-patch input
20385bd8deadSopenharmony_ci    variables declared with the "patch in" qualifier. Per-patch input
20395bd8deadSopenharmony_ci    variables are filled with the values of per-patch output variables
20405bd8deadSopenharmony_ci    written by the tessellation control shader. Per-patch inputs may be
20415bd8deadSopenharmony_ci    declared as one-dimensional arrays, but are not indexed by vertex
20425bd8deadSopenharmony_ci    number. Applying the "patch in" qualifier to inputs can only be done in
20435bd8deadSopenharmony_ci    tessellation evaluation shaders. As with other input variables,
20445bd8deadSopenharmony_ci    per-patch inputs must be declared using the same type and qualification
20455bd8deadSopenharmony_ci    (other than precision and "out" matching to "in") as per-patch outputs
20465bd8deadSopenharmony_ci    from the previous (tessellation control) shader stage.
20475bd8deadSopenharmony_ci
20485bd8deadSopenharmony_ci    It is a compile-time error to use the "patch in" qualifier with inputs
20495bd8deadSopenharmony_ci    in any type of shader other than tessellation evaluation.
20505bd8deadSopenharmony_ci
20515bd8deadSopenharmony_ci    Fragment shader inputs get ...
20525bd8deadSopenharmony_ci
20535bd8deadSopenharmony_ci
20545bd8deadSopenharmony_ci    Modify section 4.3.6 "Output Variables" starting with the third
20555bd8deadSopenharmony_ci    paragraph of the section, on p. 42:
20565bd8deadSopenharmony_ci
20575bd8deadSopenharmony_ci    Vertex, tessellation evaluation, and geometry output variables output
20585bd8deadSopenharmony_ci    per-vertex data and are declared using the "out", "centroid out", or
20595bd8deadSopenharmony_ci    "sample out" storage qualifiers. Applying the "patch out" qualifier to
20605bd8deadSopenharmony_ci    an output can only be done in tessellation control shaders. Output
20615bd8deadSopenharmony_ci    variables can only be floating-point scalars, floating-point vectors,
20625bd8deadSopenharmony_ci    matrices, signed or unsigned integers or integer vectors, or arrays or
20635bd8deadSopenharmony_ci    structures of any of these.
20645bd8deadSopenharmony_ci
20655bd8deadSopenharmony_ci    It is a compile-time error to use the "patch out" qualifier with outputs
20665bd8deadSopenharmony_ci    in any other type of shader other than tessellation control.
20675bd8deadSopenharmony_ci
20685bd8deadSopenharmony_ci    Individual vertex, tessellation control, tessellation evaluation, and
20695bd8deadSopenharmony_ci    geometry outputs are declared as in the following examples: ...
20705bd8deadSopenharmony_ci
20715bd8deadSopenharmony_ci
20725bd8deadSopenharmony_ci    Following this modified language and leading into the last paragraph of
20735bd8deadSopenharmony_ci    section 4.3.6 on p. 37 (starting "Fragment outputs output
20745bd8deadSopenharmony_ci    per-fragment"), add:
20755bd8deadSopenharmony_ci
20765bd8deadSopenharmony_ci    Tessellation control shader output variables are used to output
20775bd8deadSopenharmony_ci    per-vertex and per-patch data. Per-vertex output variables are arrayed
20785bd8deadSopenharmony_ci    (see "arrayed" in section 4.3.4, "Inputs") and declared using the "out",
20795bd8deadSopenharmony_ci    "centroid out", or "sample out" qualifiers; the "patch out" qualifier is
20805bd8deadSopenharmony_ci    not allowed. Per-patch output variables must be declared using the
20815bd8deadSopenharmony_ci    "patch out" qualifier. Per-vertex and per-patch output variables can
20825bd8deadSopenharmony_ci    only be floating-point scalars, vectors, or matrices, signed or unsigned
20835bd8deadSopenharmony_ci    integers or integer vectors, or arrays or structures of these. Since
20845bd8deadSopenharmony_ci    tessellation control shaders produce an arrayed primitive comprising
20855bd8deadSopenharmony_ci    multiple vertices, each per-vertex output variable (or output block, see
20865bd8deadSopenharmony_ci    interface blocks below) needs to be declared as an array. For example,
20875bd8deadSopenharmony_ci
20885bd8deadSopenharmony_ci        out float foo[];         // feeds next stage input "in float foo[]"
20895bd8deadSopenharmony_ci
20905bd8deadSopenharmony_ci    Each element of such an array corresponds to one vertex of the primitive
20915bd8deadSopenharmony_ci    being produced. Each array can optionally have a size declared. The
20925bd8deadSopenharmony_ci    array size will be set by (or if provided must be consistent with) the
20935bd8deadSopenharmony_ci    output layout declaration(s) establishing the number of vertices in the
20945bd8deadSopenharmony_ci    output patch, as described later in section 4.4.2.ts "Tessellation
20955bd8deadSopenharmony_ci    Control Outputs".
20965bd8deadSopenharmony_ci
20975bd8deadSopenharmony_ci    Each tessellation control shader invocation has a corresponding output
20985bd8deadSopenharmony_ci    patch vertex, and may assign values to per-vertex outputs only if they
20995bd8deadSopenharmony_ci    belong to that corresponding vertex. If a per-vertex output variable is
21005bd8deadSopenharmony_ci    used as an l-value, it is a compile- or link-time error if the expression
21015bd8deadSopenharmony_ci    indicating the vertex index is not the identifier gl_InvocationID.
21025bd8deadSopenharmony_ci
21035bd8deadSopenharmony_ci    The order of execution of a tessellation control shader invocation
21045bd8deadSopenharmony_ci    relative to the other invocations for the same input patch is undefined
21055bd8deadSopenharmony_ci    unless the built-in function barrier() is used. This provides some
21065bd8deadSopenharmony_ci    control over relative execution order. When a shader invocation calls
21075bd8deadSopenharmony_ci    barrier(), its execution pauses until all other invocations have reached
21085bd8deadSopenharmony_ci    the same point of execution. Output variable assignments performed by
21095bd8deadSopenharmony_ci    any invocation executed prior to calling barrier() will be visible to
21105bd8deadSopenharmony_ci    any other invocation after the call to barrier() returns.
21115bd8deadSopenharmony_ci
21125bd8deadSopenharmony_ci    Because tessellation control shader invocations execute in undefined
21135bd8deadSopenharmony_ci    order between barriers, the values of per-vertex or per-patch output
21145bd8deadSopenharmony_ci    variables will sometimes be undefined. Consider the beginning and end of
21155bd8deadSopenharmony_ci    shader execution and each call to barrier() as synchronization points.
21165bd8deadSopenharmony_ci    The value of an output variable will be undefined in any of the three
21175bd8deadSopenharmony_ci    following cases:
21185bd8deadSopenharmony_ci
21195bd8deadSopenharmony_ci    1. At the beginning of execution.
21205bd8deadSopenharmony_ci
21215bd8deadSopenharmony_ci    2. At each synchronization point, unless
21225bd8deadSopenharmony_ci      * the value was well-defined after the previous synchronization point
21235bd8deadSopenharmony_ci        and was not written by any invocation since, or
21245bd8deadSopenharmony_ci      * the value was written by exactly one shader invocation since the
21255bd8deadSopenharmony_ci        previous synchronization point, or
21265bd8deadSopenharmony_ci      * the value was written by multiple shader invocations since the
21275bd8deadSopenharmony_ci        previous synchronization point, and the last write performed by all
21285bd8deadSopenharmony_ci        such invocations wrote the same value.
21295bd8deadSopenharmony_ci    3. When read by a shader invocation, if
21305bd8deadSopenharmony_ci      * the value was undefined at the previous synchronization point and
21315bd8deadSopenharmony_ci        has not been writen by the same shader invocation since, or
21325bd8deadSopenharmony_ci      * the output variable is written to by any other shader invocation
21335bd8deadSopenharmony_ci        between the previous and next synchronization points, even if that
21345bd8deadSopenharmony_ci        assignment occurs in code following the read.
21355bd8deadSopenharmony_ci
21365bd8deadSopenharmony_ci    Fragment outputs output per-fragment data and are declared ...
21375bd8deadSopenharmony_ci
21385bd8deadSopenharmony_ci
21395bd8deadSopenharmony_ci    Modify section 4.4.1 "Input Layout Qualifiers" to add new subsections
21405bd8deadSopenharmony_ci    4.4.1.ts and 4.4.2.ts, preceding the new subsection 4.4.1.gs "Geometry
21415bd8deadSopenharmony_ci    Shader Inputs":
21425bd8deadSopenharmony_ci
21435bd8deadSopenharmony_ci    Section 4.4.1.ts, Tessellation Evaluation Inputs
21445bd8deadSopenharmony_ci
21455bd8deadSopenharmony_ci    Additional input layout qualifier identifiers allowed for tessellation
21465bd8deadSopenharmony_ci    evaluation shaders are:
21475bd8deadSopenharmony_ci
21485bd8deadSopenharmony_ci      <layout-qualifier-id>
21495bd8deadSopenharmony_ci        triangles
21505bd8deadSopenharmony_ci        quads
21515bd8deadSopenharmony_ci        isolines
21525bd8deadSopenharmony_ci        equal_spacing
21535bd8deadSopenharmony_ci        fractional_even_spacing
21545bd8deadSopenharmony_ci        fractional_odd_spacing
21555bd8deadSopenharmony_ci        cw
21565bd8deadSopenharmony_ci        ccw
21575bd8deadSopenharmony_ci        point_mode
21585bd8deadSopenharmony_ci
21595bd8deadSopenharmony_ci    One group of these identifiers, <primitive mode>, is used to specify a
21605bd8deadSopenharmony_ci    tessellation primitive mode to be used by the tessellation primitive
21615bd8deadSopenharmony_ci    generator. To specify a primitive mode, the identifier must be one of
21625bd8deadSopenharmony_ci    "triangles", "quads", or "isolines", which specify that the tessellation
21635bd8deadSopenharmony_ci    primitive generator should subdivide a triangle into smaller triangles,
21645bd8deadSopenharmony_ci    a quad into triangles, or a quad into a collection of lines,
21655bd8deadSopenharmony_ci    respectively.
21665bd8deadSopenharmony_ci
21675bd8deadSopenharmony_ci    A second group of these identifiers, <vertex spacing>, is used to
21685bd8deadSopenharmony_ci    specify the spacing used by the tessellation primitive generator when
21695bd8deadSopenharmony_ci    subdividing an edge. To specify vertex spacing, the identifier must be
21705bd8deadSopenharmony_ci    one of:
21715bd8deadSopenharmony_ci
21725bd8deadSopenharmony_ci      * "equal_spacing", signifying that edges should be divided into a
21735bd8deadSopenharmony_ci         collection of <N> equal-sized segments;
21745bd8deadSopenharmony_ci
21755bd8deadSopenharmony_ci      * "fractional_even_spacing", signifying that edges should be divided
21765bd8deadSopenharmony_ci        into an even number of equal-length segments plus two additional
21775bd8deadSopenharmony_ci        shorter "fractional" segments; or
21785bd8deadSopenharmony_ci
21795bd8deadSopenharmony_ci      * "fractional_odd_spacing", signifying that edges should be divided
21805bd8deadSopenharmony_ci        into an odd number of equal-length segments plus two additional
21815bd8deadSopenharmony_ci        shorter "fractional" segments.
21825bd8deadSopenharmony_ci
21835bd8deadSopenharmony_ci    A third subset of these identifiers, <ordering>, specifies whether the
21845bd8deadSopenharmony_ci    tessellation primitive generator produces triangles in clockwise or
21855bd8deadSopenharmony_ci    counter-clockwise order, according to the coordinate system depicted in
21865bd8deadSopenharmony_ci    the OpenGL ES Specification. The identifiers "cw" and "ccw" indicate
21875bd8deadSopenharmony_ci    clockwise and counter-clockwise triangles, respectively. If the
21885bd8deadSopenharmony_ci    tessellation primitive generator does not produce triangles, the order
21895bd8deadSopenharmony_ci    is ignored.
21905bd8deadSopenharmony_ci
21915bd8deadSopenharmony_ci    Finally, <point mode> is specified with the identifier "point_mode"
21925bd8deadSopenharmony_ci    indicating that the tessellation primitive generator should produce one
21935bd8deadSopenharmony_ci    point for each distinct vertex in the subdivided primitive, rather than
21945bd8deadSopenharmony_ci    generating lines or triangles.
21955bd8deadSopenharmony_ci
21965bd8deadSopenharmony_ci    Any or all of these identifiers may be specified one or more times in a
21975bd8deadSopenharmony_ci    single input layout declaration.
21985bd8deadSopenharmony_ci
21995bd8deadSopenharmony_ci    The tessellation evaluation shader object in a program must declare a
22005bd8deadSopenharmony_ci    primitive mode in its input layout. Declaring vertex spacing, ordering,
22015bd8deadSopenharmony_ci    or point mode identifiers is optional. If spacing or vertex order
22025bd8deadSopenharmony_ci    declarations are omitted, the tessellation primitive generator will use
22035bd8deadSopenharmony_ci    equal spacing or counter-clockwise vertex ordering, respectively. If a
22045bd8deadSopenharmony_ci    point mode declaration is omitted, the tessellation primitive generator
22055bd8deadSopenharmony_ci    will produce lines or triangles according to the primitive mode.
22065bd8deadSopenharmony_ci
22075bd8deadSopenharmony_ci
22085bd8deadSopenharmony_ci    Section 4.4.2.ts, Tessellation Control Outputs
22095bd8deadSopenharmony_ci
22105bd8deadSopenharmony_ci    Other than for the transform feedback layout qualifiers, tessellation
22115bd8deadSopenharmony_ci    control shaders allow output layout qualifiers only on the interface
22125bd8deadSopenharmony_ci    qualifier "out", not on an output block, block member, or variable
22135bd8deadSopenharmony_ci    declaration. The output layout qualifier identifiers allowed for
22145bd8deadSopenharmony_ci    tessellation control shaders are:
22155bd8deadSopenharmony_ci
22165bd8deadSopenharmony_ci      layout-qualifier-id
22175bd8deadSopenharmony_ci        vertices = integer-constant
22185bd8deadSopenharmony_ci
22195bd8deadSopenharmony_ci    The identifier "vertices" specifies the number of vertices in the output
22205bd8deadSopenharmony_ci    patch produced by the tessellation control shader, which also specifies
22215bd8deadSopenharmony_ci    the number of times the tessellation control shader is invoked. It is a
22225bd8deadSopenharmony_ci    compile- or link-time error for the output vertex count to be less than
22235bd8deadSopenharmony_ci    or equal to zero, or greater than the implementation-dependent maximum
22245bd8deadSopenharmony_ci    patch size.
22255bd8deadSopenharmony_ci
22265bd8deadSopenharmony_ci    The intrinsically declared tessellation control output array gl_out[]
22275bd8deadSopenharmony_ci    will also be sized by any output layout declaration. Hence, the
22285bd8deadSopenharmony_ci    expression
22295bd8deadSopenharmony_ci
22305bd8deadSopenharmony_ci      gl_out.length()
22315bd8deadSopenharmony_ci
22325bd8deadSopenharmony_ci    will return the output patch vertex count specified in a previous output
22335bd8deadSopenharmony_ci    layout qualifier. For outputs declared without an array size, including
22345bd8deadSopenharmony_ci    intrinsically declared outputs (i.e., gl_out), a layout must be declared
22355bd8deadSopenharmony_ci    before any use of the method length() or other array use that requires
22365bd8deadSopenharmony_ci    its size to be known.
22375bd8deadSopenharmony_ci
22385bd8deadSopenharmony_ci    It is a compile-time error if the output patch vertex count specified in
22395bd8deadSopenharmony_ci    an output layout qualifier does not match the array size specified in
22405bd8deadSopenharmony_ci    any output variable declaration in the same shader.
22415bd8deadSopenharmony_ci
22425bd8deadSopenharmony_ci    All tessellation control shader layout declarations in a program must
22435bd8deadSopenharmony_ci    specify the same output patch vertex count. There must be at least one
22445bd8deadSopenharmony_ci    layout qualifier specifying an output patch vertex count in any program
22455bd8deadSopenharmony_ci    containing a tessellation control shader.
22465bd8deadSopenharmony_ci
22475bd8deadSopenharmony_ci
22485bd8deadSopenharmony_ci    Modify section 7 to add new subsections 7.1ts1 and 7.1ts2 following
22495bd8deadSopenharmony_ci    section 7.1.1 "Vertex Shader Special Variables":
22505bd8deadSopenharmony_ci
22515bd8deadSopenharmony_ci    Section 7.1ts1, Tessellation Control Special Variables
22525bd8deadSopenharmony_ci
22535bd8deadSopenharmony_ci    In the tessellation control language, built-in variables are
22545bd8deadSopenharmony_ci    intrinsically declared as:
22555bd8deadSopenharmony_ci
22565bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported and enabled: ]]
22575bd8deadSopenharmony_ci      in gl_PerVertex {
22585bd8deadSopenharmony_ci          highp vec4 gl_Position;
22595bd8deadSopenharmony_ci          hihgp float gl_PointSize;
22605bd8deadSopenharmony_ci      } gl_in[gl_MaxPatchVertices];
22615bd8deadSopenharmony_ci
22625bd8deadSopenharmony_ci        [[ Otherwise: ]]
22635bd8deadSopenharmony_ci      in gl_PerVertex {
22645bd8deadSopenharmony_ci          highp vec4 gl_Position;
22655bd8deadSopenharmony_ci      } gl_in[gl_MaxPatchVertices];
22665bd8deadSopenharmony_ci
22675bd8deadSopenharmony_ci      in highp int gl_PatchVerticesIn;
22685bd8deadSopenharmony_ci      in highp int gl_PrimitiveID;
22695bd8deadSopenharmony_ci      in highp int gl_InvocationID;
22705bd8deadSopenharmony_ci
22715bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported and enabled: ]]
22725bd8deadSopenharmony_ci      out gl_PerVertex {
22735bd8deadSopenharmony_ci          highp vec4 gl_Position;
22745bd8deadSopenharmony_ci          highp float gl_PointSize;
22755bd8deadSopenharmony_ci      } gl_out[];
22765bd8deadSopenharmony_ci
22775bd8deadSopenharmony_ci        [[ Otherwise: ]]
22785bd8deadSopenharmony_ci      out gl_PerVertex {
22795bd8deadSopenharmony_ci          highp vec4 gl_Position;
22805bd8deadSopenharmony_ci      } gl_out[];
22815bd8deadSopenharmony_ci
22825bd8deadSopenharmony_ci      patch out highp float gl_TessLevelOuter[4];
22835bd8deadSopenharmony_ci      patch out highp float gl_TessLevelInner[2];
22845bd8deadSopenharmony_ci
22855bd8deadSopenharmony_ci
22865bd8deadSopenharmony_ci    Section 7.1ts1.1, Tessellation Control Input Variables
22875bd8deadSopenharmony_ci
22885bd8deadSopenharmony_ci    gl_Position contains the output written in the previous shader stage to
22895bd8deadSopenharmony_ci    gl_Position.
22905bd8deadSopenharmony_ci
22915bd8deadSopenharmony_ci      [[ If OES_tessellation_point_size is supported: ]]
22925bd8deadSopenharmony_ci    gl_PointSize contains the output written in the previous shader stage to
22935bd8deadSopenharmony_ci    gl_PointSize.
22945bd8deadSopenharmony_ci
22955bd8deadSopenharmony_ci    gl_PatchVerticesIn contains the number of vertices in the input patch
22965bd8deadSopenharmony_ci    being processed by the shader. A single shader can read patches of
22975bd8deadSopenharmony_ci    differing sizes, so the value of gl_PatchVerticesIn may differ between
22985bd8deadSopenharmony_ci    patches.
22995bd8deadSopenharmony_ci
23005bd8deadSopenharmony_ci    gl_PrimitiveID contains the number of primitives processed by the
23015bd8deadSopenharmony_ci    shader since the current set of rendering primitives was started.
23025bd8deadSopenharmony_ci
23035bd8deadSopenharmony_ci    gl_InvocationID contains the number of the output patch vertex assigned
23045bd8deadSopenharmony_ci    to the tessellation control shader invocation. It is assigned integer
23055bd8deadSopenharmony_ci    values in the range [0, N-1], where N is the number of output patch
23065bd8deadSopenharmony_ci    vertices per primitive.
23075bd8deadSopenharmony_ci
23085bd8deadSopenharmony_ci
23095bd8deadSopenharmony_ci    Section 7.1ts1.2, Tessellation Control Output Variables
23105bd8deadSopenharmony_ci
23115bd8deadSopenharmony_ci    gl_Position is used in the same fashion as the
23125bd8deadSopenharmony_ci    corresponding output variable in the vertex shader.
23135bd8deadSopenharmony_ci
23145bd8deadSopenharmony_ci      [[ If OES_tessellation_point_size is supported: ]]
23155bd8deadSopenharmony_ci    gl_PointSize is used in the same fashion as the corresponding output
23165bd8deadSopenharmony_ci    variable in the vertex shader.
23175bd8deadSopenharmony_ci
23185bd8deadSopenharmony_ci    The values written to gl_TessLevelOuter and gl_TessLevelInner are
23195bd8deadSopenharmony_ci    assigned to the corresponding outer and inner tessellation levels of the
23205bd8deadSopenharmony_ci    output patch. They are used by the tessellation primitive generator to
23215bd8deadSopenharmony_ci    control primitive tessellation, and may be read by tessellation
23225bd8deadSopenharmony_ci    evaluation shaders.
23235bd8deadSopenharmony_ci
23245bd8deadSopenharmony_ci
23255bd8deadSopenharmony_ci    Section 7.1ts2, Tessellation Evaluation Special Variables
23265bd8deadSopenharmony_ci
23275bd8deadSopenharmony_ci    In the tessellation evaluation language, built-in variables are
23285bd8deadSopenharmony_ci    intrinsically declared as:
23295bd8deadSopenharmony_ci
23305bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported and enabled: ]]
23315bd8deadSopenharmony_ci      in gl_PerVertex {
23325bd8deadSopenharmony_ci          highp vec4 gl_Position;
23335bd8deadSopenharmony_ci          highp float gl_PointSize;
23345bd8deadSopenharmony_ci      } gl_in[gl_MaxPatchVertices];
23355bd8deadSopenharmony_ci
23365bd8deadSopenharmony_ci        [[ Otherwise: ]]
23375bd8deadSopenharmony_ci      in gl_PerVertex {
23385bd8deadSopenharmony_ci          highp vec4 gl_Position;
23395bd8deadSopenharmony_ci      } gl_in[gl_MaxPatchVertices];
23405bd8deadSopenharmony_ci
23415bd8deadSopenharmony_ci      in highp int gl_PatchVerticesIn;
23425bd8deadSopenharmony_ci      in highp int gl_PrimitiveID;
23435bd8deadSopenharmony_ci      in highp vec3 gl_TessCoord;
23445bd8deadSopenharmony_ci      patch in highp float gl_TessLevelOuter[4];
23455bd8deadSopenharmony_ci      patch in highp float gl_TessLevelInner[2];
23465bd8deadSopenharmony_ci
23475bd8deadSopenharmony_ci        [[ If OES_tessellation_point_size is supported and enabled: ]]
23485bd8deadSopenharmony_ci      out gl_PerVertex {
23495bd8deadSopenharmony_ci          highp vec4 gl_Position;
23505bd8deadSopenharmony_ci          hihgp float gl_PointSize;
23515bd8deadSopenharmony_ci      };
23525bd8deadSopenharmony_ci
23535bd8deadSopenharmony_ci        [[ Otherwise: ]]
23545bd8deadSopenharmony_ci      out gl_PerVertex {
23555bd8deadSopenharmony_ci          highp vec4 gl_Position;
23565bd8deadSopenharmony_ci      };
23575bd8deadSopenharmony_ci
23585bd8deadSopenharmony_ci    Section 7.1ts2.1, Tessellation Evaluation Input Variables
23595bd8deadSopenharmony_ci
23605bd8deadSopenharmony_ci    gl_Position contains the output written in the previous shader stage to
23615bd8deadSopenharmony_ci    gl_Position.
23625bd8deadSopenharmony_ci
23635bd8deadSopenharmony_ci      [[ If OES_tessellation_point_size is supported: ]]
23645bd8deadSopenharmony_ci    gl_PointSize contains the output written in the previous shader stage to
23655bd8deadSopenharmony_ci    gl_PointSize.
23665bd8deadSopenharmony_ci
23675bd8deadSopenharmony_ci    gl_PatchVerticesIn and gl_PrimitiveID are defined in the same fashion as
23685bd8deadSopenharmony_ci    the corresponding input variables in the tessellation control shader.
23695bd8deadSopenharmony_ci
23705bd8deadSopenharmony_ci    gl_TessCoord specifies a three-component (u,v,w) vector identifying the
23715bd8deadSopenharmony_ci    position of the vertex being processed by the shader relative to the
23725bd8deadSopenharmony_ci    primitive being tessellated. Its values will obey the properties
23735bd8deadSopenharmony_ci
23745bd8deadSopenharmony_ci      gl_TessCoord.x == 1.0 - (1.0 - gl_TessCoord.x) // two operations performed
23755bd8deadSopenharmony_ci      gl_TessCoord.y == 1.0 - (1.0 - gl_TessCoord.y) // two operations performed
23765bd8deadSopenharmony_ci      gl_TessCoord.z == 1.0 - (1.0 - gl_TessCoord.z) // two operations performed
23775bd8deadSopenharmony_ci
23785bd8deadSopenharmony_ci    gl_TessLevelOuter and gl_TessLevelInner are filled with the corresponding
23795bd8deadSopenharmony_ci    output variables written by the active tessellation control shader.
23805bd8deadSopenharmony_ci
23815bd8deadSopenharmony_ci
23825bd8deadSopenharmony_ci    Section 7.1ts2.2, Tessellation Evaluation Output Variables
23835bd8deadSopenharmony_ci
23845bd8deadSopenharmony_ci    gl_Position is used in the same fashion as the
23855bd8deadSopenharmony_ci    corresponding output variable in the vertex shader.
23865bd8deadSopenharmony_ci
23875bd8deadSopenharmony_ci      [[ If OES_tessellation_point_size is supported: ]]
23885bd8deadSopenharmony_ci    gl_PointSize is used in the same fashion as the corresponding output
23895bd8deadSopenharmony_ci    variable in the vertex shader.
23905bd8deadSopenharmony_ci
23915bd8deadSopenharmony_ci
23925bd8deadSopenharmony_ci    Add to Section 7.2 "Built-In Constants", matching the
23935bd8deadSopenharmony_ci    corresponding API implementation-dependent limits:
23945bd8deadSopenharmony_ci
23955bd8deadSopenharmony_ci      const mediump int gl_MaxTessControlInputComponents = 64;
23965bd8deadSopenharmony_ci      const mediump int gl_MaxTessControlOutputComponents = 64;
23975bd8deadSopenharmony_ci      const mediump int gl_MaxTessControlTextureImageUnits = 16;
23985bd8deadSopenharmony_ci      const mediump int gl_MaxTessControlUniformComponents = 1024;
23995bd8deadSopenharmony_ci      const mediump int gl_MaxTessControlTotalOutputComponents = 2048;
24005bd8deadSopenharmony_ci
24015bd8deadSopenharmony_ci      const mediump int gl_MaxTessEvaluationInputComponents = 64;
24025bd8deadSopenharmony_ci      const mediump int gl_MaxTessEvaluationOutputComponents = 64;
24035bd8deadSopenharmony_ci      const mediump int gl_MaxTessEvaluationTextureImageUnits = 16;
24045bd8deadSopenharmony_ci      const mediump int gl_MaxTessEvaluationUniformComponents = 1024;
24055bd8deadSopenharmony_ci
24065bd8deadSopenharmony_ci      const mediump int gl_MaxTessPatchComponents = 120;
24075bd8deadSopenharmony_ci
24085bd8deadSopenharmony_ci      const mediump int gl_MaxPatchVertices = 32;
24095bd8deadSopenharmony_ci      const mediump int gl_MaxTessGenLevel = 64;
24105bd8deadSopenharmony_ci
24115bd8deadSopenharmony_ci    Modify gl_MaxCombinedTextureImageUnits to match the API:
24125bd8deadSopenharmony_ci
24135bd8deadSopenharmony_ci      const mediump int gl_MaxCombinedTextureImageUnits = 96;
24145bd8deadSopenharmony_ci
24155bd8deadSopenharmony_ci
24165bd8deadSopenharmony_ci    Modify section 8.15 "Shader Invocation Control Functions":
24175bd8deadSopenharmony_ci
24185bd8deadSopenharmony_ci    The shader invocation control function is only available in tessellation
24195bd8deadSopenharmony_ci    control and compute shaders. It is used to control the relative
24205bd8deadSopenharmony_ci    execution order of multiple shader invocations used to process a patch
24215bd8deadSopenharmony_ci    (in the case of tessellation control shaders) or a workgroup (in
24225bd8deadSopenharmony_ci    the case of compute shaders), which are otherwise executed with an
24235bd8deadSopenharmony_ci    undefined order.
24245bd8deadSopenharmony_ci
24255bd8deadSopenharmony_ci    +------------------+---------------------------------------------------------------+
24265bd8deadSopenharmony_ci    | Syntax           | Description                                                   |
24275bd8deadSopenharmony_ci    +------------------+---------------------------------------------------------------+
24285bd8deadSopenharmony_ci    | void             | For any given static instance of barrier(), all               |
24295bd8deadSopenharmony_ci    | barrier(void)    | tessellation control shader invocations for a single input    |
24305bd8deadSopenharmony_ci    |                  | patch, or all compute shader invocations for a single work    |
24315bd8deadSopenharmony_ci    |                  | group must enter it before any will continue beyond it.       |
24325bd8deadSopenharmony_ci    +------------------+---------------------------------------------------------------+
24335bd8deadSopenharmony_ci
24345bd8deadSopenharmony_ci    The function barrier() provides a partially defined order of execution
24355bd8deadSopenharmony_ci    between shader invocations. This ensures that values written by one
24365bd8deadSopenharmony_ci    invocation prior to a given static instance of barrier() can be safely
24375bd8deadSopenharmony_ci    read by other invocations after their call to the same static instance
24385bd8deadSopenharmony_ci    barrier(). Because invocations may execute in an undefined order between
24395bd8deadSopenharmony_ci    these barrier calls, the values of a per-vertex or per-patch output
24405bd8deadSopenharmony_ci    variable for tessellation control shaders, or the values of shared
24415bd8deadSopenharmony_ci    variables for compute shaders will be undefined in a number of cases
24425bd8deadSopenharmony_ci    enumerated in section 4.3.6 "Output Variables" (for tessellation control
24435bd8deadSopenharmony_ci    shaders) and section 4.3.7 "Shared Variables" (for compute shaders).
24445bd8deadSopenharmony_ci
24455bd8deadSopenharmony_ci    For tessellation control shaders, the barrier() function may only be
24465bd8deadSopenharmony_ci    placed inside the function main() of the shader and may not be called
24475bd8deadSopenharmony_ci    within any control flow. Barriers are also disallowed after a return
24485bd8deadSopenharmony_ci    statement in the function main(). Any such misplaced barriers result in
24495bd8deadSopenharmony_ci    a compile-time error.
24505bd8deadSopenharmony_ci
24515bd8deadSopenharmony_ci    For compute shaders, the barrier() function ...
24525bd8deadSopenharmony_ci
24535bd8deadSopenharmony_ci
24545bd8deadSopenharmony_ciIssues
24555bd8deadSopenharmony_ci
24565bd8deadSopenharmony_ci    Note: These issues apply specifically to the definition of the
24575bd8deadSopenharmony_ci    OES_tessellation_shader specification, which is based on the OpenGL
24585bd8deadSopenharmony_ci    extension ARB_tessellation_shader as updated in OpenGL 4.x. Resolved
24595bd8deadSopenharmony_ci    issues from ARB_tessellation_shader have been removed, but remain
24605bd8deadSopenharmony_ci    largely applicable to this extension. ARB_tessellation_shader can be
24615bd8deadSopenharmony_ci    found in the OpenGL Registry.
24625bd8deadSopenharmony_ci
24635bd8deadSopenharmony_ci    (1) What functionality was removed from ARB_tessellation_shader?
24645bd8deadSopenharmony_ci
24655bd8deadSopenharmony_ci        Very little. Tessellation shaders are largely self-contained
24665bd8deadSopenharmony_ci        functionality and the only removed interactions with features not
24675bd8deadSopenharmony_ci        supported by the underlying OpenGL ES 3.1 API and Shading Language
24685bd8deadSopenharmony_ci        were:
24695bd8deadSopenharmony_ci          * Fixed-function inputs and outputs present only in the GL
24705bd8deadSopenharmony_ci            compatibility profile.
24715bd8deadSopenharmony_ci          * gl_ClipDistance shader inputs and outputs.
24725bd8deadSopenharmony_ci          * While multi-dimensional arrays are supported by GLSL-ES 3.10,
24735bd8deadSopenharmony_ci            they are explicitly not supported
24745bd8deadSopenharmony_ci            as shader inputs and outputs, and that decision is respected
24755bd8deadSopenharmony_ci            here.
24765bd8deadSopenharmony_ci          * Using a tessellation evaluation shader without a tessellation
24775bd8deadSopenharmony_ci            control shader is not allowed. See issue 13.
24785bd8deadSopenharmony_ci          * PATCH_DEFAULT_*_LEVEL parameters (issue 13).
24795bd8deadSopenharmony_ci
24805bd8deadSopenharmony_ci    (2) What functionality was changed and added relative to
24815bd8deadSopenharmony_ci        ARB_tessellation_shader?
24825bd8deadSopenharmony_ci
24835bd8deadSopenharmony_ci      - OES_tessellation_shader closely matches OpenGL 4.4 tessellation
24845bd8deadSopenharmony_ci        shader language, rather than ARB_tessellation_shader language.
24855bd8deadSopenharmony_ci      - Spec language is now based off of changes introduced by
24865bd8deadSopenharmony_ci        OES_geometry_shader, especially with regard to input and output
24875bd8deadSopenharmony_ci        blocks.
24885bd8deadSopenharmony_ci      - Note that although this spec mentions quad primitives repeatedly,
24895bd8deadSopenharmony_ci        this is not inconsistent with the lack of support for QUADS drawing
24905bd8deadSopenharmony_ci        primitives in OpenGL ES. The quad primitives discussed here occur
24915bd8deadSopenharmony_ci        only during patch tessellation and are emitted as triangles to later
24925bd8deadSopenharmony_ci        stages of the pipeline.
24935bd8deadSopenharmony_ci      - Writing point size from tessellation shaders is optional functionality.
24945bd8deadSopenharmony_ci        If it's not supported or written, the point size of 1.0 is used.
24955bd8deadSopenharmony_ci      - Added precision qualifiers to builtins.
24965bd8deadSopenharmony_ci      - ARB_tessellation_shader required that the tessellation primitive
24975bd8deadSopenharmony_ci        generator reject a patch when any outer tessellation level contained a
24985bd8deadSopenharmony_ci        NaN, even if the outer tessellation level is irrelevant for the
24995bd8deadSopenharmony_ci        primitive type. As that was likely unintended (see Khronos bug 11484),
25005bd8deadSopenharmony_ci        OES_tessellation_shader only rejects patches if relevant outer
25015bd8deadSopenharmony_ci        tessellation levels contain NaN.
25025bd8deadSopenharmony_ci      - Added program interface query properties relevant to tessellation
25035bd8deadSopenharmony_ci        shaders.
25045bd8deadSopenharmony_ci
25055bd8deadSopenharmony_ci    (3) Are any grammar additions required in chapter 9?
25065bd8deadSopenharmony_ci
25075bd8deadSopenharmony_ci    Probably, but such changes are not included in the original
25085bd8deadSopenharmony_ci    ARB_tessellation_shader extension, either. TBD.
25095bd8deadSopenharmony_ci
25105bd8deadSopenharmony_ci    (4) Should GetActiveUniformBlockiv
25115bd8deadSopenharmony_ci        support queries for uniform blocks and atomic counter buffers
25125bd8deadSopenharmony_ci        referenced by tessellation shaders?
25135bd8deadSopenharmony_ci
25145bd8deadSopenharmony_ci    RESOLVED: No. Use the new generic query interface supported by
25155bd8deadSopenharmony_ci    OpenGL ES 3.1, following the resolution for other features such as
25165bd8deadSopenharmony_ci    compute shaders, which also dropped these legacy tokens / queries.
25175bd8deadSopenharmony_ci
25185bd8deadSopenharmony_ci    (5) How are aggregate shader limits computed?
25195bd8deadSopenharmony_ci
25205bd8deadSopenharmony_ci    RESOLVED: Following the GL 4.4 model, but we restrict uniform
25215bd8deadSopenharmony_ci    buffer bindings to 12/stage instead of 14, this results in
25225bd8deadSopenharmony_ci
25235bd8deadSopenharmony_ci        MAX_UNIFORM_BUFFER_BINDINGS = 72
25245bd8deadSopenharmony_ci            This is 12 bindings/stage * 6 shader stages, allowing a static
25255bd8deadSopenharmony_ci            partitioning of the bindings even though at most 5 stages can
25265bd8deadSopenharmony_ci            appear in a program object).
25275bd8deadSopenharmony_ci        MAX_COMBINED_UNIFORM_BLOCKS = 60
25285bd8deadSopenharmony_ci            This is 12 blocks/stage * 5 stages, since compute shaders can't
25295bd8deadSopenharmony_ci            be mixed with other stages.
25305bd8deadSopenharmony_ci        MAX_COMBINED_TEXTURE_IMAGE_UNITS = 96
25315bd8deadSopenharmony_ci            This is 16 textures/stage * 6 stages.
25325bd8deadSopenharmony_ci
25335bd8deadSopenharmony_ci    Khronos internal bugs 5870, 8891, and 9424 cover the ARB's thinking on
25345bd8deadSopenharmony_ci    these limits for GL 4.0 and beyond.
25355bd8deadSopenharmony_ci
25365bd8deadSopenharmony_ci    (6) Are arrays supported as shader inputs and outputs?
25375bd8deadSopenharmony_ci
25385bd8deadSopenharmony_ci    RESOLVED: No. In several places in the tessellation and geometry API
25395bd8deadSopenharmony_ci    language based on GL 4.4, it says that "the OpenGL ES Shading Language
25405bd8deadSopenharmony_ci    doesn't support multi-dimensional arrays" and restricts declarations of
25415bd8deadSopenharmony_ci    inputs and outputs which are array members to blocks themselves declared
25425bd8deadSopenharmony_ci    as arrays.
25435bd8deadSopenharmony_ci
25445bd8deadSopenharmony_ci    Strictly speaking this is no longer true. GLSL-ES 3.10 supports
25455bd8deadSopenharmony_ci    multi-dimensional arrays, but also notes in issue 0 that "arrays of
25465bd8deadSopenharmony_ci    arrays are not allowed as shader inputs or outputs."
25475bd8deadSopenharmony_ci
25485bd8deadSopenharmony_ci    Given this constraint, and since the same constraint is in OpenGL 4.4, I
25495bd8deadSopenharmony_ci    propose we resolve this by continuing to limit array inputs and outputs
25505bd8deadSopenharmony_ci    in this fashion, and change the language to "...doesn't support
25515bd8deadSopenharmony_ci    multi-dimensional arrays as shader inputs or outputs".
25525bd8deadSopenharmony_ci
25535bd8deadSopenharmony_ci    (7) What component counting rules are used for inputs and outputs?
25545bd8deadSopenharmony_ci
25555bd8deadSopenharmony_ci    RESOLVED: In several places I've inserted language from OpenGL 4.4 to
25565bd8deadSopenharmony_ci    the effect of
25575bd8deadSopenharmony_ci
25585bd8deadSopenharmony_ci       "Component counting rules for different variable types and variable
25595bd8deadSopenharmony_ci        declarations are the same as for MAX_VERTEX_OUTPUT_COMPONENTS (see
25605bd8deadSopenharmony_ci        section 11.1.2.1)."
25615bd8deadSopenharmony_ci
25625bd8deadSopenharmony_ci    I think this is essentially cleaning up an oversight in the earlier ARB
25635bd8deadSopenharmony_ci    extension language but it is a bit orthogonal to the extension
25645bd8deadSopenharmony_ci    functionality and I'm bringing it up in case this is a potential issue.
25655bd8deadSopenharmony_ci
25665bd8deadSopenharmony_ci    (8) What component counting rules are used for the default
25675bd8deadSopenharmony_ci    uniform block?
25685bd8deadSopenharmony_ci
25695bd8deadSopenharmony_ci    RESOLVED: In several places I've inserted language from OpenGL 4.2 to
25705bd8deadSopenharmony_ci    the effect of
25715bd8deadSopenharmony_ci
25725bd8deadSopenharmony_ci       "A uniform matrix in the default uniform block with single-precision
25735bd8deadSopenharmony_ci        components will consume no more than 4 x min(r,c) uniform
25745bd8deadSopenharmony_ci        components."
25755bd8deadSopenharmony_ci
25765bd8deadSopenharmony_ci    This is based on bug 5432 and is language that was later expanded in
25775bd8deadSopenharmony_ci    OpenGL 4.4 and refactored into the generic "Uniform Variables" section,
25785bd8deadSopenharmony_ci    which is something we should consider in the OES extensions as well to
25795bd8deadSopenharmony_ci    avoid duplication. I believe it is what we want but am noting it for the
25805bd8deadSopenharmony_ci    same reason as the language in issue (8). I'm hoping to be able to
25815bd8deadSopenharmony_ci    include this refactored language into the OpenGL ES 3.1 Specification,
25825bd8deadSopenharmony_ci    so we can refer to it more easily here. Tracking bug 11192 has been
25835bd8deadSopenharmony_ci    opened for this and this language was approved there.
25845bd8deadSopenharmony_ci
25855bd8deadSopenharmony_ci    (9) The edits on section 4.4.1.ts (Tessellation Evaluation Inputs)
25865bd8deadSopenharmony_ci    says that "Any or all of these identifiers may be specified one or more
25875bd8deadSopenharmony_ci    times in a single input layout declaration." Do we need to add in the
25885bd8deadSopenharmony_ci    language from GLSL 4.40 Section 4.4 "Layout Qualifiers" that defines this?
25895bd8deadSopenharmony_ci
25905bd8deadSopenharmony_ci    RESOLVED: ES 3.1 will be picking up the relaxed qualifier ordering
25915bd8deadSopenharmony_ci    and it is presumed that this language will be coming along with it.
25925bd8deadSopenharmony_ci    In any case, the OES_shader_io_blocks extension clarifies this.
25935bd8deadSopenharmony_ci
25945bd8deadSopenharmony_ci    (10) Due to HW limitations, some vendors may not be able
25955bd8deadSopenharmony_ci    to support writing gl_PointSize from tessellation shaders, how should we
25965bd8deadSopenharmony_ci    accomodate this?
25975bd8deadSopenharmony_ci
25985bd8deadSopenharmony_ci    RESOLVED: There are two extensions described in this document. The
25995bd8deadSopenharmony_ci    base extension does not support writing to gl_PointSize from tessellation
26005bd8deadSopenharmony_ci    shaders and the gl_PerVertex block does not include gl_PointSize.
26015bd8deadSopenharmony_ci    Additionally there is a layered extension which provides the ability
26025bd8deadSopenharmony_ci    to write to gl_PointSize from tessellation shaders.  When this extension
26035bd8deadSopenharmony_ci    is enabled, the gl_PerVertex block does include gl_PointSize and it
26045bd8deadSopenharmony_ci    can be written from a tessellation control or evaluation shader as normal.
26055bd8deadSopenharmony_ci
26065bd8deadSopenharmony_ci    If the point-size extension is not supported, all points written
26075bd8deadSopenharmony_ci    from a tessellation shader will have size of one. If the point-size
26085bd8deadSopenharmony_ci    extension is supported but not enabled, or if it's enabled but
26095bd8deadSopenharmony_ci    gl_PointSize is not written, it as if a point size of one was written.
26105bd8deadSopenharmony_ci    Otherwise, if you statically assign gl_PointSize in the last stage
26115bd8deadSopenharmony_ci    before the rasterizer, the (potentially clamped) value written will
26125bd8deadSopenharmony_ci    determine the size of the point for rasterization.
26135bd8deadSopenharmony_ci
26145bd8deadSopenharmony_ci    (11) Do we need a separate point_size extension from the one included
26155bd8deadSopenharmony_ci    in OES_geometry_shader or can we use the some one?
26165bd8deadSopenharmony_ci
26175bd8deadSopenharmony_ci    RESOLVED. We will use a separate extension to allow for maximum
26185bd8deadSopenharmony_ci    implementation flexibility.
26195bd8deadSopenharmony_ci
26205bd8deadSopenharmony_ci    (12) Can a tessellation evaluation shader be used without a tessellation
26215bd8deadSopenharmony_ci    control shader?
26225bd8deadSopenharmony_ci
26235bd8deadSopenharmony_ci    RESULT: No. This isn't allowed in other graphics APIs, and some vendors
26245bd8deadSopenharmony_ci    designed hardware based on those APIs. Attempts to draw with only one of the
26255bd8deadSopenharmony_ci    two tessellation shaders active results in an INVALID_OPERATION error.
26265bd8deadSopenharmony_ci    Vendors that designed hardware for ARB_tessellation_shader or versions of
26275bd8deadSopenharmony_ci    OpenGL that included it may choose to relax this restriction via extension.
26285bd8deadSopenharmony_ci    One implication of this is that the default tessellation levels are useless,
26295bd8deadSopenharmony_ci    since an active tessellation control shader always overrides them, so they
26305bd8deadSopenharmony_ci    are not included in this spec.
26315bd8deadSopenharmony_ci
26325bd8deadSopenharmony_ci    (13) What happens if you use "patch out" in a tessellation evaluation
26335bd8deadSopenharmony_ci    shader or "patch in" in a tessellation control shader?
26345bd8deadSopenharmony_ci
26355bd8deadSopenharmony_ci    RESOLVED.  GLSL 4.40 spec only says "Applying the patch qualifier to
26365bd8deadSopenharmony_ci    inputs can only be done in tessellation evaluation shaders." and
26375bd8deadSopenharmony_ci    "Applying patch to an output can only be done in a tessellation control
26385bd8deadSopenharmony_ci    shader."  There is also a statement that says "It is a compile-time error
26395bd8deadSopenharmony_ci    to use patch in a fragment shader."  In Bug 11527 the ARB decided this
26405bd8deadSopenharmony_ci    should be a compile-time error as this can be determined by solely by
26415bd8deadSopenharmony_ci    looking at variable declaration.
26425bd8deadSopenharmony_ci
26435bd8deadSopenharmony_ci    (14) Do we need to make accommodations for tile-based implementations?
26445bd8deadSopenharmony_ci
26455bd8deadSopenharmony_ci    RESOLVED.  Yes, but it will be done as a separate extension as it is
26465bd8deadSopenharmony_ci    applicable to more than just tessellation shaders.
26475bd8deadSopenharmony_ci
26485bd8deadSopenharmony_ci    (15) Can inputs and outputs from tessellation shaders be arrays of
26495bd8deadSopenharmony_ci    structures?
26505bd8deadSopenharmony_ci
26515bd8deadSopenharmony_ci    RESOLVED. Yes they can.  OpenGL ES 3.1 disallows passing arrays of
26525bd8deadSopenharmony_ci    structures between stages. However, since vertex shader outputs
26535bd8deadSopenharmony_ci    can be structures we need to add the extra level of
26545bd8deadSopenharmony_ci    array-ness when these are accessed from a tessellation control shader.
26555bd8deadSopenharmony_ci    Similarly this applies to outputs from a tessellation control shader
26565bd8deadSopenharmony_ci    and inputs to a tessellation evaluation shader. However as in GL,
26575bd8deadSopenharmony_ci    arrays of arrays are not supported.
26585bd8deadSopenharmony_ci
26595bd8deadSopenharmony_ci    (16) Tessellation using "point_mode" is supposed to emit each distinct
26605bd8deadSopenharmony_ci    vertex produced by the tessellation primitive generator exactly once.
26615bd8deadSopenharmony_ci    Are there cases where this can produce multiple vertices with the same
26625bd8deadSopenharmony_ci    position?
26635bd8deadSopenharmony_ci
26645bd8deadSopenharmony_ci    RESOLVED:  Yes.  If fractional odd spacing is used, we have outer
26655bd8deadSopenharmony_ci    tessellation levels that are greater than 1.0, and inner tessellation
26665bd8deadSopenharmony_ci    levels less than or equal to 1.0, this can occur.  If any outer level is
26675bd8deadSopenharmony_ci    greater than 1.0, we will subdivide the outer edges of the patch, and
26685bd8deadSopenharmony_ci    will need a subdivided patch interior to connect to.  We handle this by
26695bd8deadSopenharmony_ci    treating inner levels less than or equal to 1.0 as though they were
26705bd8deadSopenharmony_ci    slightly greater than 1.0 ("1+epsilon").
26715bd8deadSopenharmony_ci
26725bd8deadSopenharmony_ci    With fractional odd spacing, inner levels between 1.0 and 3.0 will
26735bd8deadSopenharmony_ci    produce a three-segment subdivision, with one full-size interior segment
26745bd8deadSopenharmony_ci    and two smaller ones on the outside.  The following figure illustrates
26755bd8deadSopenharmony_ci    what happens to quad tessellation if the horizontal inner LOD (IL0) goes
26765bd8deadSopenharmony_ci    from 3.0 toward 1.0 in fractional odd mode:
26775bd8deadSopenharmony_ci
26785bd8deadSopenharmony_ci             IL0==3         IL0==2         IL0=1.5       IL0=1.2
26795bd8deadSopenharmony_ci          +-----------+  +-----------+  +-----------+  +-----------+
26805bd8deadSopenharmony_ci          |           |  |           |  |           |  |           |
26815bd8deadSopenharmony_ci          |   +---+   |  |  +-----+  |  | +-------+ |  |+---------+|
26825bd8deadSopenharmony_ci          |   |   |   |  |  |     |  |  | |       | |  ||         ||
26835bd8deadSopenharmony_ci          |   |   |   |  |  |     |  |  | |       | |  ||         ||
26845bd8deadSopenharmony_ci          |   +---+   |  |  +-----+  |  | +-------+ |  |+---------+|
26855bd8deadSopenharmony_ci          |           |  |           |  |           |  |           |
26865bd8deadSopenharmony_ci          +-----------+  +-----------+  +-----------+  +-----------+
26875bd8deadSopenharmony_ci
26885bd8deadSopenharmony_ci    As the inner level approaches 1.0, the vertical inner edges in this
26895bd8deadSopenharmony_ci    example get closer and closer to the outer edge.  The distance between
26905bd8deadSopenharmony_ci    the inner and outer vertical edges approaches zero for an inner level of
26915bd8deadSopenharmony_ci    1+epsilon, and the positions of vertices produced by subdividing such
26925bd8deadSopenharmony_ci    edges may be numerically indistinguishable.
26935bd8deadSopenharmony_ci
26945bd8deadSopenharmony_ci
26955bd8deadSopenharmony_ciRevision History
26965bd8deadSopenharmony_ci
26975bd8deadSopenharmony_ci    Rev.    Date      Author     Changes
26985bd8deadSopenharmony_ci    ----  ----------  --------- -------------------------------------------------
26995bd8deadSopenharmony_ci     7    12/10/2018  Jon Leech Use 'workgroup' consistently throughout (Bug
27005bd8deadSopenharmony_ci                                11723, internal API issue 87).
27015bd8deadSopenharmony_ci
27025bd8deadSopenharmony_ci     6    05/31/2016  Jon Leech Note that primitive ID counters are reset to zero
27035bd8deadSopenharmony_ci                                after each instance drawn (Bug 14024).
27045bd8deadSopenharmony_ci
27055bd8deadSopenharmony_ci     5    04/29/2016  Jon Leech Fix GLSL-ES built-in constants to match API
27065bd8deadSopenharmony_ci                                limits (Bug 12823).
27075bd8deadSopenharmony_ci
27085bd8deadSopenharmony_ci     4    04/27/2016  Jon Leech Reduce minimum value of
27095bd8deadSopenharmony_ci                                MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS
27105bd8deadSopenharmony_ci                                from 4096 to 2048 (Bug 12823).
27115bd8deadSopenharmony_ci
27125bd8deadSopenharmony_ci     3    07/23/2015  Jon Leech Reduce minimum value of
27135bd8deadSopenharmony_ci                                MAX_TESS_{CONTROL,EVALUATION}_{IN,OUT}PUT_COMPONENTS
27145bd8deadSopenharmony_ci                                to 64 (Bug 12823)
27155bd8deadSopenharmony_ci
27165bd8deadSopenharmony_ci     2    05/05/2015  dkoch     Remove "per-patch" part of description of
27175bd8deadSopenharmony_ci                                MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS
27185bd8deadSopenharmony_ci                                (Bug 13765).
27195bd8deadSopenharmony_ci                                Allow arrays for both per-patch and per-vertex
27205bd8deadSopenharmony_ci                                TCS outputs (Bug 13658).
27215bd8deadSopenharmony_ci                                Fix typo in issue 15 suggesting that VS outputs
27225bd8deadSopenharmony_ci                                could be an array of structures (Bug 13824).
27235bd8deadSopenharmony_ci
27245bd8deadSopenharmony_ci     1    06/18/2014  dkoch     Initial OES version based on EXT.
27255bd8deadSopenharmony_ci                                No functional changes.
2726