15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_texture_shader2 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NV_texture_shader2 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, 1999, 2000, 2001. 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciIP Status 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci NVIDIA Proprietary. 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciVersion 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci NVIDIA Date: April 29, 2004 245bd8deadSopenharmony_ci Version: 9 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ciNumber 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci 231 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 extension specification. 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci Requires support for the NV_texture_shader extension. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciOverview 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci This extension extends the NV_texture_shader functionality to 405bd8deadSopenharmony_ci support texture shader operations for 3D textures. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci See the NV_texture_shader extension for information about the 435bd8deadSopenharmony_ci texture shader operational model. 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci The two new texture shader operations are: 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci <conventional textures> 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci 22. TEXTURE_3D - Accesses a 3D texture via (s/q,t/q,r/q). 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci <dot product textures> 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci 23. DOT_PRODUCT_TEXTURE_3D_NV - When preceded by two DOT_PRODUCT_NV 545bd8deadSopenharmony_ci programs in the previous two texture shader stages, computes a 555bd8deadSopenharmony_ci third similar dot product and composes the three dot products 565bd8deadSopenharmony_ci into (s,t,r) texture coordinate set to access a 3D non-projective 575bd8deadSopenharmony_ci texture. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ciIssues 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci Why a separate extension? 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci Not all implementations of NV_texture_shader will support 3D 645bd8deadSopenharmony_ci textures in hardware. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci Breaking this extension out into a distinct extension allows OpenGL 675bd8deadSopenharmony_ci programs that only would use 3D textures if they are supported 685bd8deadSopenharmony_ci in hardware to determine whether hardware support is available by 695bd8deadSopenharmony_ci explicitly looking for the NV_texture_shader2 extension. 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci What if an implementation wanted to support NV_texture_shader2 725bd8deadSopenharmony_ci operations within a software rasterizer? 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci Implementations should be free to implement the 3D texture texture 755bd8deadSopenharmony_ci shader operations in software. In this case, the implementation 765bd8deadSopenharmony_ci should NOT advertise the NV_texture_shader2 extension, but should 775bd8deadSopenharmony_ci still accept the GL_TEXTURE_3D and GL_DOT_PRODUCT_TEXTURE_3D_NV 785bd8deadSopenharmony_ci texture shader operations without an error. Likewise, the 795bd8deadSopenharmony_ci glTexImage3D command should accept the new internal texture formats, 805bd8deadSopenharmony_ci formats, and types allowed by this extension should be accepted 815bd8deadSopenharmony_ci without an error. 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci When NV_texture_shader2 is not advertised in the GL_EXTENSIONS 845bd8deadSopenharmony_ci string, but the extension functionality works without GL errors, 855bd8deadSopenharmony_ci programs should expect that these two texture shader operations 865bd8deadSopenharmony_ci are slow. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ciNew Procedures and Functions 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci None. 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ciNew Tokens 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci When the <target> and <pname> parameters of TexEnvf, TexEnvfv, 955bd8deadSopenharmony_ci TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV 965bd8deadSopenharmony_ci respectively, then the value of <param> or the value pointed to by 975bd8deadSopenharmony_ci <params> may be: 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci TEXTURE_3D 1005bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_3D_NV 0x86EF 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci Accepted by the <format> parameter of TexImage3D and TexSubImage3D: 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci HILO_NV 0x86F4 1055bd8deadSopenharmony_ci DSDT_NV 0x86F5 1065bd8deadSopenharmony_ci DSDT_MAG_NV 0x86F6 1075bd8deadSopenharmony_ci DSDT_MAG_VIB_NV 0x86F7 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci Accepted by the <type> parameter of TexImage3D and TexSubImage3D: 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci UNSIGNED_INT_S8_S8_8_8_NV 0x86DA 1125bd8deadSopenharmony_ci UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage3D: 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci SIGNED_RGBA_NV 0x86FB 1175bd8deadSopenharmony_ci SIGNED_RGBA8_NV 0x86FC 1185bd8deadSopenharmony_ci SIGNED_RGB_NV 0x86FE 1195bd8deadSopenharmony_ci SIGNED_RGB8_NV 0x86FF 1205bd8deadSopenharmony_ci SIGNED_LUMINANCE_NV 0x8701 1215bd8deadSopenharmony_ci SIGNED_LUMINANCE8_NV 0x8702 1225bd8deadSopenharmony_ci SIGNED_LUMINANCE_ALPHA_NV 0x8703 1235bd8deadSopenharmony_ci SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 1245bd8deadSopenharmony_ci SIGNED_ALPHA_NV 0x8705 1255bd8deadSopenharmony_ci SIGNED_ALPHA8_NV 0x8706 1265bd8deadSopenharmony_ci SIGNED_INTENSITY_NV 0x8707 1275bd8deadSopenharmony_ci SIGNED_INTENSITY8_NV 0x8708 1285bd8deadSopenharmony_ci SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C 1295bd8deadSopenharmony_ci SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage3D: 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci HILO_NV 1345bd8deadSopenharmony_ci HILO16_NV 0x86F8 1355bd8deadSopenharmony_ci SIGNED_HILO_NV 0x86F9 1365bd8deadSopenharmony_ci SIGNED_HILO16_NV 0x86FA 1375bd8deadSopenharmony_ci DSDT_NV 1385bd8deadSopenharmony_ci DSDT8_NV 0x8709 1395bd8deadSopenharmony_ci DSDT_MAG_NV 1405bd8deadSopenharmony_ci DSDT8_MAG8_NV 0x870A 1415bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV 0x86DC 1425bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV 0x870B 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci None 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization) 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci -- Section 3.8 "Texturing" 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci Replace the third paragraph (amended by the NV_texture_shader 1535bd8deadSopenharmony_ci extension) with the following that includes 3D texture references: 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci "The alternative to conventional texturing is the texture shaders 1565bd8deadSopenharmony_ci mechanism. When texture shaders are enabled, each texture unit 1575bd8deadSopenharmony_ci uses one of twenty-three texture shader operations. Twenty of the 1585bd8deadSopenharmony_ci twenty-three shader operations map an (s,t,r,q) texture coordinate 1595bd8deadSopenharmony_ci set to an RGBA color. Of these, four texture shader operations 1605bd8deadSopenharmony_ci directly correspond to the 1D, 2D, 3D, and cube map conventional 1615bd8deadSopenharmony_ci texturing operations. Depending on the texture shader operation, 1625bd8deadSopenharmony_ci the mapping from the (s,t,r,q) texture coordinate set to an RGBA 1635bd8deadSopenharmony_ci color may depend on the given texture unit's currently bound 1645bd8deadSopenharmony_ci texture object state and/or the results of previous texture 1655bd8deadSopenharmony_ci shader operations. The three remaining texture shader operations 1665bd8deadSopenharmony_ci respectively provide a fragment culling mechanism based on texture 1675bd8deadSopenharmony_ci coordinates, a means to replace the fragment depth value, and a dot 1685bd8deadSopenharmony_ci product operation that computes a floating-point value for use by 1695bd8deadSopenharmony_ci subsequent texture shaders. The specifics of each texture shader 1705bd8deadSopenharmony_ci operation are described in section 3.8.12." 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci -- Section 3.8.2 "Alternate Texture Image Specification Commands" 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci Amend the following text inserted by NV_texture_shader after the 1755bd8deadSopenharmony_ci six paragraph to include 3D texture references: 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci "CopyTexSubImage3D, CopyTexSubImage2D, and CopyTexSubImage1D generate 1785bd8deadSopenharmony_ci the error INVALID_OPERATION if the internal format of the texture 1795bd8deadSopenharmony_ci array to which the pixels are to be copied is one of HILO_NV, 1805bd8deadSopenharmony_ci HILO16_NV, SIGNED_HILO_NV, SIGNED_HILO16_NV, DSDT_NV, DSDT8_NV, 1815bd8deadSopenharmony_ci DSDT_MAG_NV, DSDT8_MAG8_NV, DSDT_MAG_INTENSITY_NV, or 1825bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV. 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci TexSubImage3D, TexSubImage2D, and TexSubImage1D generate the error 1855bd8deadSopenharmony_ci INVALID_OPERATION if the internal format of the texture array 1865bd8deadSopenharmony_ci to which the texels are to be copied has a different format type 1875bd8deadSopenharmony_ci (according to table 3.15) than the format type of the texels being 1885bd8deadSopenharmony_ci specified. Specifically, if the base internal format is not one of 1895bd8deadSopenharmony_ci HILO_NV, DSDT_NV, DSDT_MAG_NV, or DSDT_INTENSITY_NV, then the format 1905bd8deadSopenharmony_ci parameter must be one of COLOR_INDEX, RED, GREEN, BLUE, ALPHA, 1915bd8deadSopenharmony_ci RGB, RGBA, LUMINANCE, or LUMINANCE_ALPHA; if the base internal 1925bd8deadSopenharmony_ci format is HILO_NV, then the format parameter must be HILO_NV; 1935bd8deadSopenharmony_ci if the base internal format is DSDT_NV, then the format parameter 1945bd8deadSopenharmony_ci must be DSDT_NV; if the base internal format is DSDT_MAG_NV, then 1955bd8deadSopenharmony_ci the format parameter must be DSDT_MAG_NV; if the base internal 1965bd8deadSopenharmony_ci format is DSDT_MAG_INTENSITY_NV, the format parameter must be 1975bd8deadSopenharmony_ci DSDT_MAG_VIB_NV." 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci -- Section 3.8.13 "Texture Shaders" 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci Amend the designated paragraphs of the NV_texture_shader 2025bd8deadSopenharmony_ci specification to include discussion of 3D textures. 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci 1st paragraph: 2055bd8deadSopenharmony_ci 2065bd8deadSopenharmony_ci "Each texture unit is configured with one of twenty-three 2075bd8deadSopenharmony_ci texture shader operations. Several texture shader operations 2085bd8deadSopenharmony_ci require additional state. All per-texture shader stage state 2095bd8deadSopenharmony_ci is specified using the TexEnv commands with the target specified 2105bd8deadSopenharmony_ci as TEXTURE_SHADER_NV. The per-texture shader state is replicated 2115bd8deadSopenharmony_ci per texture unit so the texture unit selected by ActiveTextureARB 2125bd8deadSopenharmony_ci determines which texture unit's environment is modified by TexEnv 2135bd8deadSopenharmony_ci calls." 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci 3rd paragraph: 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci "When TexEnv is called with the target of TEXTURE_SHADER_NV, 2185bd8deadSopenharmony_ci SHADER_OPERATION_NV may be set to one of NONE, TEXTURE_1D, 2195bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP_ARB, PASS_THROUGH_NV, 2205bd8deadSopenharmony_ci CULL_FRAGMENT_NV, OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV, 2215bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV, 2225bd8deadSopenharmony_ci DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV, 2235bd8deadSopenharmony_ci DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV, 2245bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 2255bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 2265bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, or 2275bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. The semantics of each of 2285bd8deadSopenharmony_ci these shader operations is described in section 3.8.13.1. Not every 2295bd8deadSopenharmony_ci operation is supported in every texture unit. The restrictions for 2305bd8deadSopenharmony_ci how these shader operations can be configured in various texture 2315bd8deadSopenharmony_ci units are described in section 3.8.13.2." 2325bd8deadSopenharmony_ci 2335bd8deadSopenharmony_ci 3.8.13.1 Texture Shader Operations 2345bd8deadSopenharmony_ci 2355bd8deadSopenharmony_ci Amend tables 3.A, 3.B, 3.C, and 3.D in the NV_texture_shader 2365bd8deadSopenharmony_ci specification to include entries for 3D texture operations: 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci Table 3.A: 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci texture shader 2415bd8deadSopenharmony_citexture shader operation i previous texture input texture shader operation i-1 operation i-2 texture shader operation i+1 2425bd8deadSopenharmony_ci================================= ========================= =============================== ================ ================================ 2435bd8deadSopenharmony_ciTEXTURE_3D - - - - 2445bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 2455bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_3D_NV shader result type must shader operation shader operation - 2465bd8deadSopenharmony_ci be one of signed HILO, must be must be 2475bd8deadSopenharmony_ci unsigned HILO, all DOT_PRODUCT_NV DOT_PRODUCT_NV 2485bd8deadSopenharmony_ci signed RGBA, all 2495bd8deadSopenharmony_ci unsigned RGBA 2505bd8deadSopenharmony_ci--------------------------------- ------------------------- ------------------------------- ---------------- -------------------------------- 2515bd8deadSopenharmony_ci 2525bd8deadSopenharmony_ci Table 3.B: 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_citexture shader operation i texture unit i 2555bd8deadSopenharmony_ci================================= ======================================= 2565bd8deadSopenharmony_ciTEXTURE_3D 3D target must be consistent 2575bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 2585bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_3D_NV 3D target must be consistent 2595bd8deadSopenharmony_ci--------------------------------- --------------------------------------- 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci Table 3.C: 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci uses uses uses uses uses offset uses 2645bd8deadSopenharmony_ci texture stage stage stage previous uses offset texture const 2655bd8deadSopenharmony_ci coordinate texture result result result texture cull texture 2D scale eye 2665bd8deadSopenharmony_citexture shader operation i set usage target i-1 i-2 i+1 input modes 2D matrix and bias vector 2675bd8deadSopenharmony_ci================================= ========== ========= ====== ====== ====== ======== ===== ========= ======== ====== 2685bd8deadSopenharmony_ciTEXTURE_3D s,t,r,q 3D - - - - - - - - 2695bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 2705bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_3D_NV s,t,r 3D y y - y - - - - 2715bd8deadSopenharmony_ci--------------------------------- ---------- --------- ------ ------ ------ -------- ----- --------- -------- ------ 2725bd8deadSopenharmony_ci 2735bd8deadSopenharmony_ci Table 3.D: 2745bd8deadSopenharmony_ci 2755bd8deadSopenharmony_citexture shader operation i shader stage result type shader stage result texture unit RGBA color result 2765bd8deadSopenharmony_ci================================= ============================= =================================== ====================================== 2775bd8deadSopenharmony_ciTEXTURE_3D matches 3D target type filtered 3D target texel if 3D target texture type is RGBA, 2785bd8deadSopenharmony_ci filtered 3D target texel, 2795bd8deadSopenharmony_ci else (0,0,0,0) 2805bd8deadSopenharmony_ci--------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 2815bd8deadSopenharmony_ciDOT_PRODUCT_TEXTURE_3D_NV matches 3D target type filtered 3D target texel if 3D target texture type is RGBA, 2825bd8deadSopenharmony_ci filtered 3D target texel, 2835bd8deadSopenharmony_ci else (0,0,0,0) 2845bd8deadSopenharmony_ci------------------------------- ----------------------------- ----------------------------------- -------------------------------------- 2855bd8deadSopenharmony_ci 2865bd8deadSopenharmony_ci Add the following new sections specifying new 3D texture operations: 2875bd8deadSopenharmony_ci 2885bd8deadSopenharmony_ci 3.8.13.1.22 3D Projective Texturing 2895bd8deadSopenharmony_ci 2905bd8deadSopenharmony_ci The TEXTURE_3D texture shader operation accesses the texture unit's 2915bd8deadSopenharmony_ci 3D texture object (as described in sections 3.8.4, 3.8.5, and 3.8.6) 2925bd8deadSopenharmony_ci using (s/q,t/q,r/q) for the 3D texture coordinates where s, t, r, 2935bd8deadSopenharmony_ci and q are the homogeneous texture coordinates for the texture unit. 2945bd8deadSopenharmony_ci The result of the texture access becomes both the shader result and 2955bd8deadSopenharmony_ci texture unit RGBA result (see table 3.E). The type of the shader 2965bd8deadSopenharmony_ci result depends on the format type of the accessed texture. This mode 2975bd8deadSopenharmony_ci is equivalent to conventional texturing's 3D texture target. 2985bd8deadSopenharmony_ci 2995bd8deadSopenharmony_ci If the texture unit's 3D texture object is not consistent, then 3005bd8deadSopenharmony_ci this texture shader stage is not consistent. 3015bd8deadSopenharmony_ci 3025bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 3035bd8deadSopenharmony_ci it is the NONE operation. 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ci 3.8.13.1.23 Dot Product Texture 3D 3065bd8deadSopenharmony_ci 3075bd8deadSopenharmony_ci The DOT_PRODUCT_TEXTURE_3D_NV texture shader operation accesses the 3085bd8deadSopenharmony_ci texture unit's 3D texture object (as described in sections 3.8.4, 3095bd8deadSopenharmony_ci 3.8.5, and 3.8.6) using (dotPP,dotP,dotC) for the 3D texture 3105bd8deadSopenharmony_ci coordinates. The result of the texture access becomes both 3115bd8deadSopenharmony_ci the shader result and texture unit RGBA result (see table 3.E). 3125bd8deadSopenharmony_ci The type of the shader result depends on the format type of the 3135bd8deadSopenharmony_ci accessed texture. 3145bd8deadSopenharmony_ci 3155bd8deadSopenharmony_ci Assuming that i is the current texture shader stage, dotPP is the 3165bd8deadSopenharmony_ci floating-point dot product texture shader result from the i-2 3175bd8deadSopenharmony_ci texture shader stage, assuming the i-2 texture shader stage's 3185bd8deadSopenharmony_ci operation is DOT_PRODUCT_NV. dotP is the floating-point dot 3195bd8deadSopenharmony_ci product texture shader result from the i-1 texture shader stage, 3205bd8deadSopenharmony_ci assuming the i-1 texture shader stage's operation is DOT_PRODUCT_NV. 3215bd8deadSopenharmony_ci dotC is the floating-point dot product result from the current 3225bd8deadSopenharmony_ci texture shader stage. dotC is computed in the identical manner 3235bd8deadSopenharmony_ci used to compute the floating-point result of the DOT_PRODUCT_NV 3245bd8deadSopenharmony_ci texture shader described in section 3.8.13.1.14. 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci If the previous texture input texture object specified by the 3275bd8deadSopenharmony_ci current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value has 3285bd8deadSopenharmony_ci a format type other than RGBA or HILO (the DSDT_MAG_INTENSITY_NV 3295bd8deadSopenharmony_ci base internal format does not count as an RGBA format type in this 3305bd8deadSopenharmony_ci context), then this texture shader stage is not consistent. 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci If the previous texture input texture shader operation specified by 3335bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 3345bd8deadSopenharmony_ci is DOT_PRODUCT_NV, then this texture shader stage is not consistent. 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci If the previous texture input texture shader result specified by 3375bd8deadSopenharmony_ci the current texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value 3385bd8deadSopenharmony_ci is invalid, then this texture shader stage is not consistent. 3395bd8deadSopenharmony_ci 3405bd8deadSopenharmony_ci If the previous texture input shader stage specified by the current 3415bd8deadSopenharmony_ci texture shader stage's PREVIOUS_TEXTURE_INPUT_NV value is not 3425bd8deadSopenharmony_ci consistent, then this texture shader stage is not consistent. 3435bd8deadSopenharmony_ci 3445bd8deadSopenharmony_ci If either the i-1 or i-2 texture shader stage operation is not 3455bd8deadSopenharmony_ci DOT_PRODUCT_NV, then this texture shader stage is not consistent. 3465bd8deadSopenharmony_ci 3475bd8deadSopenharmony_ci If either the i-1 or i-2 texture shader stage is not consistent, then 3485bd8deadSopenharmony_ci this texture shader stage is not consistent. 3495bd8deadSopenharmony_ci 3505bd8deadSopenharmony_ci If the texture unit's 3D texture object is not consistent, then 3515bd8deadSopenharmony_ci this texture shader stage is not consistent. 3525bd8deadSopenharmony_ci 3535bd8deadSopenharmony_ci If this texture shader stage is not consistent, it operates as if 3545bd8deadSopenharmony_ci it is the NONE operation. 3555bd8deadSopenharmony_ci 3565bd8deadSopenharmony_ci 3.8.13.2 Texture Shader Restrictions 3575bd8deadSopenharmony_ci 3585bd8deadSopenharmony_ci Amend the first four paragraphs in this section to include 3D 3595bd8deadSopenharmony_ci texture operations: 3605bd8deadSopenharmony_ci 3615bd8deadSopenharmony_ci "There are various restrictions on possible texture shader 3625bd8deadSopenharmony_ci configurations. These restrictions are described in this section. 3635bd8deadSopenharmony_ci 3645bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the SHADER_OPERATION_NV 3655bd8deadSopenharmony_ci parameter for texture unit 0 is assigned one of 3665bd8deadSopenharmony_ci OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV, 3675bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV, 3685bd8deadSopenharmony_ci DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV, 3695bd8deadSopenharmony_ci DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV, 3705bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 3715bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 3725bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 3735bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. Each of these 3745bd8deadSopenharmony_ci texture shaders requires a previous texture shader result that 3755bd8deadSopenharmony_ci is not possible for texture unit 0. Therefore these shaders are 3765bd8deadSopenharmony_ci disallowed for texture unit 0. 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the 3795bd8deadSopenharmony_ci SHADER_OPERATION_NV parameter for texture unit 3805bd8deadSopenharmony_ci 1 is assigned one of DOT_PRODUCT_DEPTH_REPLACE_NV, 3815bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 3825bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 3835bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 3845bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. Each of these texture 3855bd8deadSopenharmony_ci shaders requires either two previous texture shader results or 3865bd8deadSopenharmony_ci a dot product result that cannot be generated by texture unit 0. 3875bd8deadSopenharmony_ci Therefore these shaders are disallowed for texture unit 1. 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci The error INVALID_OPERATION occurs if the 3905bd8deadSopenharmony_ci SHADER_OPERATION_NV parameter for texture unit 3915bd8deadSopenharmony_ci 2 is assigned one of DOT_PRODUCT_TEXTURE_3D_NV, 3925bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 3935bd8deadSopenharmony_ci DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. Each of these texture 3945bd8deadSopenharmony_ci shaders requires three previous texture shader results. Therefore 3955bd8deadSopenharmony_ci these shaders are disallowed for texture unit 2." 3965bd8deadSopenharmony_ci 3975bd8deadSopenharmony_ci 3.8.13.3 Required State 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci Amend the first paragraph in this section to account for the 2 new 4005bd8deadSopenharmony_ci 3D texture shader operations: 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci "The state required for texture shaders consists of a single bit to 4035bd8deadSopenharmony_ci indicate whether or not texture shaders are enabled, a vector of 4045bd8deadSopenharmony_ci three floating-point values for the constant eye vector, and n sets 4055bd8deadSopenharmony_ci of per-texture unit state where n is the implementation-dependent 4065bd8deadSopenharmony_ci number of supported texture units. The set of per-texture unit 4075bd8deadSopenharmony_ci texture shader state consists of the twenty-three-valued integer 4085bd8deadSopenharmony_ci indicating the texture shader operation, four two-valued integers 4095bd8deadSopenharmony_ci indicating the cull modes, an integer indicating the previous texture 4105bd8deadSopenharmony_ci unit input, a two-valued integer indicating the RGBA unsigned dot 4115bd8deadSopenharmony_ci product mapping mode, a 2x2 floating-point matrix indicating the 4125bd8deadSopenharmony_ci texture offset transform, a floating-point value indicating the 4135bd8deadSopenharmony_ci texture offset scale, a floating-point value indicating the texture 4145bd8deadSopenharmony_ci offset bias, and a bit to indicate whether or not the texture shader 4155bd8deadSopenharmony_ci stage is consistent." 4165bd8deadSopenharmony_ci 4175bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations 4185bd8deadSopenharmony_ciand the Frame Buffer) 4195bd8deadSopenharmony_ci 4205bd8deadSopenharmony_ci None 4215bd8deadSopenharmony_ci 4225bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions) 4235bd8deadSopenharmony_ci 4245bd8deadSopenharmony_ci None 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests) 4275bd8deadSopenharmony_ci 4285bd8deadSopenharmony_ci None 4295bd8deadSopenharmony_ci 4305bd8deadSopenharmony_ciAdditions to the GLX Specification 4315bd8deadSopenharmony_ci 4325bd8deadSopenharmony_ci None 4335bd8deadSopenharmony_ci 4345bd8deadSopenharmony_ciDependencies on other specifications 4355bd8deadSopenharmony_ci 4365bd8deadSopenharmony_ci Same as the NV_texture_shader extension. 4375bd8deadSopenharmony_ci 4385bd8deadSopenharmony_ciErrors 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ci The following errors are updated to reflect 3D texture operations: 4415bd8deadSopenharmony_ci 4425bd8deadSopenharmony_ci INVALID_OPERATION is generated if a packed pixel format type listed 4435bd8deadSopenharmony_ci in table 3.8 is used with DrawPixels, ReadPixels, ColorTable, 4445bd8deadSopenharmony_ci ColorSubTable, ConvolutionFilter1D, ConvolutionFilter2D, 4455bd8deadSopenharmony_ci SeparableFilter2D, GetColorTable, GetConvolutionFilter, 4465bd8deadSopenharmony_ci GetSeparableFilter, GetHistogram, GetMinmax, TexImage1D, TexImage2D, 4475bd8deadSopenharmony_ci TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3d, or 4485bd8deadSopenharmony_ci GetTexImage but the format parameter does not match on of the allowed 4495bd8deadSopenharmony_ci Matching Pixel Formats listed in table 3.8 for the specified packed 4505bd8deadSopenharmony_ci type parameter. 4515bd8deadSopenharmony_ci 4525bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage1D, TexImage2D, 4535bd8deadSopenharmony_ci or TexImage3D are called and the format is HILO_NV and the 4545bd8deadSopenharmony_ci internalformat is not one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, 4555bd8deadSopenharmony_ci SIGNED_HILO16_NV; or if the internalformat is one of HILO_NV, 4565bd8deadSopenharmony_ci HILO16_NV, SIGNED_HILO_NV, or SIGNED_HILO16_NV and the format is 4575bd8deadSopenharmony_ci not HILO_NV. 4585bd8deadSopenharmony_ci 4595bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage3D, TexImage2D, 4605bd8deadSopenharmony_ci or TexImage1D is called and if the format is DSDT_NV and the 4615bd8deadSopenharmony_ci internalformat is not either DSDT_NV or DSDT8_NV; or if the internal 4625bd8deadSopenharmony_ci format is either DSDT_NV or DSDT8_NV and the format is not DSDT_NV. 4635bd8deadSopenharmony_ci 4645bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage3D, TexImage2D, or 4655bd8deadSopenharmony_ci TexImage1D is called and if the format is DSDT_MAG_NV and the 4665bd8deadSopenharmony_ci internalformat is not either DSDT_MAG_NV or DSDT8_MAG8_NV; or if 4675bd8deadSopenharmony_ci the internal format is either DSDT_MAG_NV or DSDT8_MAG8_NV and the 4685bd8deadSopenharmony_ci format is not DSDT_MAG_NV. 4695bd8deadSopenharmony_ci 4705bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexImage3D, TexImage2D, 4715bd8deadSopenharmony_ci or TexImage1D is called and if the format is DSDT_MAG_VIB_NV 4725bd8deadSopenharmony_ci and the internalformat is not either DSDT_MAG_INTENSITY_NV or 4735bd8deadSopenharmony_ci DSDT8_MAG8_INTENSITY8_NV; or if the internal format is either 4745bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV or DSDT8_MAG8_INTENSITY8_NV and the format 4755bd8deadSopenharmony_ci is not DSDT_MAG_VIB_NV. 4765bd8deadSopenharmony_ci 4775bd8deadSopenharmony_ci INVALID_OPERATION is generated when CopyTexImage2D, CopyTexImage1D, 4785bd8deadSopenharmony_ci CopyTexSubImage3D, CopyTexSubImage2D, or CopyTexSubImage1D is called 4795bd8deadSopenharmony_ci and the internal format of the texture array to which the pixels 4805bd8deadSopenharmony_ci are to be copied is one of HILO_NV, HILO16_NV, SIGNED_HILO_NV, 4815bd8deadSopenharmony_ci SIGNED_HILO16_NV, DSDT_NV, DSDT8_NV, DSDT_MAG_NV, DSDT8_MAG8_NV, 4825bd8deadSopenharmony_ci DSDT_MAG_INTENSITY_NV, or DSDT8_MAG8_INTENSITY8_NV. 4835bd8deadSopenharmony_ci 4845bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage3D, TexSubImage2D, or 4855bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 4865bd8deadSopenharmony_ci is not one of HILO_NV, DSDT_NV, DSDT_MAG_NV, or DSDT_INTENSITY_NV, 4875bd8deadSopenharmony_ci and the format parameter is not one of COLOR_INDEX, RED, 4885bd8deadSopenharmony_ci GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, or 4895bd8deadSopenharmony_ci LUMINANCE_ALPHA 4905bd8deadSopenharmony_ci 4915bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage3D, TexSubImage2D, or 4925bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 4935bd8deadSopenharmony_ci is HILO_NV and the format parameter is not HILO_NV. 4945bd8deadSopenharmony_ci 4955bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage3D, TexSubImage2D, or 4965bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 4975bd8deadSopenharmony_ci is DSDT_NV and the format parameter is not DSDT_NV. 4985bd8deadSopenharmony_ci 4995bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage3D, TexSubImage2D, or 5005bd8deadSopenharmony_ci TexSubImage1D is called and the texture array's base internal format 5015bd8deadSopenharmony_ci is DSDT_MAG_NV and the format parameter is not DSDT_MAG_NV. 5025bd8deadSopenharmony_ci 5035bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexSubImage3D, TexSubImage2D, 5045bd8deadSopenharmony_ci or TexSubImage1D is called and the texture array's base internal 5055bd8deadSopenharmony_ci format is DSDT_MAG_INTENSITY_NV and the format parameter is not 5065bd8deadSopenharmony_ci DSDT_MAG_VIRBANCE_NV. 5075bd8deadSopenharmony_ci 5085bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called and the 5095bd8deadSopenharmony_ci SHADER_OPERATION_NV parameter for texture unit 0 is assigned 5105bd8deadSopenharmony_ci one of OFFSET_TEXTURE_2D_NV, OFFSET_TEXTURE_2D_SCALE_NV, 5115bd8deadSopenharmony_ci OFFSET_TEXTURE_RECTANGLE_NV, OFFSET_TEXTURE_RECTANGLE_SCALE_NV, 5125bd8deadSopenharmony_ci DEPENDENT_AR_TEXTURE_2D_NV, DEPENDENT_GB_TEXTURE_2D_NV, 5135bd8deadSopenharmony_ci DOT_PRODUCT_NV, DOT_PRODUCT_DEPTH_REPLACE_NV, 5145bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 5155bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 5165bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV. 5175bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 5185bd8deadSopenharmony_ci 5195bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called 5205bd8deadSopenharmony_ci and the SHADER_OPERATION_NV parameter for texture 5215bd8deadSopenharmony_ci unit 1 is assigned one of DOT_PRODUCT_DEPTH_REPLACE_NV, 5225bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_2D_NV, DOT_PRODUCT_TEXTURE_RECTANGLE_NV, 5235bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_3D_NV, DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, 5245bd8deadSopenharmony_ci DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 5255bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 5265bd8deadSopenharmony_ci 5275bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called 5285bd8deadSopenharmony_ci and the SHADER_OPERATION_NV parameter for texture 5295bd8deadSopenharmony_ci unit 2 is assigned one of DOT_PRODUCT_TEXTURE_3D_NV, 5305bd8deadSopenharmony_ci DOT_PRODUCT_TEXTURE_CUBE_MAP_NV, DOT_PRODUCT_REFLECT_CUBE_MAP_NV, 5315bd8deadSopenharmony_ci or DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV. 5325bd8deadSopenharmony_ci 5335bd8deadSopenharmony_ci INVALID_OPERATION is generated when TexEnv is called and the 5345bd8deadSopenharmony_ci SHADER_OPERATION_NV parameter for texture unit n-1 (where n is the 5355bd8deadSopenharmony_ci number of supported texture units) is assigned either DOT_PRODUCT_NV 5365bd8deadSopenharmony_ci or DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV. 5375bd8deadSopenharmony_ci 5385bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 5395bd8deadSopenharmony_ci color format (one of RED, GREEN, BLUE, ALPHA, RGB, RGBA, LUMINANCE, 5405bd8deadSopenharmony_ci or LUMINANCE_ALPHA) when the texture image is of a format type (see 5415bd8deadSopenharmony_ci table 3.15) other than RGBA (the DSDT_MAG_INTENSITY_NV base internal 5425bd8deadSopenharmony_ci format does not count as an RGBA format type in this context). 5435bd8deadSopenharmony_ci 5445bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with 5455bd8deadSopenharmony_ci a format of HILO when the texture image is of a format type (see 5465bd8deadSopenharmony_ci table 3.15) other than HILO. 5475bd8deadSopenharmony_ci 5485bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 5495bd8deadSopenharmony_ci format of DSDT_NV when the texture image is of a base internal 5505bd8deadSopenharmony_ci format other than DSDT_NV. 5515bd8deadSopenharmony_ci 5525bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 5535bd8deadSopenharmony_ci format of DSDT_MAG_NV when the texture image is of a base internal 5545bd8deadSopenharmony_ci format other than DSDT_MAG_NV. 5555bd8deadSopenharmony_ci 5565bd8deadSopenharmony_ci INVALID_OPERATION is generated when GetTexImage is called with a 5575bd8deadSopenharmony_ci format of DSDT_MAG_VIBRANCE_NV when the texture image is of a base 5585bd8deadSopenharmony_ci internal format other than DSDT_MAG_INTENSITY_NV causes the error 5595bd8deadSopenharmony_ci INVALID_OPERATION." 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ciNew State 5625bd8deadSopenharmony_ci 5635bd8deadSopenharmony_ciTable 6.TextureShaders. Texture Shaders. 5645bd8deadSopenharmony_ci 5655bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 5665bd8deadSopenharmony_ci--------------------------- ------ ----------- -------------------- ------------------- ------ -------------- 5675bd8deadSopenharmony_ciSHADER_OPERATION_NV TxZ23 GetTexEnviv NONE Texture shader 3.8.13 texture 5685bd8deadSopenharmony_ci operation 5695bd8deadSopenharmony_ci 5705bd8deadSopenharmony_ci* Z21 in NV_texture_shader is now Z23 with NV_texture_shader2. 5715bd8deadSopenharmony_ci 5725bd8deadSopenharmony_ci[ The "Tx" type prefix means that the state is per-texture unit. ] 5735bd8deadSopenharmony_ci 5745bd8deadSopenharmony_ci[ The "Zn" type is an n-valued integer where n is the 5755bd8deadSopenharmony_ci implementation-dependent number of texture units supported.] 5765bd8deadSopenharmony_ci 5775bd8deadSopenharmony_ciNew Implementation State 5785bd8deadSopenharmony_ci 5795bd8deadSopenharmony_ci None 5805bd8deadSopenharmony_ci 5815bd8deadSopenharmony_ciRevision History 5825bd8deadSopenharmony_ci 5835bd8deadSopenharmony_ci None 584