15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    QCOM_alpha_test
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_QCOM_alpha_test
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Maurice Ribble (mribble 'at' qualcomm.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Benj Lipchak
165bd8deadSopenharmony_ci    Maurice Ribble
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciStatus
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    Complete.
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciVersion
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    Last Modified Date: October 11, 2010
255bd8deadSopenharmony_ci    Revision: #2
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciNumber
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    OpenGL ES Extension #89
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ciDependencies
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    OpenGL ES 2.0 is required.
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    This extension is written against the OpenGL ES 2.0 specification.
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ciOverview
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    This extension reintroduces the alpha test per-fragment operation
405bd8deadSopenharmony_ci    from OpenGL ES 1.x.  Some hardware has a dedicated unit capable of
415bd8deadSopenharmony_ci    performing this operation, and it can save ALU operations in the fragment
425bd8deadSopenharmony_ci    shader by avoiding the conditional discard.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ciNew Procedures and Functions
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ci    void AlphaFuncQCOM(enum func, clampf ref);
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ciNew Tokens
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Enable and Disable, and IsEnabled, and by
515bd8deadSopenharmony_ci    the <pname> parameter of GetBooleanv, GetIntegerv, and GetFloatv:
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci        ALPHA_TEST_QCOM                             0x0BC0
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and
565bd8deadSopenharmony_ci    GetFloatv:
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci        ALPHA_TEST_FUNC_QCOM                        0x0BC1
595bd8deadSopenharmony_ci        ALPHA_TEST_REF_QCOM                         0x0BC2
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    Accepted by the <func> parameter of AlphaFuncQCOM:
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci        NEVER
645bd8deadSopenharmony_ci        LESS
655bd8deadSopenharmony_ci        EQUAL
665bd8deadSopenharmony_ci        LEQUAL
675bd8deadSopenharmony_ci        GREATER
685bd8deadSopenharmony_ci        NOTEQUAL
695bd8deadSopenharmony_ci        GEQUAL
705bd8deadSopenharmony_ci        ALWAYS
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 2.0 Specification (Per-Fragment
735bd8deadSopenharmony_ciOperations)
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    Add a new section 4.1.4 - Alpha Test
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci        The alpha test discards a fragment conditional on the outcome of a
785bd8deadSopenharmony_ci        comparison between the incoming fragment's alpha value and a constant
795bd8deadSopenharmony_ci        value.  The comparison is enabled or disabled with the generic Enable
805bd8deadSopenharmony_ci        and Disable commands using the symbolic constant ALPHA_TEST.  When
815bd8deadSopenharmony_ci        disabled, it is as if the comparison always passes.  The test is
825bd8deadSopenharmony_ci        controlled with
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci            void AlphaFuncQCOM(enum func, clampf ref);
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci        <func> is a symbolic constant indicating the alpha test function; <ref>
875bd8deadSopenharmony_ci        is a reference value.  <ref> is clamped to lie in [0,1], and then
885bd8deadSopenharmony_ci        converted to a fixed-point value according to the rules given for an A
895bd8deadSopenharmony_ci        component in section 2.12.8.  For purposes of the alpha test, the
905bd8deadSopenharmony_ci        fragment's alpha value is also rounded to the nearest integer.  The
915bd8deadSopenharmony_ci        possible constants specifying the test function are NEVER, ALWAYS, LESS,
925bd8deadSopenharmony_ci        LEQUAL, EQUAL, GEQUAL, GREATER, or NOTEQUAL, meaning pass the fragment
935bd8deadSopenharmony_ci        never, always, if the fragment's alpha value is less than, less than or
945bd8deadSopenharmony_ci        equal to, equal to, greater than or equal to, greater than, or not equal
955bd8deadSopenharmony_ci        to the reference value, respectively.
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci        The required state consists of the floating-point reference value, an
985bd8deadSopenharmony_ci        eight-valued integer indicating the comparison function, and a bit
995bd8deadSopenharmony_ci        indicating if the comparison is enabled or disabled.  The initial state
1005bd8deadSopenharmony_ci        is for the reference value to be 0 and the function to be ALWAYS.
1015bd8deadSopenharmony_ci        Initially, the alpha test is disabled.
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ciErrors
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci    None
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ciNew State
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci    (table 6.17, Pixel Operations) add the following entries:
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci                                           Initial
1125bd8deadSopenharmony_ci    Get Value            Type  Get Command  Value   Description          Section
1135bd8deadSopenharmony_ci    -------------------  ----  -----------  ------  -------------------  -------
1145bd8deadSopenharmony_ci    ALPHA_TEST_QCOM      B     IsEnabled    False   Alpha test enabled   4.1.4
1155bd8deadSopenharmony_ci    ALPHA_TEST_FUNC_QCOM Z8    GetIntegerv  ALWAYS  Alpha test function  4.1.4
1165bd8deadSopenharmony_ci    ALPHA_TEST_REF_QCOM  R+    GetFloatv    0       Alpha test reference 4.1.4
1175bd8deadSopenharmony_ci                                                    value
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ciRevision History
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    #01    11/04/2007    Benj Lipchak    Created based on ES 1.1 spec language.
1225bd8deadSopenharmony_ci    #02    10/11/2010    Maurice Ribble  Updated to be QCOM extension and fixed
1235bd8deadSopenharmony_ci                                         some wording.
124