15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci    
35bd8deadSopenharmony_ci    NV_texture_shader3
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_texture_shader3
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNotice
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Copyright NVIDIA Corporation, 2001.
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciIP Status
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    NVIDIA Proprietary.
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciVersion
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    NVIDIA Date:  March 5, 2007
245bd8deadSopenharmony_ci    Version:      11
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciNumber
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    265
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ciDependencies
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    Written based on the wording of the OpenGL 1.2.1 specification,
335bd8deadSopenharmony_ci    augmented by the NV_texture_shader and NV_texture_shader2 extension
345bd8deadSopenharmony_ci    specifications.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    Requires support for the NV_texture_shader extension.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Requires support for the NV_texture_shader2 extension.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciOverview
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    NV_texture_shader3 extends the NV_texture_shader functionality by
435bd8deadSopenharmony_ci    adding several new texture shader operations, extending several
445bd8deadSopenharmony_ci    existing texture shader operations, adding a new HILO8 internal
455bd8deadSopenharmony_ci    format, and adding new and more flexible re-mapping modes for dot
465bd8deadSopenharmony_ci    product and dependent texture shader operations.
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    See the NV_texture_shader extension for information about the
495bd8deadSopenharmony_ci    texture shader operational model.
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    The fourteen new texture shader operations are:
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ci    <offset textures>
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    24.  OFFSET_PROJECTIVE_TEXTURE_2D_NV - Transforms the signed (ds,dt)
565bd8deadSopenharmony_ci         components of a previous texture unit by a 2x2 floating-point
575bd8deadSopenharmony_ci         matrix and then uses the result to offset the stage's texture
585bd8deadSopenharmony_ci         coordinates for a 2D non-projective texture.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    25.  OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV - Same as above except
615bd8deadSopenharmony_ci         the magnitude component of the previous texture unit result
625bd8deadSopenharmony_ci         scales the red, green, and blue components of the unsigned RGBA
635bd8deadSopenharmony_ci         texture 2D access.
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    26.  OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV - Similar to
665bd8deadSopenharmony_ci         OFFSET_TEXTURE_2D_NV except that the texture access is into a
675bd8deadSopenharmony_ci         rectangular non-projective texture.
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci    27.  OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV - Similar to
705bd8deadSopenharmony_ci         OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV except that the texture
715bd8deadSopenharmony_ci         access is into a rectangular non-projective texture.
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci    28.  OFFSET_HILO_TEXTURE_2D_NV - Similar to OFFSET_TEXTURE_2D_NV
745bd8deadSopenharmony_ci         but uses a (higher-precision) HILO base format texture rather
755bd8deadSopenharmony_ci         than a DSDT-type base format.
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci    29.  OFFSET_HILO_TEXTURE_RECTANGLE_NV - Similar to
785bd8deadSopenharmony_ci         OFFSET_TEXTURE_RECTANGLE_NV but uses a (higher-precision)
795bd8deadSopenharmony_ci         HILO base format texture rather than a DSDT-type base format.
805bd8deadSopenharmony_ci
815bd8deadSopenharmony_ci    30.  OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV - Similar to
825bd8deadSopenharmony_ci         OFFSET_PROJECTIVE_TEXTURE_2D_NV but uses a (higher-precision)
835bd8deadSopenharmony_ci         HILO base format texture rather than a DSDT-type base format.
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci    31.  OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV - Similar to
865bd8deadSopenharmony_ci         OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV but uses a
875bd8deadSopenharmony_ci         (higher-precision) HILO base format texture rather than a
885bd8deadSopenharmony_ci         DSDT-type base format.
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci         (There are no "offset HILO texture scale" operations because
915bd8deadSopenharmony_ci         HILO textures have only two components with no third component
925bd8deadSopenharmony_ci         for scaling.)
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci    <dependent textures>
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci    32.  DEPENDENT_HILO_TEXTURE_2D_NV - Converts the hi and lo components
975bd8deadSopenharmony_ci         of a previous shader HILO result into an (s,t) texture coordinate
985bd8deadSopenharmony_ci         set to access a 2D non-projective texture.
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci    33.  DEPENDENT_RGB_TEXTURE_3D_NV - Converts the red, green, and
1015bd8deadSopenharmony_ci         blue components of a previous shader RGBA result into an (s,t,r)
1025bd8deadSopenharmony_ci         texture coordinate set to access a 3D non-projective texture.
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    34.  DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV - Converts the red, green,
1055bd8deadSopenharmony_ci         and blue components of a previous shader RGBA result into an
1065bd8deadSopenharmony_ci         (s,t,r) texture coordinate set to access a cube map texture.
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    <dot product pass through>
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    35.  DOT_PRODUCT_PASS_THROUGH_NV - Computes a dot product in the
1115bd8deadSopenharmony_ci         manner of the DOT_PRODUCT_NV operation and the result is [0,1]
1125bd8deadSopenharmony_ci         clamped and smeared to generate the texture unit RGBA result.
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci    <dot product textures>
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci    36.  DOT_PRODUCT_TEXTURE_1D_NV - Computes a dot product in the manner
1175bd8deadSopenharmony_ci         of the DOT_PRODUCT_NV operation and uses the result as the s
1185bd8deadSopenharmony_ci         texture coordinate to access a 2D non-projective texture.
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci    <dot product depth replace>
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    37.  DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV - Computes a dot product
1235bd8deadSopenharmony_ci         in the manner of the DOT_PRODUCT_NV operation and the result
1245bd8deadSopenharmony_ci         is [0,1] clamped and replaces the fragment's window-space
1255bd8deadSopenharmony_ci         depth value.  The texture unit RGBA result is (0,0,0,0).
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    Two new internal texture formats have been added: HILO8_NV and
1285bd8deadSopenharmony_ci    SIGNED_HILO8_NV.  These texture formats allow HILO textures to be
1295bd8deadSopenharmony_ci    stored in half the space; still the filtering for these internal
1305bd8deadSopenharmony_ci    texture formats is done with 16-bit precision.
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    One new unsigned RGBA dot product mapping mode (FORCE_BLUE_TO_ONE_NV)
1335bd8deadSopenharmony_ci    forces the blue component to be 1.0 before computing a dot product.
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ciIssues
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    Should a HILO8_NV internal format be added?
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ci      RESOLUTION:  Yes.  The HILO8_NV format allows HILO textures to
1405bd8deadSopenharmony_ci      take up half the space (16-bit HILO8_NV versus 32-bit HILO16_NV).
1415bd8deadSopenharmony_ci      Even though the texture is stored with 8-bit components, the
1425bd8deadSopenharmony_ci      interpolated precision can be assumed to be 16-bit.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ci    Should we generalize existing OFFSET_TEXTURE-style operations to
1455bd8deadSopenharmony_ci    support HILO textures and projective texturing, or should we just
1465bd8deadSopenharmony_ci    add more texture shader operations?
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci      RESOLUTION:  Add more texture shader operations for each distinct
1495bd8deadSopenharmony_ci      configuration.
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci      NV_texture_shader had consistency rules for OFFSET_TEXTURE
1525bd8deadSopenharmony_ci      operations that preclude consistency when used with HILO textures.
1535bd8deadSopenharmony_ci      Consistency is a defined behavior that should stay defined even with
1545bd8deadSopenharmony_ci      future extensions.  Adding specific new texture shader operation
1555bd8deadSopenharmony_ci      for HILO textures avoids having to redefine the consistency rules
1565bd8deadSopenharmony_ci      for DSDT-using OFFSET_TEXTURE operations.
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci      Rather than add a separate state that decides when OFFSET_TEXTURE
1595bd8deadSopenharmony_ci      is projective or not, we just add new operations.
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ciNew Procedures and Functions
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci    None.
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ciNew Tokens
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    When the <target> and <pname> parameters of TexEnvf, TexEnvfv,
1685bd8deadSopenharmony_ci    TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV
1695bd8deadSopenharmony_ci    respectively, then the value of <param> or the value pointed to by
1705bd8deadSopenharmony_ci    <params> may be:
1715bd8deadSopenharmony_ci
1725bd8deadSopenharmony_ci        OFFSET_PROJECTIVE_TEXTURE_2D_NV                0x8850
1735bd8deadSopenharmony_ci        OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV          0x8851
1745bd8deadSopenharmony_ci        OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV         0x8852
1755bd8deadSopenharmony_ci        OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV   0x8853
1765bd8deadSopenharmony_ci        OFFSET_HILO_TEXTURE_2D_NV                      0x8854
1775bd8deadSopenharmony_ci        OFFSET_HILO_TEXTURE_RECTANGLE_NV               0x8855
1785bd8deadSopenharmony_ci        OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV           0x8856
1795bd8deadSopenharmony_ci        OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV    0x8857
1805bd8deadSopenharmony_ci        DEPENDENT_HILO_TEXTURE_2D_NV                   0x8858
1815bd8deadSopenharmony_ci        DEPENDENT_RGB_TEXTURE_3D_NV                    0x8859
1825bd8deadSopenharmony_ci        DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV              0x885A
1835bd8deadSopenharmony_ci        DOT_PRODUCT_PASS_THROUGH_NV                    0x885B
1845bd8deadSopenharmony_ci        DOT_PRODUCT_TEXTURE_1D_NV                      0x885C
1855bd8deadSopenharmony_ci        DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV            0x885D
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ci    Accepted by the <internalformat> parameter of TexImage1D, TexImage2D,
1885bd8deadSopenharmony_ci    and TexImage3D:
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci        HILO8_NV                                       0x885E
1915bd8deadSopenharmony_ci        SIGNED_HILO8_NV                                0x885F
1925bd8deadSopenharmony_ci
1935bd8deadSopenharmony_ci    When the <target> and <pname> parameters of TexEnvf,
1945bd8deadSopenharmony_ci    TexEnvfv, TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and
1955bd8deadSopenharmony_ci    RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV respectively, then the value
1965bd8deadSopenharmony_ci    of <param> or the value pointed to by <params> may be:
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ci        FORCE_BLUE_TO_ONE_NV                           0x8860
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci     None
2035bd8deadSopenharmony_ci
2045bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization)
2055bd8deadSopenharmony_ci
2065bd8deadSopenharmony_ci --  Section 3.8 "Texturing"
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci     Replace the third paragraph (amended by the NV_texture_shader
2095bd8deadSopenharmony_ci     extension) with the following that includes new texture shader
2105bd8deadSopenharmony_ci     references:
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci     "The alternative to conventional texturing is the texture shaders
2135bd8deadSopenharmony_ci     mechanism.  When texture shaders are enabled, each texture unit uses
2145bd8deadSopenharmony_ci     one of thirty-seven texture shader operations.  Thirty-three of the
2155bd8deadSopenharmony_ci     thirty-seven shader operations map an (s,t,r,q) texture coordinate
2165bd8deadSopenharmony_ci     set to an RGBA color.  Of these, four texture shader operations
2175bd8deadSopenharmony_ci     directly correspond to the 1D, 2D, 3D, and cube map conventional
2185bd8deadSopenharmony_ci     texturing operations.  Depending on the texture shader operation, the
2195bd8deadSopenharmony_ci     mapping from the (s,t,r,q) texture coordinate set to an RGBA color
2205bd8deadSopenharmony_ci     may depend on the given texture unit's currently bound texture object
2215bd8deadSopenharmony_ci     state and/or the results of previous texture shader operations.
2225bd8deadSopenharmony_ci     The four remaining texture shader operations respectively provide
2235bd8deadSopenharmony_ci     a fragment culling mechanism based on texture coordinates, a dot
2245bd8deadSopenharmony_ci     product operation that computes a floating-point value for use by
2255bd8deadSopenharmony_ci     subsequent texture shaders.  and two means to replace the fragment
2265bd8deadSopenharmony_ci     depth value, The specifics of each texture shader operation are
2275bd8deadSopenharmony_ci     described in section 3.8.12."
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci --  Section 3.8.1 "Texture Image Specification"
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci     Add two more rows to table 3.16:
2325bd8deadSopenharmony_ci
2335bd8deadSopenharmony_ciSized                          Base                  R    G    B    A    L    I    HI   LO   DS   DT   MAG
2345bd8deadSopenharmony_ciInternal Format                Internal Format       bits bits bits bits bits bits bits bits bits bits bits
2355bd8deadSopenharmony_ci------------------------------ --------------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
2365bd8deadSopenharmony_ciHILO8_NV                       HILO                                                8    8
2375bd8deadSopenharmony_ciSIGNED_HILO8_NV                HILO                                                8*   8*
2385bd8deadSopenharmony_ci
2395bd8deadSopenharmony_ci     Update this paragraph inserted by NV_texture_shader before the last
2405bd8deadSopenharmony_ci     sentence in the fifth paragraph to read:
2415bd8deadSopenharmony_ci
2425bd8deadSopenharmony_ci     "The error INVALID_OPERATION is generated if the format is
2435bd8deadSopenharmony_ci     HILO_NV and the internalformat is not one of HILO_NV, HILO16_NV,
2445bd8deadSopenharmony_ci     HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, SIGNED_HILO8_NV;
2455bd8deadSopenharmony_ci     or if the internalformat is one of HILO_NV, HILO16_NV, HILO8_NV,
2465bd8deadSopenharmony_ci     SIGNED_HILO_NV, SIGNED_HILO16_NV, or SIGNED_HILO8_NV and the format
2475bd8deadSopenharmony_ci     is not HILO_NV.
2485bd8deadSopenharmony_ci
2495bd8deadSopenharmony_ci --  Section 3.8.2 "Alternate Texture Image Specification Commands"
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci     In the second paragraph (describing CopyTexImage2D), change the
2525bd8deadSopenharmony_ci     third to the last sentence (previously amended by NV_texture_shader) to:
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci     "Parameters level, internalformat, and border are specified using the
2555bd8deadSopenharmony_ci     same values, with the same meanings, as the equivalent arguments of
2565bd8deadSopenharmony_ci     TexImage2D, except that internalformat may not be specified as 1, 2,
2575bd8deadSopenharmony_ci     3, 4, HILO_NV, HILO16_NV, HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
2585bd8deadSopenharmony_ci     SIGNED_HILO8_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV,
2595bd8deadSopenharmony_ci     DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV."
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci     In the third paragraph (describing CopyTexImage1D), change the second
2625bd8deadSopenharmony_ci     to the last sentence (previously amended by NV_texture_shader) to:
2635bd8deadSopenharmony_ci
2645bd8deadSopenharmony_ci     "level, internalformat, and border are specified using the same
2655bd8deadSopenharmony_ci     values, with the same meanings, as the equivalent arguments of
2665bd8deadSopenharmony_ci     TexImage1D, except that internalformat may not be specified as 1, 2,
2675bd8deadSopenharmony_ci     3, 4, HILO_NV, HILO16_NV, HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
2685bd8deadSopenharmony_ci     SIGNED_HILO8_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV,
2695bd8deadSopenharmony_ci     DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV."
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci     Amend the following text inserted by NV_texture_shader after the
2725bd8deadSopenharmony_ci     six paragraph to include the HILO8 and UNSIGNED_HILO8 internal
2735bd8deadSopenharmony_ci     texture formats:
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci     "CopyTexSubImage3D, CopyTexSubImage2D, and CopyTexSubImage1D
2765bd8deadSopenharmony_ci     generate the error INVALID_OPERATION if the internal format of
2775bd8deadSopenharmony_ci     the texture array to which the pixels are to be copied is one of
2785bd8deadSopenharmony_ci     HILO_NV, HILO16_NV, HILO8_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV,
2795bd8deadSopenharmony_ci     SIGNED_HILO8_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV,
2805bd8deadSopenharmony_ci     DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV."
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci --  Section 3.8.13 "Texture Shaders"
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci     Amend the designated paragraphs of the NV_texture_shader
2855bd8deadSopenharmony_ci     specification to include discussion of new texture shader
2865bd8deadSopenharmony_ci     operations.
2875bd8deadSopenharmony_ci
2885bd8deadSopenharmony_ci     1st paragraph (update number of operations):
2895bd8deadSopenharmony_ci
2905bd8deadSopenharmony_ci     "Each texture unit is configured with one of thirty-seven
2915bd8deadSopenharmony_ci     texture shader operations.  Several texture shader operations
2925bd8deadSopenharmony_ci     require additional state.  All per-texture shader stage state
2935bd8deadSopenharmony_ci     is specified using the TexEnv commands with the target specified
2945bd8deadSopenharmony_ci     as TEXTURE_SHADER_NV.  The per-texture shader state is replicated
2955bd8deadSopenharmony_ci     per texture unit so the texture unit selected by ActiveTextureARB
2965bd8deadSopenharmony_ci     determines which texture unit's environment is modified by TexEnv
2975bd8deadSopenharmony_ci     calls."
2985bd8deadSopenharmony_ci
2995bd8deadSopenharmony_ci     3rd paragraph (add fourteen new texture shader operations):
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci     "When TexEnv is called with the target of TEXTURE_SHADER_NV,
3025bd8deadSopenharmony_ci     SHADER_OPERATION_NV may be set to one of NONE, TEXTURE_1D,
3035bd8deadSopenharmony_ci     TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP_ARB, PASS_THROUGH_NV,
3045bd8deadSopenharmony_ci     CULL_FRAGMENT_NV, OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
3055bd8deadSopenharmony_ci     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
3065bd8deadSopenharmony_ci     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
3075bd8deadSopenharmony_ci     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
3085bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
3095bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
3105bd8deadSopenharmony_ci     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
3115bd8deadSopenharmony_ci     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV,
3125bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_2D_NV,
3135bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV,
3145bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV,
3155bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV,
3165bd8deadSopenharmony_ci     OFFSET_HILO_TEXTURE_2D_NV, OFFSET_HILO_TEXTURE_RECTANGLE_NV,
3175bd8deadSopenharmony_ci     OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV,
3185bd8deadSopenharmony_ci     OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV,
3195bd8deadSopenharmony_ci     DEPENDENT_HILO_TEXTURE_2D_NV, DEPENDENT_RGB_TEXTURE_3D_NV,
3205bd8deadSopenharmony_ci     DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_PASS_THROUGH_NV,
3215bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_1D_NV, or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV.
3225bd8deadSopenharmony_ci     The semantics of each of these shader operations is described
3235bd8deadSopenharmony_ci     in section 3.8.13.1.  Not every operation is supported in every
3245bd8deadSopenharmony_ci     texture unit.  The restrictions for how these shader operations
3255bd8deadSopenharmony_ci     can be configured in various texture units are described in section
3265bd8deadSopenharmony_ci     3.8.13.2."
3275bd8deadSopenharmony_ci
3285bd8deadSopenharmony_ci     5th paragraph (add FORCE_BLUE_TO_ONE_NV):
3295bd8deadSopenharmony_ci
3305bd8deadSopenharmony_ci     "When TexEnv is called with the target of TEXTURE_SHADER_NV,
3315bd8deadSopenharmony_ci     RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV may be set to one of
3325bd8deadSopenharmony_ci     UNSIGNED_IDENTITY_NV, EXPAND_NORMAL_NV, or FORCE_BLUE_TO_ONE_NV.
3335bd8deadSopenharmony_ci     This RGBA unsigned dot product mapping mode is used by the
3345bd8deadSopenharmony_ci     DOT_PRODUCT_NV operation (see section 3.8.13.1.14) and other
3355bd8deadSopenharmony_ci     operations that compute dot products."
3365bd8deadSopenharmony_ci
3375bd8deadSopenharmony_ci     3.8.13.1  Texture Shader Operations
3385bd8deadSopenharmony_ci
3395bd8deadSopenharmony_ci     Amend tables 3.A, 3.B, 3.C, and 3.D in the NV_texture_shader
3405bd8deadSopenharmony_ci     specification to include these new entries:
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci     Table 3.A:
3435bd8deadSopenharmony_ci                                                                                                          texture shader
3445bd8deadSopenharmony_citexture shader operation i                    previous texture input     texture shader operation i-1     operation i-2     texture shader operation i+1
3455bd8deadSopenharmony_ci============================================  =========================  ===============================  ================  ================================
3465bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_2D_NV               base internal texture      -                                -                 -
3475bd8deadSopenharmony_ci                                               format must be one of
3485bd8deadSopenharmony_ci                                               DSDT_NV, DSDT_MAG_NV, or
3495bd8deadSopenharmony_ci                                               DSDT_MAG_INTENSITY_NV
3505bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV         base internal texture      -                                -                 -
3515bd8deadSopenharmony_ci                                               format must be either
3525bd8deadSopenharmony_ci                                               DSDT_MAG_NV or
3535bd8deadSopenharmony_ci                                               DSDT_MAG_INTENSITY_NV
3545bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV        base internal texture      -                                -                 -
3555bd8deadSopenharmony_ci                                               format must be one of
3565bd8deadSopenharmony_ci                                               DSDT_NV, DSDT_MAG_NV, or
3575bd8deadSopenharmony_ci                                               DSDT_MAG_INTENSITY_NV
3585bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV  base internal texture      -                                -                 -
3595bd8deadSopenharmony_ci                                               format must be either
3605bd8deadSopenharmony_ci                                               DSDT_MAG_NV or
3615bd8deadSopenharmony_ci                                               DSDT_MAG_INTENSITY_NV
3625bd8deadSopenharmony_ci--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
3635bd8deadSopenharmony_ciOFFSET_HILO_TEXTURE_2D_NV                     base internal texture      -                                -                 -
3645bd8deadSopenharmony_ci                                               format must be HILO
3655bd8deadSopenharmony_ciOFFSET_HILO_TEXTURE_RECTANGLE_NV              base internal texture      -                                -                 -
3665bd8deadSopenharmony_ci                                               format must be HILO
3675bd8deadSopenharmony_ciOFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV          base internal texture      -                                -                 -
3685bd8deadSopenharmony_ci                                               format must be HILO
3695bd8deadSopenharmony_ciOFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV   base internal texture      -                                -                 -
3705bd8deadSopenharmony_ci                                               format must be HILO
3715bd8deadSopenharmony_ci--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
3725bd8deadSopenharmony_ciDEPENDENT_HILO_TEXTURE_2D_NV                  base internal texture      -                                -                 -
3735bd8deadSopenharmony_ci                                               format must be HILO
3745bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_3D_NV                   shader result type must    -                                -                 -
3755bd8deadSopenharmony_ci                                               all be unsigned RGBA
3765bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_CUBE_MAP_NV             shader result type must    -                                -                 -
3775bd8deadSopenharmony_ci                                               all be RGB or RGBA
3785bd8deadSopenharmony_ci                                               (signed RGB components
3795bd8deadSopenharmony_ci                                               are allowed)
3805bd8deadSopenharmony_ci--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
3815bd8deadSopenharmony_ciDOT_PRODUCT_PASS_THROUGH_NV                   shader result type must    -                                -                 -
3825bd8deadSopenharmony_ci                                               be one of signed HILO,
3835bd8deadSopenharmony_ci                                               unsigned HILO, all
3845bd8deadSopenharmony_ci                                               signed RGBA, or all
3855bd8deadSopenharmony_ci                                               unsigned RGBA
3865bd8deadSopenharmony_ci--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
3875bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_1D_NV                     shader result type must    -                                -                 -
3885bd8deadSopenharmony_ci                                               be one of signed HILO,
3895bd8deadSopenharmony_ci                                               unsigned HILO, all
3905bd8deadSopenharmony_ci                                               signed RGBA, or all
3915bd8deadSopenharmony_ci                                               unsigned RGBA
3925bd8deadSopenharmony_ci--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
3935bd8deadSopenharmony_ciDOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV           shader result type must    -                                -                 -
3945bd8deadSopenharmony_ci                                               be one of signed HILO,
3955bd8deadSopenharmony_ci                                               unsigned HILO, all
3965bd8deadSopenharmony_ci                                               signed RGBA, or all
3975bd8deadSopenharmony_ci                                               unsigned RGBA 
3985bd8deadSopenharmony_ci--------------------------------------------  -------------------------  -------------------------------  ----------------  --------------------------------
3995bd8deadSopenharmony_ci
4005bd8deadSopenharmony_ci     Table 3.B:
4015bd8deadSopenharmony_ci
4025bd8deadSopenharmony_citexture shader operation i                    texture unit i
4035bd8deadSopenharmony_ci============================================  =======================================
4045bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_2D_NV               2D target must be consistent
4055bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV         2D target must be consistent
4065bd8deadSopenharmony_ci                                               and 2D texture target type must
4075bd8deadSopenharmony_ci                                               be unsigned RGBA 
4085bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV        rectangle target must be consistent
4095bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV  rectangle target must be consistent
4105bd8deadSopenharmony_ci                                               and rectangle texture target type must
4115bd8deadSopenharmony_ci                                               be unsigned RGBA 
4125bd8deadSopenharmony_ci--------------------------------------------  ---------------------------------------
4135bd8deadSopenharmony_ciOFFSET_HILO_TEXTURE_2D_NV                     2D target must be consistent
4145bd8deadSopenharmony_ciOFFSET_HILO_TEXTURE_RECTANGLE_NV              rectangle target must be consistent
4155bd8deadSopenharmony_ciOFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV          2D target must be consistent
4165bd8deadSopenharmony_ciOFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV   rectangle target must be consistent
4175bd8deadSopenharmony_ci--------------------------------------------  ---------------------------------------
4185bd8deadSopenharmony_ciDEPENDENT_HILO_TEXTURE_2D_NV                  2D target must be consistent
4195bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_3D_NV                   3D target must be consistent
4205bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_CUBE_MAP_NV             cube map target must be consistent
4215bd8deadSopenharmony_ci--------------------------------------------  ---------------------------------------
4225bd8deadSopenharmony_ciDOT_PRODUCT_PASS_THROUGH_NV                   -
4235bd8deadSopenharmony_ci--------------------------------------------  ---------------------------------------
4245bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_1D_NV                     1D target must be consistent
4255bd8deadSopenharmony_ci--------------------------------------------  ---------------------------------------
4265bd8deadSopenharmony_ciDOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV           -
4275bd8deadSopenharmony_ci--------------------------------------------  ---------------------------------------
4285bd8deadSopenharmony_ci
4295bd8deadSopenharmony_ci
4305bd8deadSopenharmony_ci     Table 3.C:
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci                                                            uses    uses    uses    uses             uses       offset    uses
4335bd8deadSopenharmony_ci                                     texture                stage   stage   stage   previous  uses   offset     texture   const
4345bd8deadSopenharmony_ci                                     coordinate  texture    result  result  result  texture   cull   texture    2D scale  eye
4355bd8deadSopenharmony_citexture shader operation i           set usage   target     i-1     i-2     i+1     input     modes  2D matrix  and bias  vector
4365bd8deadSopenharmony_ci===================================  ==========  =========  ======  ======  ======  ========  =====  =========  ========  ======
4375bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_2D_NV      s,t,q       2D         -       -       -       y         -      y          -         -
4385bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                  s,t,q       2D         -       -       -       y         -      y          y         -
4395bd8deadSopenharmony_ci  TEXTURE_2D_SCALE_NV
4405bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                  s,t,q       rectangle  -       -       -       y         -      y          -         -
4415bd8deadSopenharmony_ci  TEXTURE_RECTANGLE_NV
4425bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                  s,t,q       rectangle  -       -       -       y         -      y          y         -
4435bd8deadSopenharmony_ci  TEXTURE_RECTANGLE_SCALE_NV
4445bd8deadSopenharmony_ci-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
4455bd8deadSopenharmony_ciOFFSET_HILO_TEXTURE_2D_NV            s,t         2D         -       -       -       y         -      y          -         -
4465bd8deadSopenharmony_ciOFFSET_HILO_TEXTURE_RECTANGLE_NV     s,t         rectangle  -       -       -       y         -      y          -         -
4475bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                  s,t,q       2D         -       -       -       y         -      y          -         -
4485bd8deadSopenharmony_ci  HILO_TEXTURE_2D_NV
4495bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                  s,t,q       rectangle  -       -       -       y         -      y          -         -
4505bd8deadSopenharmony_ci  HILO_TEXTURE_RECTANGLE_NV
4515bd8deadSopenharmony_ci-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
4525bd8deadSopenharmony_ciDEPENDENT_HILO_TEXTURE_2D_NV         -           2D         -       -       -       y         -      -          -         -
4535bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_3D_NV          -           3D         -       -       -       y         -      -          -         -
4545bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_CUBE_MAP_NV    -           cube map   -       -       -       y         -      -          -         -
4555bd8deadSopenharmony_ci-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
4565bd8deadSopenharmony_ciDOT_PRODUCT_PASS_THROUGH_NV          s,t,r       -          -       -       -       y         -      -          -         -
4575bd8deadSopenharmony_ci-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
4585bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_1D_NV            s,t,r       1D         -       -       -       y         -      -          -         -
4595bd8deadSopenharmony_ci-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
4605bd8deadSopenharmony_ciDOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV  s,t,r       -          -       -       -       y         -      -          -         -
4615bd8deadSopenharmony_ci-----------------------------------  ----------  ---------  ------  ------  ------  --------  -----  ---------  --------  ------
4625bd8deadSopenharmony_ci
4635bd8deadSopenharmony_ci     Table 3.D:
4645bd8deadSopenharmony_ci
4655bd8deadSopenharmony_citexture shader operation i         shader stage result type       shader stage result                  texture unit RGBA color result
4665bd8deadSopenharmony_ci=================================  =============================  ===================================  ======================================
4675bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_NV               matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
4685bd8deadSopenharmony_ci                                                                                                        filtered 2D target texel,
4695bd8deadSopenharmony_ci                                                                                                        else (0,0,0,0) 
4705bd8deadSopenharmony_ciOFFSET_TEXTURE_2D_SCALE_NV         unsigned RGBA                  filtered 2D target texel             scaled filtered 2D target texel
4715bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_NV        matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
4725bd8deadSopenharmony_ci                                                                                                        RGBA, filtered rectangle target
4735bd8deadSopenharmony_ci                                                                                                        texel, else (0,0,0,0) 
4745bd8deadSopenharmony_ciOFFSET_TEXTURE_RECTANGLE_SCALE_NV  unsigned RGBA                  filtered rectangle target texel      scaled filtered rectangle target texel
4755bd8deadSopenharmony_ciOFFSET_PROJECTIVE_TEXTURE_2D_NV    matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
4765bd8deadSopenharmony_ci                                                                                                        filtered 2D target texel,
4775bd8deadSopenharmony_ci                                                                                                        else (0,0,0,0) 
4785bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                unsigned RGBA                  filtered 2D target texel             scaled filtered 2D target texel
4795bd8deadSopenharmony_ci  TEXTURE_2D_SCALE_NV
4805bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                matches rectangle target type  filtered rectangle target texel      if rectangle target texture type is
4815bd8deadSopenharmony_ci  TEXTURE_RECTANGLE_NV                                                                                  RGBA, filtered rectangle target
4825bd8deadSopenharmony_ci                                                                                                        texel, else (0,0,0,0) 
4835bd8deadSopenharmony_ciOFFSET_PROJECTIVE_-                unsigned RGBA                  filtered rectangle target texel      scaled filtered rectangle target texel
4845bd8deadSopenharmony_ci  TEXTURE_RECTANGLE_SCALE_NV
4855bd8deadSopenharmony_ci---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
4865bd8deadSopenharmony_ciDEPENDENT_HILO_TEXTURE_2D_NV       matches 2D target type         filtered 2D target texel             if 2D target texture type is RGBA,
4875bd8deadSopenharmony_ci                                                                                                        filtered 2D target texel,
4885bd8deadSopenharmony_ci                                                                                                        else (0,0,0,0)  
4895bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_3D_NV        matches 3D target type         filtered 3D target texel             if 3D target texture type is RGBA,
4905bd8deadSopenharmony_ci                                                                                                        filtered 3D target texel,
4915bd8deadSopenharmony_ci                                                                                                        else (0,0,0,0)  
4925bd8deadSopenharmony_ciDEPENDENT_RGB_TEXTURE_CUBE_MAP_NV  matches cube map target type   filtered cube map target texel       if cube map target texture type is
4935bd8deadSopenharmony_ci                                                                                                        RGBA,  filtered cube map target
4945bd8deadSopenharmony_ci                                                                                                        texel, else (0,0,0,0) 
4955bd8deadSopenharmony_ci---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
4965bd8deadSopenharmony_ciDOT_PRODUCT_PASS_THROUGH_NV        unsigned RGBA                  (max(0,min(1,[s,t,r]dot[a,b,c])),    (max(0,min(1,[s,t,r]dot[a,b,c])),
4975bd8deadSopenharmony_ci                                                                   max(0,min(1,[s,t,r]dot[a,b,c])),     max(0,min(1,[s,t,r]dot[a,b,c])),
4985bd8deadSopenharmony_ci                                                                   max(0,min(1,[s,t,r]dot[a,b,c])),     max(0,min(1,[s,t,r]dot[a,b,c])),
4995bd8deadSopenharmony_ci                                                                   max(0,min(1,[s,t,r]dot[a,b,c])))     max(0,min(1,[s,t,r]dot[a,b,c])))
5005bd8deadSopenharmony_ci---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
5015bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_1D_NV          matches 1D target type         filtered 1D target texel             if 1D target texture type is RGBA,
5025bd8deadSopenharmony_ci                                                                                                        filtered 1D target texel,
5035bd8deadSopenharmony_ci                                                                                                        else (0,0,0,0)  
5045bd8deadSopenharmony_ci---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
5055bd8deadSopenharmony_ciDOT_PRODUCT_-                      unsigned RGBA                  invalid                              (0,0,0,0)
5065bd8deadSopenharmony_ci  AFFINE_DEPTH_REPLACE_NV
5075bd8deadSopenharmony_ci---------------------------------  -----------------------------  -----------------------------------  --------------------------------------
5085bd8deadSopenharmony_ci
5095bd8deadSopenharmony_ci     3.8.13.1.14  Dot Product
5105bd8deadSopenharmony_ci
5115bd8deadSopenharmony_ci     Add this description of FORCE_BLUE_TO_ONE_NV after the description
5125bd8deadSopenharmony_ci     of EXPAND_NORMAL_NV:
5135bd8deadSopenharmony_ci
5145bd8deadSopenharmony_ci     "When the RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV is
5155bd8deadSopenharmony_ci     FORCE_BLUE_TO_ONE_NV, then the floating-point result for unsigned
5165bd8deadSopenharmony_ci     RGBA components is computed by
5175bd8deadSopenharmony_ci
5185bd8deadSopenharmony_ci       result = s * Rprev + t * Gprev + r
5195bd8deadSopenharmony_ci
5205bd8deadSopenharmony_ci     where Rprev and Gprev are the (unsigned) red and green components
5215bd8deadSopenharmony_ci     respectively of the previous texture unit's RGBA texture shader
5225bd8deadSopenharmony_ci     result (the previous blue component can be assumed forced to 1.0
5235bd8deadSopenharmony_ci     for the purposes of the dot product computation)."
5245bd8deadSopenharmony_ci
5255bd8deadSopenharmony_ci     3.8.13.1.21  Dot Product Depth Replace
5265bd8deadSopenharmony_ci
5275bd8deadSopenharmony_ci     Amend the paragraph meant to avoid multiple depth replaces to read:
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci     "If any previous texture shader stage operation is
5305bd8deadSopenharmony_ci     DOT_PRODUCT_DEPTH_REPLACE_NV or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV
5315bd8deadSopenharmony_ci     and that previous stage is consistent, then this texture shader
5325bd8deadSopenharmony_ci     stage is not consistent.  (This eliminates the potential for two
5335bd8deadSopenharmony_ci     stages to each be performing a depth replace operation.)"
5345bd8deadSopenharmony_ci
5355bd8deadSopenharmony_ci     Add the following new sections specifying new texture shader
5365bd8deadSopenharmony_ci     operations:
5375bd8deadSopenharmony_ci
5385bd8deadSopenharmony_ci     Add the following new texture shader operation descriptions:
5395bd8deadSopenharmony_ci
5405bd8deadSopenharmony_ci     "3.8.13.1.24  Offset Projective Texture 2D
5415bd8deadSopenharmony_ci
5425bd8deadSopenharmony_ci     The OFFSET_PROJECTIVE_TEXTURE_2D_NV shader operation operates
5435bd8deadSopenharmony_ci     identically to the OFFSET_TEXTURE_2D_NV shader operation except
5445bd8deadSopenharmony_ci     that the perturbed texture coordinates s' and t' are computed with
5455bd8deadSopenharmony_ci     floating-point math as follows:
5465bd8deadSopenharmony_ci
5475bd8deadSopenharmony_ci       s' = s/q + a1 * DSprev + a3 * DTprev
5485bd8deadSopenharmony_ci       t' = t/q + a2 * DSprev + a4 * DTprev
5495bd8deadSopenharmony_ci
5505bd8deadSopenharmony_ci     Note the division of s and t by the current texture shader stage's
5515bd8deadSopenharmony_ci     q texture coordinate.
5525bd8deadSopenharmony_ci
5535bd8deadSopenharmony_ci     3.8.13.1.25  Offset Projective Texture 2D Scale
5545bd8deadSopenharmony_ci
5555bd8deadSopenharmony_ci     The OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV shader operation operates
5565bd8deadSopenharmony_ci     identically to the OFFSET_TEXTURE_2D_SCALE_NV shader operation except
5575bd8deadSopenharmony_ci     that the perturbed texture coordinates s' and t' are computed with
5585bd8deadSopenharmony_ci     floating-point math as follows:
5595bd8deadSopenharmony_ci
5605bd8deadSopenharmony_ci       s' = s/q + a1 * DSprev + a3 * DTprev
5615bd8deadSopenharmony_ci       t' = t/q + a2 * DSprev + a4 * DTprev
5625bd8deadSopenharmony_ci
5635bd8deadSopenharmony_ci     Note the division of s and t by the current texture shader stage's
5645bd8deadSopenharmony_ci     q texture coordinate.
5655bd8deadSopenharmony_ci
5665bd8deadSopenharmony_ci     3.8.13.1.26  Offset Projective Texture Rectangle
5675bd8deadSopenharmony_ci
5685bd8deadSopenharmony_ci     The OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV shader operation
5695bd8deadSopenharmony_ci     operates identically to the OFFSET_TEXTURE_RECTANGLE_NV shader
5705bd8deadSopenharmony_ci     operation except that the perturbed texture coordinates s' and t'
5715bd8deadSopenharmony_ci     are computed with floating-point math as follows:
5725bd8deadSopenharmony_ci
5735bd8deadSopenharmony_ci       s' = s/q + a1 * DSprev + a3 * DTprev
5745bd8deadSopenharmony_ci       t' = t/q + a2 * DSprev + a4 * DTprev
5755bd8deadSopenharmony_ci
5765bd8deadSopenharmony_ci     Note the division of s and t by the current texture shader stage's
5775bd8deadSopenharmony_ci     q texture coordinate.
5785bd8deadSopenharmony_ci
5795bd8deadSopenharmony_ci     3.8.13.1.27  Offset Projective Texture Rectangle Scale
5805bd8deadSopenharmony_ci
5815bd8deadSopenharmony_ci     The OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV shader operation
5825bd8deadSopenharmony_ci     operates identically to the OFFSET_TEXTURE_RECTANGLE_SCALE_NV shader
5835bd8deadSopenharmony_ci     operation except that the perturbed texture coordinates s' and t'
5845bd8deadSopenharmony_ci     are computed with floating-point math as follows:
5855bd8deadSopenharmony_ci
5865bd8deadSopenharmony_ci       s' = s/q + a1 * DSprev + a3 * DTprev
5875bd8deadSopenharmony_ci       t' = t/q + a2 * DSprev + a4 * DTprev
5885bd8deadSopenharmony_ci
5895bd8deadSopenharmony_ci     Note the division of s and t by the current texture shader stage's
5905bd8deadSopenharmony_ci     q texture coordinate.
5915bd8deadSopenharmony_ci
5925bd8deadSopenharmony_ci     3.8.13.1.28  Offset HILO Texture 2D
5935bd8deadSopenharmony_ci
5945bd8deadSopenharmony_ci     The OFFSET_HILO_TEXTURE_2D_NV texture shader operation uses the
5955bd8deadSopenharmony_ci     transformed result of a previous texture shader stage to perturb
5965bd8deadSopenharmony_ci     the current texture shader stage's (s,t) texture coordinates
5975bd8deadSopenharmony_ci     (without a projective division by q).  The resulting perturbed
5985bd8deadSopenharmony_ci     texture coordinates (s',t') are used to access the texture unit's 2D
5995bd8deadSopenharmony_ci     texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6).
6005bd8deadSopenharmony_ci
6015bd8deadSopenharmony_ci     The result of the texture access becomes both the shader result and
6025bd8deadSopenharmony_ci     texture unit RGBA result (see table 3.E).  The type of the shader
6035bd8deadSopenharmony_ci     result depends on the format type of the accessed texture.
6045bd8deadSopenharmony_ci
6055bd8deadSopenharmony_ci     The perturbed texture coordinates s' and t' are computed with
6065bd8deadSopenharmony_ci     floating-point math as follows:
6075bd8deadSopenharmony_ci
6085bd8deadSopenharmony_ci       s' = s + a1 * HIprev + a3 * LOprev
6095bd8deadSopenharmony_ci       t' = t + a2 * HIprev + a4 * LOprev
6105bd8deadSopenharmony_ci
6115bd8deadSopenharmony_ci     where a1, a2, a3, and a4 are the texture shader stage's
6125bd8deadSopenharmony_ci     OFFSET_TEXTURE_MATRIX_NV values, and HIprev and LOprev are the
6135bd8deadSopenharmony_ci     (signed) HI and LO components of a previous texture shader unit's
6145bd8deadSopenharmony_ci     texture shader result specified by the current texture shader
6155bd8deadSopenharmony_ci     stage's PREVIOUS_TEXTURE_INPUT_NV value.
6165bd8deadSopenharmony_ci
6175bd8deadSopenharmony_ci     If the texture unit's 2D texture object is not consistent, then
6185bd8deadSopenharmony_ci     this texture shader stage is not consistent.
6195bd8deadSopenharmony_ci
6205bd8deadSopenharmony_ci     If the previous texture input texture object specified by the
6215bd8deadSopenharmony_ci     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
6225bd8deadSopenharmony_ci     has a base internalformat that is not HILO with signed components,
6235bd8deadSopenharmony_ci     then this texture shader stage is not consistent.
6245bd8deadSopenharmony_ci
6255bd8deadSopenharmony_ci     If the previous texture input texture shader operation specified by
6265bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
6275bd8deadSopenharmony_ci     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
6285bd8deadSopenharmony_ci
6295bd8deadSopenharmony_ci     If the previous texture input texture shader result specified by
6305bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
6315bd8deadSopenharmony_ci     is invalid, then this texture shader stage is not consistent.
6325bd8deadSopenharmony_ci
6335bd8deadSopenharmony_ci     If the previous texture input shader stage specified by the current
6345bd8deadSopenharmony_ci     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
6355bd8deadSopenharmony_ci     consistent, then this texture shader stage is not consistent.
6365bd8deadSopenharmony_ci
6375bd8deadSopenharmony_ci     If this texture shader stage is not consistent, it operates as if
6385bd8deadSopenharmony_ci     it is the NONE operation.
6395bd8deadSopenharmony_ci
6405bd8deadSopenharmony_ci     3.8.13.1.29  Offset HILO Texture Rectangle
6415bd8deadSopenharmony_ci
6425bd8deadSopenharmony_ci     The OFFSET_HILO_TEXTURE_RECTANGLE_NV shader operation operates
6435bd8deadSopenharmony_ci     identically to the OFFSET_HILO_TEXTURE_2D_NV shader operation except
6445bd8deadSopenharmony_ci     that the rectangle texture target is accessed rather than the 2D
6455bd8deadSopenharmony_ci     texture target.
6465bd8deadSopenharmony_ci
6475bd8deadSopenharmony_ci     If the texture unit's rectangle texture object (rather than the 2D
6485bd8deadSopenharmony_ci     texture object) is not consistent, then this texture shader stage
6495bd8deadSopenharmony_ci     is not consistent.
6505bd8deadSopenharmony_ci
6515bd8deadSopenharmony_ci     3.8.13.1.30  Offset Projective HILO Texture 2D
6525bd8deadSopenharmony_ci
6535bd8deadSopenharmony_ci     The OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV shader operation operates
6545bd8deadSopenharmony_ci     identically to the OFFSET_HILO_TEXTURE_2D_NV shader operation except
6555bd8deadSopenharmony_ci     that the perturbed texture coordinates s' and t' are computed with
6565bd8deadSopenharmony_ci     floating-point math as follows:
6575bd8deadSopenharmony_ci
6585bd8deadSopenharmony_ci       s' = s/q + a1 * HIprev + a3 * LOprev
6595bd8deadSopenharmony_ci       t' = t/q + a2 * HIprev + a4 * LOprev
6605bd8deadSopenharmony_ci
6615bd8deadSopenharmony_ci     Note the division of s and t by the current texture shader stage's
6625bd8deadSopenharmony_ci     q texture coordinate.
6635bd8deadSopenharmony_ci
6645bd8deadSopenharmony_ci     3.8.13.1.31  Offset Projective HILO Texture Rectangle
6655bd8deadSopenharmony_ci
6665bd8deadSopenharmony_ci     The OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV shader operation
6675bd8deadSopenharmony_ci     operates identically to the OFFSET_HILO_TEXTURE_RECTANGLE_NV shader
6685bd8deadSopenharmony_ci     operation except that the perturbed texture coordinates s' and t'
6695bd8deadSopenharmony_ci     are computed with floating-point math as follows:
6705bd8deadSopenharmony_ci
6715bd8deadSopenharmony_ci       s' = s/q + a1 * HIprev + a3 * LOprev
6725bd8deadSopenharmony_ci       t' = t/q + a2 * HIprev + a4 * LOprev
6735bd8deadSopenharmony_ci
6745bd8deadSopenharmony_ci     Note the division of s and t by the current texture shader stage's
6755bd8deadSopenharmony_ci     q texture coordinate.
6765bd8deadSopenharmony_ci
6775bd8deadSopenharmony_ci     3.8.13.1.32  Dependent HILO Texture 2D
6785bd8deadSopenharmony_ci
6795bd8deadSopenharmony_ci     The DEPENDENT_HILO_TEXTURE_2D_NV texture shader operation accesses
6805bd8deadSopenharmony_ci     the texture unit's 2D texture object (as described in section
6815bd8deadSopenharmony_ci     3.8.4, 3.8.5, and 3.8.6) using (HIprev, LOprev) for the 2D texture
6825bd8deadSopenharmony_ci     coordinates where HIprev and LOprev are the are the hi and lo
6835bd8deadSopenharmony_ci     components of a previous texture input's unsigned HILO texture
6845bd8deadSopenharmony_ci     shader result specified by the current texture shader stage's
6855bd8deadSopenharmony_ci     PREVIOUS_TEXTURE_INPUT_NV value.  The result of the texture access
6865bd8deadSopenharmony_ci     becomes both the shader result and texture unit RGBA result (see
6875bd8deadSopenharmony_ci     table 3.E).  The type of the shader result depends on the format
6885bd8deadSopenharmony_ci     type of the accessed texture.
6895bd8deadSopenharmony_ci
6905bd8deadSopenharmony_ci     If the texture unit's 2D texture object is not consistent, then
6915bd8deadSopenharmony_ci     this texture shader stage is not consistent.
6925bd8deadSopenharmony_ci
6935bd8deadSopenharmony_ci     If the previous texture input's texture shader result specified by
6945bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
6955bd8deadSopenharmony_ci     has a texture shader result type other than HILO with unsigned
6965bd8deadSopenharmony_ci     components, then this texture shader stage is not consistent.
6975bd8deadSopenharmony_ci
6985bd8deadSopenharmony_ci     If the previous texture input texture shader operation specified by
6995bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
7005bd8deadSopenharmony_ci     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
7015bd8deadSopenharmony_ci
7025bd8deadSopenharmony_ci     If the previous texture input texture shader result specified by
7035bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
7045bd8deadSopenharmony_ci     is invalid, then this texture shader stage is not consistent.
7055bd8deadSopenharmony_ci
7065bd8deadSopenharmony_ci     If the previous texture input shader stage specified by the current
7075bd8deadSopenharmony_ci     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
7085bd8deadSopenharmony_ci     consistent, then this texture shader stage is not consistent.
7095bd8deadSopenharmony_ci
7105bd8deadSopenharmony_ci     If this texture shader stage is not consistent, it operates as if
7115bd8deadSopenharmony_ci     it is the NONE operation.
7125bd8deadSopenharmony_ci
7135bd8deadSopenharmony_ci     3.8.13.1.33  Dependent Texture 3D
7145bd8deadSopenharmony_ci
7155bd8deadSopenharmony_ci     The DEPENDENT_RGB_TEXTURE_3D_NV texture shader operation accesses
7165bd8deadSopenharmony_ci     the texture unit's 3D texture object (as described in section
7175bd8deadSopenharmony_ci     3.8.4, 3.8.5, and 3.8.6) using (Rprev, Gprev, Bprev) for the 3D
7185bd8deadSopenharmony_ci     texture coordinates where Rprev, Gprev, and Bprev are the are the
7195bd8deadSopenharmony_ci     red, green, and blue components of a previous texture input's RGBA
7205bd8deadSopenharmony_ci     texture shader result specified by the current texture shader stage's
7215bd8deadSopenharmony_ci     PREVIOUS_TEXTURE_INPUT_NV value.  The result of the texture access
7225bd8deadSopenharmony_ci     becomes both the shader result and texture unit RGBA result (see
7235bd8deadSopenharmony_ci     table 3.E).  The type of the shader result depends on the format
7245bd8deadSopenharmony_ci     type of the accessed texture.
7255bd8deadSopenharmony_ci
7265bd8deadSopenharmony_ci     If the texture unit's 3D texture object is not consistent, then
7275bd8deadSopenharmony_ci     this texture shader stage is not consistent.
7285bd8deadSopenharmony_ci
7295bd8deadSopenharmony_ci     If the previous texture input's texture shader result specified
7305bd8deadSopenharmony_ci     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
7315bd8deadSopenharmony_ci     value has a texture shader result type other than RGBA (the
7325bd8deadSopenharmony_ci     DSDT_MAG_INTENSITY_NV base internal format does not count as an
7335bd8deadSopenharmony_ci     RGBA format type in this context), then this texture shader stage
7345bd8deadSopenharmony_ci     is not consistent.  
7355bd8deadSopenharmony_ci
7365bd8deadSopenharmony_ci     If the previous texture input's texture shader result specified
7375bd8deadSopenharmony_ci     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
7385bd8deadSopenharmony_ci     value has a texture shader result type of RGBA but any of the
7395bd8deadSopenharmony_ci     RGBA components are signed, then this texture shader stage is not
7405bd8deadSopenharmony_ci     consistent.
7415bd8deadSopenharmony_ci
7425bd8deadSopenharmony_ci     If the previous texture input texture shader operation specified by
7435bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
7445bd8deadSopenharmony_ci     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
7455bd8deadSopenharmony_ci
7465bd8deadSopenharmony_ci     If the previous texture input texture shader result specified by
7475bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
7485bd8deadSopenharmony_ci     is invalid, then this texture shader stage is not consistent.
7495bd8deadSopenharmony_ci
7505bd8deadSopenharmony_ci     If the previous texture input shader stage specified by the current
7515bd8deadSopenharmony_ci     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
7525bd8deadSopenharmony_ci     consistent, then this texture shader stage is not consistent.
7535bd8deadSopenharmony_ci
7545bd8deadSopenharmony_ci     If this texture shader stage is not consistent, it operates as if
7555bd8deadSopenharmony_ci     it is the NONE operation.
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci     3.8.13.1.34  Dependent Texture Cube Map
7585bd8deadSopenharmony_ci
7595bd8deadSopenharmony_ci     The DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV texture shader operation
7605bd8deadSopenharmony_ci     accesses the texture unit's cube map texture object (as described
7615bd8deadSopenharmony_ci     in section 3.8.4, 3.8.5, and 3.8.6) using (s',t',r').
7625bd8deadSopenharmony_ci
7635bd8deadSopenharmony_ci     When the RGB components of the previous texture input's RGBA texture
7645bd8deadSopenharmony_ci     shader result are all unsigned, s', t', and r' are computed as:
7655bd8deadSopenharmony_ci
7665bd8deadSopenharmony_ci       s' = 2*(Rprev - 0.5)
7675bd8deadSopenharmony_ci       t' = 2*(Gprev - 0.5)
7685bd8deadSopenharmony_ci       r' = 2*(Bprev - 0.5)
7695bd8deadSopenharmony_ci
7705bd8deadSopenharmony_ci     When the RGB components of the previous texture input's RGBA texture
7715bd8deadSopenharmony_ci     shader result are all signed, s', t', and r' are computed as:
7725bd8deadSopenharmony_ci
7735bd8deadSopenharmony_ci       s' = Rprev
7745bd8deadSopenharmony_ci       t' = Gprev
7755bd8deadSopenharmony_ci       r' = Bprev
7765bd8deadSopenharmony_ci
7775bd8deadSopenharmony_ci     where Rprev, Gprev, and Bprev are the are the red, green,
7785bd8deadSopenharmony_ci     and blue components of a previous texture input's RGBA texture
7795bd8deadSopenharmony_ci     shader result specified by the current texture shader stage's
7805bd8deadSopenharmony_ci     PREVIOUS_TEXTURE_INPUT_NV value.  The result of the texture access
7815bd8deadSopenharmony_ci     becomes both the shader result and texture unit RGBA result (see
7825bd8deadSopenharmony_ci     table 3.E).  The type of the shader result depends on the format
7835bd8deadSopenharmony_ci     type of the accessed texture.
7845bd8deadSopenharmony_ci
7855bd8deadSopenharmony_ci     If the texture unit's cube map texture object is not consistent,
7865bd8deadSopenharmony_ci     then this texture shader stage is not consistent.
7875bd8deadSopenharmony_ci
7885bd8deadSopenharmony_ci     If the previous texture input's texture shader result specified
7895bd8deadSopenharmony_ci     by the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV
7905bd8deadSopenharmony_ci     value has a texture shader result type other than RGBA (the
7915bd8deadSopenharmony_ci     DSDT_MAG_INTENSITY_NV base internal format does not count as an
7925bd8deadSopenharmony_ci     RGBA format type in this context), then this texture shader stage
7935bd8deadSopenharmony_ci     is not consistent.  
7945bd8deadSopenharmony_ci
7955bd8deadSopenharmony_ci     If the previous texture input texture shader operation specified by
7965bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
7975bd8deadSopenharmony_ci     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
7985bd8deadSopenharmony_ci
7995bd8deadSopenharmony_ci     If the previous texture input texture shader result specified by
8005bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
8015bd8deadSopenharmony_ci     is invalid, then this texture shader stage is not consistent.
8025bd8deadSopenharmony_ci
8035bd8deadSopenharmony_ci     If the previous texture input shader stage specified by the current
8045bd8deadSopenharmony_ci     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
8055bd8deadSopenharmony_ci     consistent, then this texture shader stage is not consistent.
8065bd8deadSopenharmony_ci
8075bd8deadSopenharmony_ci     If this texture shader stage is not consistent, it operates as if
8085bd8deadSopenharmony_ci     it is the NONE operation.
8095bd8deadSopenharmony_ci
8105bd8deadSopenharmony_ci     3.8.13.1.35  Dot Product Pass Through
8115bd8deadSopenharmony_ci
8125bd8deadSopenharmony_ci     The DOT_PRODUCT_PASS_THROUGH_NV texture shader operation converts a
8135bd8deadSopenharmony_ci     dot product result dotC into an RGBA color result (x,x,x,x) where
8145bd8deadSopenharmony_ci     x is dotC clamped to [0,1].  The texture shader result and texture
8155bd8deadSopenharmony_ci     unit RGBA result of this operation are both
8165bd8deadSopenharmony_ci     assigned the clamped RGBA color result.
8175bd8deadSopenharmony_ci
8185bd8deadSopenharmony_ci     dotC is the floating-point dot product result from the current
8195bd8deadSopenharmony_ci     texture shader stage.  dotC is computed in the identical manner
8205bd8deadSopenharmony_ci     used to compute the floating-point result of the DOT_PRODUCT_NV
8215bd8deadSopenharmony_ci     texture shader described in section 3.8.13.1.14.
8225bd8deadSopenharmony_ci
8235bd8deadSopenharmony_ci     This operation in no way depends on any of the texture unit's
8245bd8deadSopenharmony_ci     texture objects.
8255bd8deadSopenharmony_ci
8265bd8deadSopenharmony_ci     3.8.13.1.36  Dot Product Texture 1D
8275bd8deadSopenharmony_ci
8285bd8deadSopenharmony_ci     The DOT_PRODUCT_TEXTURE_1D_NV texture shader operation accesses the
8295bd8deadSopenharmony_ci     texture unit's 1D texture object (as described in sections 3.8.4,
8305bd8deadSopenharmony_ci     3.8.5, and 3.8.6) using dotC for the 1D texture coordinate.
8315bd8deadSopenharmony_ci     The result of the texture access becomes both the shader result and
8325bd8deadSopenharmony_ci     texture unit RGBA result (see table 3.E).  The type of the shader
8335bd8deadSopenharmony_ci     result depends on the format type of the accessed texture.
8345bd8deadSopenharmony_ci
8355bd8deadSopenharmony_ci     dotC is the floating-point dot product result from the current
8365bd8deadSopenharmony_ci     texture shader stage.  dotC is computed in the identical manner
8375bd8deadSopenharmony_ci     used to compute the floating-point result of the DOT_PRODUCT_NV
8385bd8deadSopenharmony_ci     texture shader described in section 3.8.13.1.14.
8395bd8deadSopenharmony_ci
8405bd8deadSopenharmony_ci     If the previous texture input texture object specified by the
8415bd8deadSopenharmony_ci     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
8425bd8deadSopenharmony_ci     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
8435bd8deadSopenharmony_ci     base internal format does not count as an RGBA format type in this
8445bd8deadSopenharmony_ci     context), then this texture shader stage is not consistent.  
8455bd8deadSopenharmony_ci
8465bd8deadSopenharmony_ci     If the previous texture input texture shader operation specified by
8475bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
8485bd8deadSopenharmony_ci     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
8495bd8deadSopenharmony_ci
8505bd8deadSopenharmony_ci     If the previous texture input texture shader result specified by
8515bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
8525bd8deadSopenharmony_ci     is invalid, then this texture shader stage is not consistent.
8535bd8deadSopenharmony_ci
8545bd8deadSopenharmony_ci     If the previous texture input shader stage specified by the current
8555bd8deadSopenharmony_ci     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
8565bd8deadSopenharmony_ci     consistent, then this texture shader stage is not consistent.
8575bd8deadSopenharmony_ci
8585bd8deadSopenharmony_ci     If the texture unit's 1D texture object is not consistent, then
8595bd8deadSopenharmony_ci     this texture shader stage is not consistent.
8605bd8deadSopenharmony_ci
8615bd8deadSopenharmony_ci     If this texture shader stage is not consistent, it operates as if
8625bd8deadSopenharmony_ci     it is the NONE operation.
8635bd8deadSopenharmony_ci
8645bd8deadSopenharmony_ci     3.8.13.1.37  Dot Product Affine Depth Replace
8655bd8deadSopenharmony_ci
8665bd8deadSopenharmony_ci     The DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV texture shader operation
8675bd8deadSopenharmony_ci     replaces the incoming fragments depth (in window coordinates, after
8685bd8deadSopenharmony_ci     polygon offset and before conversion to fixed-point, i.e. in the
8695bd8deadSopenharmony_ci     [0,1] range) with a new depth value.  The new depth is computed
8705bd8deadSopenharmony_ci     as follows:
8715bd8deadSopenharmony_ci
8725bd8deadSopenharmony_ci       depth = dotC
8735bd8deadSopenharmony_ci
8745bd8deadSopenharmony_ci     dotC is the floating-point dot product result from the current
8755bd8deadSopenharmony_ci     texture shader stage.  dotC is computed in the identical manner
8765bd8deadSopenharmony_ci     used to compute the floating-point result of the DOT_PRODUCT_NV
8775bd8deadSopenharmony_ci     texture shader described in section 3.8.13.1.14.  Note that there
8785bd8deadSopenharmony_ci     is no divide to project the depth value as is the case with the
8795bd8deadSopenharmony_ci     projective DOT_PRODUCT_DEPTH_REPLACE_NV operation.
8805bd8deadSopenharmony_ci
8815bd8deadSopenharmony_ci     If the new depth value is outside of the range of the near and far
8825bd8deadSopenharmony_ci     depth range values, the fragment is rejected.
8835bd8deadSopenharmony_ci
8845bd8deadSopenharmony_ci     The texture unit RGBA result generated is always (0,0,0,0).
8855bd8deadSopenharmony_ci     The texture shader result is invalid.
8865bd8deadSopenharmony_ci
8875bd8deadSopenharmony_ci     If the previous texture input texture object specified by the
8885bd8deadSopenharmony_ci     current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has
8895bd8deadSopenharmony_ci     a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV
8905bd8deadSopenharmony_ci     base internal format does not count as an RGBA format type in this
8915bd8deadSopenharmony_ci     context), then this texture shader stage is not consistent.  
8925bd8deadSopenharmony_ci
8935bd8deadSopenharmony_ci     If the previous texture input texture shader operation specified by
8945bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
8955bd8deadSopenharmony_ci     is DOT_PRODUCT_NV, then this texture shader stage is not consistent.
8965bd8deadSopenharmony_ci
8975bd8deadSopenharmony_ci     If the previous texture input texture shader result specified by
8985bd8deadSopenharmony_ci     the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value
8995bd8deadSopenharmony_ci     is invalid, then this texture shader stage is not consistent.
9005bd8deadSopenharmony_ci
9015bd8deadSopenharmony_ci     If the previous texture input shader stage specified by the current
9025bd8deadSopenharmony_ci     texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not
9035bd8deadSopenharmony_ci     consistent, then this texture shader stage is not consistent.
9045bd8deadSopenharmony_ci
9055bd8deadSopenharmony_ci     If any previous texture shader stage operation is
9065bd8deadSopenharmony_ci     DOT_PRODUCT_DEPTH_REPLACE_NV or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV
9075bd8deadSopenharmony_ci     and that previous stage is consistent, then this texture shader
9085bd8deadSopenharmony_ci     stage is not consistent.  (This eliminates the potential for two
9095bd8deadSopenharmony_ci     stages to each be performing a depth replace operation.)
9105bd8deadSopenharmony_ci
9115bd8deadSopenharmony_ci     If this texture shader stage is not consistent, it operates as if
9125bd8deadSopenharmony_ci     it is the NONE operation.
9135bd8deadSopenharmony_ci
9145bd8deadSopenharmony_ci     This operation in no way depends on any of the texture unit's
9155bd8deadSopenharmony_ci     texture objects."
9165bd8deadSopenharmony_ci
9175bd8deadSopenharmony_ci     3.8.13.2  Texture Shader Restrictions
9185bd8deadSopenharmony_ci
9195bd8deadSopenharmony_ci     Amend the first two paragraphs in this section to include the new
9205bd8deadSopenharmony_ci     texture shader operations:
9215bd8deadSopenharmony_ci
9225bd8deadSopenharmony_ci     "There are various restrictions on possible texture shader
9235bd8deadSopenharmony_ci     configurations.  These restrictions are described in this section.
9245bd8deadSopenharmony_ci
9255bd8deadSopenharmony_ci     The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV
9265bd8deadSopenharmony_ci     parameter for texture unit 0 is assigned one of
9275bd8deadSopenharmony_ci     OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
9285bd8deadSopenharmony_ci     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
9295bd8deadSopenharmony_ci     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
9305bd8deadSopenharmony_ci     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
9315bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
9325bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
9335bd8deadSopenharmony_ci     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV,
9345bd8deadSopenharmony_ci     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV,
9355bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_2D, OFFSET_PROJECTIVE_TEXTURE_2D_SCALE,
9365bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE,
9375bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE, OFFSET_HILO_TEXTURE_2D,
9385bd8deadSopenharmony_ci     OFFSET_HILO_TEXTURE_RECTANGLE, OFFSET_HILO_PROJECTIVE_TEXTURE_2D,
9395bd8deadSopenharmony_ci     OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE, DEPENDENT_HILO_TEXTURE_2D,
9405bd8deadSopenharmony_ci     DEPENDENT_RGB_TEXTURE_3D, DEPENDENT_RGB_TEXTURE_CUBE_MAP,
9415bd8deadSopenharmony_ci     DOT_PRODUCT_PASS_THROUGH, DOT_PRODUCT_TEXTURE_1D, or
9425bd8deadSopenharmony_ci     DOT_PRODUCT_AFFINE_DEPTH_REPLACE.  Each of these texture shaders
9435bd8deadSopenharmony_ci     requires a previous texture shader result that is not possible for
9445bd8deadSopenharmony_ci     texture unit 0.  Therefore these shaders are disallowed for texture
9455bd8deadSopenharmony_ci     unit 0."
9465bd8deadSopenharmony_ci
9475bd8deadSopenharmony_ci     3.8.13.3  Required State
9485bd8deadSopenharmony_ci
9495bd8deadSopenharmony_ci     Amend the first paragraph in this section to account for the 9 new
9505bd8deadSopenharmony_ci     texture shader operations and the new "dot product third component"
9515bd8deadSopenharmony_ci     state:
9525bd8deadSopenharmony_ci
9535bd8deadSopenharmony_ci     "The state required for texture shaders consists of a single bit to
9545bd8deadSopenharmony_ci     indicate whether or not texture shaders are enabled, a vector of
9555bd8deadSopenharmony_ci     three floating-point values for the constant eye vector, and n sets
9565bd8deadSopenharmony_ci     of per-texture unit state where n is the implementation-dependent
9575bd8deadSopenharmony_ci     number of supported texture units.  The set of per-texture unit
9585bd8deadSopenharmony_ci     texture shader state consists of the thirty-seven-valued integer
9595bd8deadSopenharmony_ci     indicating the texture shader operation, four two-valued integers
9605bd8deadSopenharmony_ci     indicating the cull modes, an integer indicating the previous texture
9615bd8deadSopenharmony_ci     unit input, a two-valued integer indicating the RGBA unsigned dot
9625bd8deadSopenharmony_ci     product mapping mode, a 2x2 floating-point matrix indicating the
9635bd8deadSopenharmony_ci     texture offset transform, a floating-point value indicating the
9645bd8deadSopenharmony_ci     texture offset scale, a floating-point value indicating the texture
9655bd8deadSopenharmony_ci     offset bias, and a bit to indicate whether or not the texture shader
9665bd8deadSopenharmony_ci     stage is consistent."
9675bd8deadSopenharmony_ci
9685bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
9695bd8deadSopenharmony_ciand the Frame Buffer)
9705bd8deadSopenharmony_ci
9715bd8deadSopenharmony_ci     None
9725bd8deadSopenharmony_ci
9735bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions)
9745bd8deadSopenharmony_ci
9755bd8deadSopenharmony_ci     None
9765bd8deadSopenharmony_ci
9775bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests)
9785bd8deadSopenharmony_ci
9795bd8deadSopenharmony_ci     None
9805bd8deadSopenharmony_ci
9815bd8deadSopenharmony_ciAdditions to the GLX Specification
9825bd8deadSopenharmony_ci
9835bd8deadSopenharmony_ci     None
9845bd8deadSopenharmony_ci
9855bd8deadSopenharmony_ciDependencies on other specifications
9865bd8deadSopenharmony_ci
9875bd8deadSopenharmony_ci     Same as the NV_texture_shader extension.
9885bd8deadSopenharmony_ci
9895bd8deadSopenharmony_ciErrors
9905bd8deadSopenharmony_ci
9915bd8deadSopenharmony_ci     INVALID_OPERATION is generated when TexImage1D, TexImage2D,
9925bd8deadSopenharmony_ci     or TexImage3D are called and the format is HILO_NV and the
9935bd8deadSopenharmony_ci     internalformat is not one of HILO_NV, HILO8_NV, HILO16_NV,
9945bd8deadSopenharmony_ci     SIGNED_HILO_NV, SIGNED_HILO8_NV, SIGNED_HILO16_NV; or if
9955bd8deadSopenharmony_ci     the internalformat is one of HILO_NV, HILO8_NV, HILO16_NV,
9965bd8deadSopenharmony_ci     SIGNED_HILO_NV, SIGNED_HILO8_NV or SIGNED_HILO16_NV and the format
9975bd8deadSopenharmony_ci     is not HILO_NV.
9985bd8deadSopenharmony_ci
9995bd8deadSopenharmony_ci     INVALID_OPERATION is generated when CopyTexImage2D, CopyTexImage1D,
10005bd8deadSopenharmony_ci     CopyTexSubImage3D, CopyTexSubImage2D, or CopyTexSubImage1D is called
10015bd8deadSopenharmony_ci     and the internal format of the texture array to which the pixels are
10025bd8deadSopenharmony_ci     to be copied is one of HILO_NV, HILO8_NV, HILO16_NV, SIGNED_HILO_NV,
10035bd8deadSopenharmony_ci     SIGNED_HILO8_NV, SIGNED_HILO16_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV,
10045bd8deadSopenharmony_ci     DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV.
10055bd8deadSopenharmony_ci
10065bd8deadSopenharmony_ci     INVALID_OPERATION is generated when TexEnv is called and the
10075bd8deadSopenharmony_ci     SHADER_OPERATION_NV parameter for texture unit 0 is assigned
10085bd8deadSopenharmony_ci     one of OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV,
10095bd8deadSopenharmony_ci     OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV,
10105bd8deadSopenharmony_ci     DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV,
10115bd8deadSopenharmony_ci     DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV,
10125bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV,
10135bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV,
10145bd8deadSopenharmony_ci     DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV.
10155bd8deadSopenharmony_ci     DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV,
10165bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_2D_NV,
10175bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV,
10185bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV,
10195bd8deadSopenharmony_ci     OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV,
10205bd8deadSopenharmony_ci     OFFSET_HILO_TEXTURE_2D_NV, OFFSET_HILO_TEXTURE_RECTANGLE_NV,
10215bd8deadSopenharmony_ci     OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV,
10225bd8deadSopenharmony_ci     OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV,
10235bd8deadSopenharmony_ci     DEPENDENT_HILO_TEXTURE_2D_NV, DEPENDENT_RGB_TEXTURE_3D_NV,
10245bd8deadSopenharmony_ci     DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_PASS_THROUGH_NV,
10255bd8deadSopenharmony_ci     DOT_PRODUCT_TEXTURE_1D_NV, or DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV."
10265bd8deadSopenharmony_ci
10275bd8deadSopenharmony_ciNew State
10285bd8deadSopenharmony_ci
10295bd8deadSopenharmony_ciUPDATE lines in Table 6.TextureShaders.
10305bd8deadSopenharmony_ci
10315bd8deadSopenharmony_ciGet Value                Type    Get Command  Initial Value         Description          Sec     Attribute
10325bd8deadSopenharmony_ci-----------------------  ------  -----------  --------------------  -------------------  ------  ---------
10335bd8deadSopenharmony_ciSHADER_OPERATION_NV      TxZ37   GetTexEnviv  NONE                  Texture shader       3.8.13  texture
10345bd8deadSopenharmony_ci                                                                    operation
10355bd8deadSopenharmony_ciRGBA_UNSIGNED_-          TxZ3    GetTexEnviv  UNSIGNED_IDENTITY_NV  Texture shader RGBA  3.8.13  texture
10365bd8deadSopenharmony_ci  DOT_PRODUCT_MAPPING_NV                                            dot product mapping
10375bd8deadSopenharmony_ci
10385bd8deadSopenharmony_ci* SHADER_OPERATION_NV: Z21 in NV_texture_shader (and Z23 in
10395bd8deadSopenharmony_ci  NV_texture_shader2) is now Z37 with NV_texture_shader3.
10405bd8deadSopenharmony_ci
10415bd8deadSopenharmony_ci* RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV: Z2 in NV_texture_shader is now
10425bd8deadSopenharmony_ci  Z3 with NV_texture_shader3.
10435bd8deadSopenharmony_ci
10445bd8deadSopenharmony_ci[ The "Tx" type prefix means that the state is per-texture unit. ]
10455bd8deadSopenharmony_ci
10465bd8deadSopenharmony_ci[ The "Zn" type is an n-valued integer where n is the
10475bd8deadSopenharmony_ci  implementation-dependent number of texture units supported.]
10485bd8deadSopenharmony_ci
10495bd8deadSopenharmony_ciNew Implementation State
10505bd8deadSopenharmony_ci
10515bd8deadSopenharmony_ci     None
10525bd8deadSopenharmony_ci
10535bd8deadSopenharmony_ciRevision History
10545bd8deadSopenharmony_ci
10555bd8deadSopenharmony_ci     November 15, 2001 - document that depth replace is after polygon
10565bd8deadSopenharmony_ci     offset.
10575bd8deadSopenharmony_ci
10585bd8deadSopenharmony_ci     June 5, 2002 - Driver implementations before this date incorrectly
10595bd8deadSopenharmony_ci     swap the HI and LO components of GL_HILO8_NV and GL_SIGNED_HILO8_NV
10605bd8deadSopenharmony_ci     textures.  Drivers after this date have fixed the problem and match
10615bd8deadSopenharmony_ci     the specified behavior.
10625bd8deadSopenharmony_ci
10635bd8deadSopenharmony_ci     March 5, 2007 - Corrected some enum names.
10645bd8deadSopenharmony_ci
1065