15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_texture_array 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_texture_array 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Jon Leech, Khronos 165bd8deadSopenharmony_ci Mark Kilgard, NVIDIA 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciStatus 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Shipping for GeForce 8 Series (November 2006, Release 95) 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciVersion 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Last Modified Date: 9/16/2008 255bd8deadSopenharmony_ci Author revision: 8 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciNumber 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci 329 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ciDependencies 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ci This extension is written against the OpenGL 2.0 specification and version 345bd8deadSopenharmony_ci 1.10.59 of the OpenGL Shading Language specification. 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci This extension is interacts with EXT_framebuffer_object. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci This extension interacts with NV_geometry_program4. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci This extension interacts with NV_gpu_program4 or the OpenGL Shading 415bd8deadSopenharmony_ci Language, which provide the mechanisms necessary to access array textures. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci This extension interacts with EXT_texture_compression_s3tc and 445bd8deadSopenharmony_ci NV_texture_compression_vtc. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciOverview 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci This extension introduces the notion of one- and two-dimensional array 495bd8deadSopenharmony_ci textures. An array texture is a collection of one- and two-dimensional 505bd8deadSopenharmony_ci images of identical size and format, arranged in layers. A 515bd8deadSopenharmony_ci one-dimensional array texture is specified using TexImage2D; a 525bd8deadSopenharmony_ci two-dimensional array texture is specified using TexImage3D. The height 535bd8deadSopenharmony_ci (1D array) or depth (2D array) specify the number of layers in the image. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci An array texture is accessed as a single unit in a programmable shader, 565bd8deadSopenharmony_ci using a single coordinate vector. A single layer is selected, and that 575bd8deadSopenharmony_ci layer is then accessed as though it were a one- or two-dimensional 585bd8deadSopenharmony_ci texture. The layer used is specified using the "t" or "r" texture 595bd8deadSopenharmony_ci coordinate for 1D and 2D array textures, respectively. The layer 605bd8deadSopenharmony_ci coordinate is provided as an unnormalized floating-point value in the 615bd8deadSopenharmony_ci range [0,<n>-1], where <n> is the number of layers in the array texture. 625bd8deadSopenharmony_ci Texture lookups do not filter between layers, though such filtering can be 635bd8deadSopenharmony_ci achieved using programmable shaders. When mipmapping is used, each level 645bd8deadSopenharmony_ci of an array texture has the same number of layers as the base level; the 655bd8deadSopenharmony_ci number of layers is not reduced as the image size decreases. 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci Array textures can be rendered to by binding them to a framebuffer object 685bd8deadSopenharmony_ci (EXT_framebuffer_object). A single layer of an array texture can be bound 695bd8deadSopenharmony_ci using normal framebuffer object mechanisms, or an entire array texture can 705bd8deadSopenharmony_ci be bound and rendered to using the layered rendering mechanisms provided 715bd8deadSopenharmony_ci by NV_geometry_program4. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci This extension does not provide for the use of array textures with 745bd8deadSopenharmony_ci fixed-function fragment processing. Such support could be added by 755bd8deadSopenharmony_ci providing an additional extension allowing applications to pass the new 765bd8deadSopenharmony_ci target enumerants (TEXTURE_1D_ARRAY_EXT and TEXTURE_2D_ARRAY_EXT) to 775bd8deadSopenharmony_ci Enable and Disable. 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ciNew Procedures and Functions 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci void FramebufferTextureLayerEXT(enum target, enum attachment, 825bd8deadSopenharmony_ci uint texture, int level, int layer); 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ciNew Tokens 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci Accepted by the <target> parameter of TexParameteri, TexParameteriv, 875bd8deadSopenharmony_ci TexParameterf, TexParameterfv, GenerateMipmapEXT, and BindTexture: 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci TEXTURE_1D_ARRAY_EXT 0x8C18 905bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT 0x8C1A 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Accepted by the <target> parameter of TexImage3D, TexSubImage3D, 935bd8deadSopenharmony_ci CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT 965bd8deadSopenharmony_ci PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci Accepted by the <target> parameter of TexImage2D, TexSubImage2D, 995bd8deadSopenharmony_ci CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and 1005bd8deadSopenharmony_ci CompressedTexSubImage2D: 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci TEXTURE_1D_ARRAY_EXT 1035bd8deadSopenharmony_ci PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv 1065bd8deadSopenharmony_ci and GetFloatv: 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C 1095bd8deadSopenharmony_ci TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D 1105bd8deadSopenharmony_ci MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci Accepted by the <param> parameter of TexParameterf, TexParameteri, 1135bd8deadSopenharmony_ci TexParameterfv, and TexParameteriv when the <pname> parameter is 1145bd8deadSopenharmony_ci TEXTURE_COMPARE_MODE_ARB: 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci (Note: COMPARE_REF_DEPTH_TO_TEXTURE_EXT is simply an alias for the 1195bd8deadSopenharmony_ci existing COMPARE_R_TO_TEXTURE token in OpenGL 2.0; the alternate name 1205bd8deadSopenharmony_ci reflects the fact that the R coordinate is not always used.) 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage3D and 1235bd8deadSopenharmony_ci CompressedTexImage3D, and by the <format> parameter of 1245bd8deadSopenharmony_ci CompressedTexSubImage3D: 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci COMPRESSED_RGB_S3TC_DXT1_EXT 1275bd8deadSopenharmony_ci COMPRESSED_RGBA_S3TC_DXT1_EXT 1285bd8deadSopenharmony_ci COMPRESSED_RGBA_S3TC_DXT3_EXT 1295bd8deadSopenharmony_ci COMPRESSED_RGBA_S3TC_DXT5_EXT 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Accepted by the <pname> parameter of 1325bd8deadSopenharmony_ci GetFramebufferAttachmentParameterivEXT: 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci (Note: FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is simply an alias for the 1375bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT token provided in 1385bd8deadSopenharmony_ci EXT_framebuffer_object. This extension generalizes the notion of 1395bd8deadSopenharmony_ci "<zoffset>" to include layers of an array texture.) 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci Returned by the <type> parameter of GetActiveUniform: 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci SAMPLER_1D_ARRAY_EXT 0x8DC0 1445bd8deadSopenharmony_ci SAMPLER_2D_ARRAY_EXT 0x8DC1 1455bd8deadSopenharmony_ci SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 1465bd8deadSopenharmony_ci SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation) 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci Modify section 2.15.3, "Shader Variables", page 75 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci Add the following new return types to the description of GetActiveUniform 1535bd8deadSopenharmony_ci on p. 81. 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci SAMPLER_1D_ARRAY_EXT, 1565bd8deadSopenharmony_ci SAMPLER_2D_ARRAY_EXT, 1575bd8deadSopenharmony_ci SAMPLER_1D_ARRAY_SHADOW_EXT, 1585bd8deadSopenharmony_ci SAMPLER_2D_ARRAY_SHADOW_EXT 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci Modify Section 2.15.4, Shader Execution (p. 84) 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci (modify first paragraph, p. 86 -- two simple edits: 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci (1) Change reference to the "r" coordinate to simply indicate that the 1655bd8deadSopenharmony_ci reference value for shadow mapping is provided in the lookup 1665bd8deadSopenharmony_ci function. It's still usually in the "r" coordinate, except for 1675bd8deadSopenharmony_ci two-dimensional array textures, where it's in "q". 1685bd8deadSopenharmony_ci (2) Add new EXT_gpu_shader4 sampler types used for array textures. ) 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci Texture lookups involving textures with depth component data can either 1715bd8deadSopenharmony_ci return the depth data directly or return the results of a comparison with 1725bd8deadSopenharmony_ci a reference depth value specified in the coordinates passed to the texture 1735bd8deadSopenharmony_ci lookup function, as described in section 3.8.14. The comparison operation 1745bd8deadSopenharmony_ci is requested in the shader by using the shadow sampler types 1755bd8deadSopenharmony_ci (sampler1DShadow, sampler2DShadow, sampler1DArrayShadow, or 1765bd8deadSopenharmony_ci sampler2DArrayShadow) and in the texture using the TEXTURE_COMPARE_MODE 1775bd8deadSopenharmony_ci parameter. ... 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci Modify Section 3.8, Texturing (p. 149). 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci (add new paragraph at the top of p. 150) Six types of texture are 1845bd8deadSopenharmony_ci supported; each is a collection of images built from one-, two-, or 1855bd8deadSopenharmony_ci three-dimensional array of image elements referred to as texels. One-, 1865bd8deadSopenharmony_ci two-, and three-dimensional textures consist of a one-, two-, or 1875bd8deadSopenharmony_ci three-dimensional texel arrays. One- and two-dimensional array textures 1885bd8deadSopenharmony_ci are arrays of one- or two-dimensional images, consisting of one or more 1895bd8deadSopenharmony_ci layers. Finally, a cube map is a special two-dimensional array texture 1905bd8deadSopenharmony_ci with six layers that represent the faces of a cube. When accessing a cube 1915bd8deadSopenharmony_ci map, the texture coordinates are projected onto one of the six faces. 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci Modify Section 3.8.1, Texture Image Specification (p. 150). 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ci (modify first paragraph of section, p. 150) The command 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci void TexImage3D( enum target, int level, int internalformat, 1985bd8deadSopenharmony_ci sizei width, sizei height, sizei depth, int border, 1995bd8deadSopenharmony_ci enum format, enum type, void *data ); 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci is used to specify a three-dimensional texture image. target must be one 2025bd8deadSopenharmony_ci of TEXTURE_3D for a three-dimensional texture or TEXTURE_2D_ARRAY_EXT for 2035bd8deadSopenharmony_ci a two-dimensional array texture. Additionally, target may be either 2045bd8deadSopenharmony_ci PROXY_TEXTURE_3D for a three-dimensional proxy texture, or 2055bd8deadSopenharmony_ci PROXY_TEXTURE_2D_ARRAY_EXT for a two-dimensional proxy array texture. ... 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci (modify the fourth paragraph on p. 151) Textures with a base internal 2085bd8deadSopenharmony_ci format of DEPTH_COMPONENT are supported by texture image specification 2095bd8deadSopenharmony_ci commands only if target is TEXTURE_1D, TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, 2105bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT, PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, 2115bd8deadSopenharmony_ci PROXY_TEXTURE_1D_ARRAY_EXT, or PROXY_TEXTURE_2D_ARRAY_EXT. Using this 2125bd8deadSopenharmony_ci format in conjunction with any other target will result in an INVALID 2135bd8deadSopenharmony_ci OPERATION error. 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci (modify the first paragraph on p. 153 -- In particular, add new terms w_b, 2165bd8deadSopenharmony_ci h_b, and d_b to represent border width, height, or depth, instead of a 2175bd8deadSopenharmony_ci single border size term b_s. Subsequent equations referring to b_s should 2185bd8deadSopenharmony_ci be modified to refer to w_b, h_b, and d_b, as appropriate.) 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci ... Counting from zero, each resulting Nth texel is assigned internal 2215bd8deadSopenharmony_ci integer coordinates (i, j, k), where 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci i = (N mod width) - w_b 2245bd8deadSopenharmony_ci j = (floor(N/width) mod height) - h_b 2255bd8deadSopenharmony_ci k = (floor(N/(width*height)) mod depth) - d_b 2265bd8deadSopenharmony_ci 2275bd8deadSopenharmony_ci and w_b, h_b, and d_b are the specified border width, height, and depth. 2285bd8deadSopenharmony_ci w_b and h_b are the specified <border> value; d_b is the specified 2295bd8deadSopenharmony_ci <border> value if <target> is TEXTURE_3D or zero if <target> is 2305bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT. ... 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci (modify equations 3.15-3.17 and third paragraph of p. 155) 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ci w_s = w_t + 2 * w_b (3.15) 2355bd8deadSopenharmony_ci h_s = h_t + 2 * h_b (3.16) 2365bd8deadSopenharmony_ci d_s = d_t + 2 * d_b (3.17) 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci ... If <border> is less than zero, or greater than b_t, then the error 2395bd8deadSopenharmony_ci INVALID_VALUE is generated. 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci (modify the last paragraph on p. 155 on to p. 156) 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci The maximum allowable width, height, or depth of a texel array for a 2445bd8deadSopenharmony_ci three-dimensional texture is an implementation dependent function of the 2455bd8deadSopenharmony_ci level-of-detail and internal format of the resulting image array. It must 2465bd8deadSopenharmony_ci be at least 2^(k-lod) + 2 * b_t for image arrays of level-of-detail 0 2475bd8deadSopenharmony_ci through k, where k is the log base 2 of MAX_3D_TEXTURE_SIZE, lod is the 2485bd8deadSopenharmony_ci level-of-detail of the image array, and b_t is the maximum border width. 2495bd8deadSopenharmony_ci It may be zero for image arrays of any level-of-detail greater than k. The 2505bd8deadSopenharmony_ci error INVALID VALUE is generated if the specified image is too large to be 2515bd8deadSopenharmony_ci stored under any conditions. 2525bd8deadSopenharmony_ci 2535bd8deadSopenharmony_ci In a similar fashion, the maximum allowable width of a texel array for a 2545bd8deadSopenharmony_ci one- or two-dimensional, or one- or two-dimensional array texture, and the 2555bd8deadSopenharmony_ci maximum allowable height of a two-dimensional or two-dimensional array 2565bd8deadSopenharmony_ci texture, must be at least 2^(k-lod) + 2 * b_t for image arrays of level 0 2575bd8deadSopenharmony_ci through k, where k is the log base 2 of MAX_TEXTURE_SIZE. The maximum 2585bd8deadSopenharmony_ci allowable width and height of a cube map texture must be the same, and 2595bd8deadSopenharmony_ci must be at least 2^(k-lod) + 2 * b_t for image arrays level 0 through k, 2605bd8deadSopenharmony_ci where k is the log base 2 of MAX_CUBE_MAP_TEXTURE_SIZE. The maximum 2615bd8deadSopenharmony_ci number of layers for one- and two-dimensional array textures (height or 2625bd8deadSopenharmony_ci depth, respectively) must be at least MAX_ARRAY_TEXTURE_LAYERS_EXT for all 2635bd8deadSopenharmony_ci levels. 2645bd8deadSopenharmony_ci 2655bd8deadSopenharmony_ci (modify the fourth paragraph on p. 156) The command 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci void TexImage2D( enum target, int level, 2685bd8deadSopenharmony_ci int internalformat, sizei width, sizei height, 2695bd8deadSopenharmony_ci int border, enum format, enum type, void *data ); 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ci is used to specify a two-dimensional texture image. target must be one of 2725bd8deadSopenharmony_ci TEXTURE_2D for a two-dimensional texture, TEXTURE_1D_ARRAY_EXT for a 2735bd8deadSopenharmony_ci one-dimensional array texture, or one of TEXTURE_CUBE_MAP_POSITIVE_X, 2745bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y, 2755bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or 2765bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Z for a cube map texture. Additionally, target 2775bd8deadSopenharmony_ci may be either PROXY_TEXTURE_2D for a two-dimensional proxy texture, 2785bd8deadSopenharmony_ci PROXY_TEXTURE_1D_ARRAY_EXT for a one-dimensional proxy array texture, or 2795bd8deadSopenharmony_ci PROXY TEXTURE_CUBE_MAP for a cube map proxy texture in the special case 2805bd8deadSopenharmony_ci discussed in section 3.8.11. The other parameters match the corresponding 2815bd8deadSopenharmony_ci parameters of TexImage3D. 2825bd8deadSopenharmony_ci 2835bd8deadSopenharmony_ci For the purposes of decoding the texture image, TexImage2D is equivalent 2845bd8deadSopenharmony_ci to calling TexImage3D with corresponding arguments and depth of 1, except 2855bd8deadSopenharmony_ci that 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci * The border depth, d_b, is zero, and the depth of the image is always 1 2885bd8deadSopenharmony_ci regardless of the value of border. 2895bd8deadSopenharmony_ci 2905bd8deadSopenharmony_ci * The border height, h_b, is zero if <target> is TEXTURE_1D_ARRAY_EXT, 2915bd8deadSopenharmony_ci and <border> otherwise. 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci * Convolution will be performed on the image (possibly changing its width 2945bd8deadSopenharmony_ci and height) if SEPARABLE 2D or CONVOLUTION 2D is enabled. 2955bd8deadSopenharmony_ci 2965bd8deadSopenharmony_ci * UNPACK SKIP IMAGES is ignored. 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci (modify the fourth paragraph on p. 157) For the purposes of decoding the 2995bd8deadSopenharmony_ci texture image, TexImage1D is equivalent to calling TexImage2D with 3005bd8deadSopenharmony_ci corresponding arguments and height of 1, except that 3015bd8deadSopenharmony_ci 3025bd8deadSopenharmony_ci * The border height and depth (h_b and d_b) are always zero, regardless 3035bd8deadSopenharmony_ci of the value of <border>. 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ci * Convolution will be performed on the image (possibly changing its 3065bd8deadSopenharmony_ci width) only if CONVOLUTION 1D is enabled. 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci (modify the last paragraph on p. 157 and the first paragraph of p. 158 -- 3095bd8deadSopenharmony_ci changing the phrase "texture array" to "texel array" to avoid confusion 3105bd8deadSopenharmony_ci with array textures. All subsequent references to "texture array" in the 3115bd8deadSopenharmony_ci specification should also be changed to "texel array".) 3125bd8deadSopenharmony_ci 3135bd8deadSopenharmony_ci We shall refer to the (possibly border augmented) decoded image as the 3145bd8deadSopenharmony_ci texel array. A three-dimensional texel array has width, height, and depth 3155bd8deadSopenharmony_ci ws, hs, and ds as defined respectively in equations 3.15, 3.16, and 3165bd8deadSopenharmony_ci 3.17. A two-dimensional texel array has depth ds = 1, with height hs and 3175bd8deadSopenharmony_ci width ws as above, and a one-dimensional texel array has depth ds = 1, 3185bd8deadSopenharmony_ci height hs = 1, and width ws as above. 3195bd8deadSopenharmony_ci 3205bd8deadSopenharmony_ci An element (i,j,k) of the texel array is called a texel (for a 3215bd8deadSopenharmony_ci two-dimensional texture or one-dimensional array texture, k is irrelevant; 3225bd8deadSopenharmony_ci for a one-dimensional texture, j and k are both irrelevant). The texture 3235bd8deadSopenharmony_ci value used in texturing a fragment is determined by that fragment's 3245bd8deadSopenharmony_ci associated (s,t,r) coordinates, but may not correspond to any actual 3255bd8deadSopenharmony_ci texel. See figure 3.10. 3265bd8deadSopenharmony_ci 3275bd8deadSopenharmony_ci Modify Section 3.8.2, Alternate Texture Image Specification Commands 3285bd8deadSopenharmony_ci (p. 159) 3295bd8deadSopenharmony_ci 3305bd8deadSopenharmony_ci (modify second paragraph, p. 159 -- allow 1D array textures) The command 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci void CopyTexImage2D( enum target, int level, 3335bd8deadSopenharmony_ci enum internalformat, int x, int y, sizei width, 3345bd8deadSopenharmony_ci sizei height, int border ); 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci defines a two-dimensional texture image in exactly the manner of 3375bd8deadSopenharmony_ci TexImage2D, except that the image data are taken from the framebuffer 3385bd8deadSopenharmony_ci rather than from client memory. Currently, target must be one of 3395bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_CUBE_MAP_POSITIVE_X, 3405bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE MAP_POSITIVE_Y, 3415bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or 3425bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Z. 3435bd8deadSopenharmony_ci 3445bd8deadSopenharmony_ci (modify last paragraph, p. 160) ... Currently the target arguments of 3455bd8deadSopenharmony_ci TexSubImage1D and CopyTexSubImage1D must be TEXTURE_1D, the target 3465bd8deadSopenharmony_ci arguments of TexSubImage2D and CopyTexSubImage2D must be one of 3475bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_CUBE_MAP_POSITIVE_X, 3485bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y, 3495bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or 3505bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Z, and the target arguments of TexSubImage3D and 3515bd8deadSopenharmony_ci CopyTexSubImage3D must be TEXTURE_3D or TEXTURE_2D_ARRAY_EXT. ... 3525bd8deadSopenharmony_ci 3535bd8deadSopenharmony_ci (modify last paragraph, p. 161 and subsequent inequalities) 3545bd8deadSopenharmony_ci 3555bd8deadSopenharmony_ci Negative values of xoffset, yoffset, and zoffset correspond to the 3565bd8deadSopenharmony_ci coordinates of border texels, addressed as in figure 3.10. Taking w_s, 3575bd8deadSopenharmony_ci h_s, d_s, w_b, h_b, and d_b to be the specified width, height, depth, and 3585bd8deadSopenharmony_ci border width, height, and depth of the texture array, and taking x, y, z, 3595bd8deadSopenharmony_ci w, h, and d to be the xoffset, yoffset, zoffset, width, height, and depth 3605bd8deadSopenharmony_ci argument values, any of the following relationships generates the error 3615bd8deadSopenharmony_ci INVALID VALUE: 3625bd8deadSopenharmony_ci 3635bd8deadSopenharmony_ci x < -w_b 3645bd8deadSopenharmony_ci x + w > w_s - w_b 3655bd8deadSopenharmony_ci y < -h_b 3665bd8deadSopenharmony_ci y + h > h_s - h_b 3675bd8deadSopenharmony_ci z < -d_b 3685bd8deadSopenharmony_ci z + d > d_s - d_b 3695bd8deadSopenharmony_ci 3705bd8deadSopenharmony_ci Modify Section 3.8.4, Texture Parameters (p. 166) 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci (modify first paragraph of section, p. 166) Various parameters control how 3735bd8deadSopenharmony_ci the texel array is treated when specified or changed, and when applied to 3745bd8deadSopenharmony_ci a fragment. Each parameter is set by calling 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci void TexParameter{if}( enum target, enum pname, T param ); 3775bd8deadSopenharmony_ci void TexParameter{if}v( enum target, enum pname, T params ); 3785bd8deadSopenharmony_ci 3795bd8deadSopenharmony_ci target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, 3805bd8deadSopenharmony_ci TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT. 3815bd8deadSopenharmony_ci 3825bd8deadSopenharmony_ci Modify Section 3.8.8, Texture Minification (p. 170) 3835bd8deadSopenharmony_ci 3845bd8deadSopenharmony_ci (modify first paragraph, p. 172) ... For a one-dimensional or 3855bd8deadSopenharmony_ci one-dimensional array texture, define v(x, y) == 0 and w(x, y) == 0; for a 3865bd8deadSopenharmony_ci two-dimensional, two-dimensional array, or cube map texture, define w(x, 3875bd8deadSopenharmony_ci y) == 0. ... 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci (modify second paragraph, p. 173) For one-dimensional or one-dimensional 3905bd8deadSopenharmony_ci array textures, j and k are irrelevant; the texel at location i becomes 3915bd8deadSopenharmony_ci the texture value. For two-dimensional, two-dimensional array, or cube map 3925bd8deadSopenharmony_ci textures, k is irrelevant; the texel at location (i, j) becomes the 3935bd8deadSopenharmony_ci texture value. For one- and two-dimensional array textures, the texel is 3945bd8deadSopenharmony_ci obtained from image layer l, where 3955bd8deadSopenharmony_ci 3965bd8deadSopenharmony_ci l = clamp(floor(t + 0.5), 0, h_t-1), for one-dimensional array textures, 3975bd8deadSopenharmony_ci clamp(floor(r + 0.5), 0, d_t-1), for two-dimensional array textures. 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci (modify third paragraph, p. 174) For a two-dimensional, two-dimensional 4005bd8deadSopenharmony_ci array, or cube map texture, 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci tau = ... 4035bd8deadSopenharmony_ci 4045bd8deadSopenharmony_ci where tau_ij is the texel at location (i, j) in the two-dimensional 4055bd8deadSopenharmony_ci texture image. For two-dimensional array textures, all texels are 4065bd8deadSopenharmony_ci obtained from layer l, where 4075bd8deadSopenharmony_ci 4085bd8deadSopenharmony_ci l = clamp(floor(r + 0.5), 0, d_t-1). 4095bd8deadSopenharmony_ci 4105bd8deadSopenharmony_ci And for a one-dimensional or one-dimensional array texture, 4115bd8deadSopenharmony_ci 4125bd8deadSopenharmony_ci tau = ... 4135bd8deadSopenharmony_ci 4145bd8deadSopenharmony_ci where tau_i is the texel at location i in the one-dimensional texture. 4155bd8deadSopenharmony_ci For one-dimensional array textures, both texels are obtained from layer l, 4165bd8deadSopenharmony_ci where 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ci l = clamp(floor(t + 0.5), 0, h_t-1). 4195bd8deadSopenharmony_ci 4205bd8deadSopenharmony_ci (modify first two paragraphs of "Mipmapping", p. 175) TEXTURE_MIN_FILTER 4215bd8deadSopenharmony_ci values NEAREST_MIPMAP_NEAREST, NEAREST_MIPMAP_LINEAR, 4225bd8deadSopenharmony_ci LINEAR_MIPMAP_NEAREST, and LINEAR_MIPMAP_LINEAR each require the use of a 4235bd8deadSopenharmony_ci mipmap. A mipmap is an ordered set of arrays representing the same image; 4245bd8deadSopenharmony_ci each array has a resolution lower than the previous one. 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ci If the image array of level level_base, excluding its border, has 4275bd8deadSopenharmony_ci dimensions, w_t x h_t x d_t, then there are floor(log2(maxsize)) + 1 4285bd8deadSopenharmony_ci levels in the mipmap, where 4295bd8deadSopenharmony_ci 4305bd8deadSopenharmony_ci maxsize = w_t, for one-dimensional and one-dimensional 4315bd8deadSopenharmony_ci array textures, 4325bd8deadSopenharmony_ci max(w_t, h_t), for two-dimensional, two-dimensional 4335bd8deadSopenharmony_ci array, and cube map textures 4345bd8deadSopenharmony_ci max(w_t, h_t, d_t), for three dimensional textures. 4355bd8deadSopenharmony_ci 4365bd8deadSopenharmony_ci Numbering the levels such that level level_base is the 0th level, the ith 4375bd8deadSopenharmony_ci array has dimensions 4385bd8deadSopenharmony_ci 4395bd8deadSopenharmony_ci max(1, floor(w_t/w_d)) x max(1, floor(h_t/h_d)) x max(1, floor(d_t/d_d)) 4405bd8deadSopenharmony_ci 4415bd8deadSopenharmony_ci where 4425bd8deadSopenharmony_ci 4435bd8deadSopenharmony_ci w_d = 2 ^ i; 4445bd8deadSopenharmony_ci h_d = 1, for one-dimensional array textures and 4455bd8deadSopenharmony_ci 2 ^ i, otherwise; and 4465bd8deadSopenharmony_ci d_d = 1, for two-dimensional array textures and 4475bd8deadSopenharmony_ci 2 ^ i, otherwise, 4485bd8deadSopenharmony_ci 4495bd8deadSopenharmony_ci until the last array is reached with dimension 1 x 1 x 1. 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ci Each array in a mipmap is defined using TexImage3D, TexImage2D, 4525bd8deadSopenharmony_ci CopyTexImage2D, TexImage1D, or CopyTexImage1D; the array being set is 4535bd8deadSopenharmony_ci indicated with the level-of-detail argument level. Level-of-detail numbers 4545bd8deadSopenharmony_ci proceed from level_base for the original texture array through p = 4555bd8deadSopenharmony_ci floor(log2(maxsize)) + level_base with each unit increase indicating an 4565bd8deadSopenharmony_ci array of half the dimensions of the previous one (rounded down to the next 4575bd8deadSopenharmony_ci integer if fractional) as already described. All arrays from level_base 4585bd8deadSopenharmony_ci through q = min{p, level_max} must be defined, as discussed in section 4595bd8deadSopenharmony_ci 3.8.10. 4605bd8deadSopenharmony_ci 4615bd8deadSopenharmony_ci (modify third paragraph in the "Mipmap Generation" section, p. 176) 4625bd8deadSopenharmony_ci 4635bd8deadSopenharmony_ci The contents of the derived arrays are computed by repeated, filtered 4645bd8deadSopenharmony_ci reduction of the level_base array. For one- and two-dimensional array 4655bd8deadSopenharmony_ci textures, each layer is filtered independently. ... 4665bd8deadSopenharmony_ci 4675bd8deadSopenharmony_ci Modify Section 3.8.10, Texture Completeness (p. 177) 4685bd8deadSopenharmony_ci 4695bd8deadSopenharmony_ci (modify second paragaph of section, p. 177) For one-, two-, or 4705bd8deadSopenharmony_ci three-dimensional textures and one- or two-dimensional array textures, a 4715bd8deadSopenharmony_ci texture is complete if the following conditions all hold true: ... 4725bd8deadSopenharmony_ci 4735bd8deadSopenharmony_ci Modify Section 3.8.11, Texture State and Proxy State (p. 178) 4745bd8deadSopenharmony_ci 4755bd8deadSopenharmony_ci (modify second and third paragraphs, p. 179, adding array textures and 4765bd8deadSopenharmony_ci making minor wording changes) 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci In addition to image arrays for one-, two-, and three-dimensional 4795bd8deadSopenharmony_ci textures, one- and two-dimensional array textures, and the six image 4805bd8deadSopenharmony_ci arrays for the cube map texture, partially instantiated image arrays are 4815bd8deadSopenharmony_ci maintained for one-, two-, and three-dimensional textures and one- and 4825bd8deadSopenharmony_ci two-dimensional array textures. Additionally, a single proxy image array 4835bd8deadSopenharmony_ci is maintained for the cube map texture. Each proxy image array includes 4845bd8deadSopenharmony_ci width, height, depth, border width, and internal format state values, as 4855bd8deadSopenharmony_ci well as state for the red, green, blue, alpha, luminance, and intensity 4865bd8deadSopenharmony_ci component resolutions. Proxy image arrays do not include image data, nor 4875bd8deadSopenharmony_ci do they include texture properties. When TexImage3D is executed with 4885bd8deadSopenharmony_ci target specified as PROXY_TEXTURE_3D, the three-dimensional proxy state 4895bd8deadSopenharmony_ci values of the specified level-of-detail are recomputed and updated. If the 4905bd8deadSopenharmony_ci image array would not be supported by TexImage3D called with target set to 4915bd8deadSopenharmony_ci TEXTURE 3D, no error is generated, but the proxy width, height, depth, 4925bd8deadSopenharmony_ci border width, and component resolutions are set to zero. If the image 4935bd8deadSopenharmony_ci array would be supported by such a call to TexImage3D, the proxy state 4945bd8deadSopenharmony_ci values are set exactly as though the actual image array were being 4955bd8deadSopenharmony_ci specified. No pixel data are transferred or processed in either case. 4965bd8deadSopenharmony_ci 4975bd8deadSopenharmony_ci Proxy arrays for one- and two-dimensional textures and one- and 4985bd8deadSopenharmony_ci two-dimensional array textures are operated on in the same way when 4995bd8deadSopenharmony_ci TexImage1D is executed with target specified as PROXY_TEXTURE_1D, 5005bd8deadSopenharmony_ci TexImage2D is executed with target specified as PROXY_TEXTURE_2D or 5015bd8deadSopenharmony_ci PROXY_TEXTURE_1D_ARRAY_EXT, or TexImage3D is executed with target 5025bd8deadSopenharmony_ci specified as PROXY_TETXURE_2D_ARRAY_EXT. 5035bd8deadSopenharmony_ci 5045bd8deadSopenharmony_ci Modify Section 3.8.12, Texture Objects (p. 180) 5055bd8deadSopenharmony_ci 5065bd8deadSopenharmony_ci (update most of the beginning of the section to allow array textures) 5075bd8deadSopenharmony_ci 5085bd8deadSopenharmony_ci In addition to the default textures TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, 5095bd8deadSopenharmony_ci TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_EXT, named one-, 5105bd8deadSopenharmony_ci two-, and three-dimensional, cube map, and one- and two-dimensional array 5115bd8deadSopenharmony_ci texture objects can be created and operated upon. The name space for 5125bd8deadSopenharmony_ci texture objects is the unsigned integers, with zero reserved by the GL. 5135bd8deadSopenharmony_ci 5145bd8deadSopenharmony_ci A texture object is created by binding an unused name to TEXTURE_1D, 5155bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or 5165bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT. The binding is effected by calling 5175bd8deadSopenharmony_ci 5185bd8deadSopenharmony_ci void BindTexture( enum target, uint texture ); 5195bd8deadSopenharmony_ci 5205bd8deadSopenharmony_ci with <target> set to the desired texture target and <texture> set to the 5215bd8deadSopenharmony_ci unused name. The resulting texture object is a new state vector, 5225bd8deadSopenharmony_ci comprising all the state values listed in section 3.8.11, set to the same 5235bd8deadSopenharmony_ci initial values. If the new texture object is bound to TEXTURE_1D, 5245bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or 5255bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT, it is and remains a one-, two-, three-dimensional, 5265bd8deadSopenharmony_ci cube map, one- or two-dimensional array texture respectively until it is 5275bd8deadSopenharmony_ci deleted. 5285bd8deadSopenharmony_ci 5295bd8deadSopenharmony_ci BindTexture may also be used to bind an existing texture object to either 5305bd8deadSopenharmony_ci TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, 5315bd8deadSopenharmony_ci TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT. The error INVALID_OPERATION 5325bd8deadSopenharmony_ci is generated if an attempt is made to bind a texture object of different 5335bd8deadSopenharmony_ci dimensionality than the specified target. If the bind is successful no 5345bd8deadSopenharmony_ci change is made to the state of the bound texture object, and any previous 5355bd8deadSopenharmony_ci binding to target is broken. 5365bd8deadSopenharmony_ci 5375bd8deadSopenharmony_ci While a texture object is bound, GL operations on the target to which it 5385bd8deadSopenharmony_ci is bound affect the bound object, and queries of the target to which it is 5395bd8deadSopenharmony_ci bound return state from the bound object. If texture mapping of the 5405bd8deadSopenharmony_ci dimensionality of the target to which a texture object is bound is 5415bd8deadSopenharmony_ci enabled, the state of the bound texture object directs the texturing 5425bd8deadSopenharmony_ci operation. 5435bd8deadSopenharmony_ci 5445bd8deadSopenharmony_ci In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, 5455bd8deadSopenharmony_ci TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_ARRAY_EXT have 5465bd8deadSopenharmony_ci one-, two-, three-dimensional, cube map, and one- and two-dimensional 5475bd8deadSopenharmony_ci array texture state vectors respectively associated with them. In order 5485bd8deadSopenharmony_ci that access to these initial textures not be lost, they are treated as 5495bd8deadSopenharmony_ci texture objects all of whose names are 0. The initial one-, two-, 5505bd8deadSopenharmony_ci three-dimensional, cube map, one- and two-dimensional array textures are 5515bd8deadSopenharmony_ci therefore operated upon, queried, and applied as TEXTURE_1D, TEXTURE_2D, 5525bd8deadSopenharmony_ci TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and 5535bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT respectively while 0 is bound to the corresponding 5545bd8deadSopenharmony_ci targets. 5555bd8deadSopenharmony_ci 5565bd8deadSopenharmony_ci (modify second paragraph, p. 181) ... If a texture that is currently 5575bd8deadSopenharmony_ci bound to one of the targets TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, 5585bd8deadSopenharmony_ci TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT is 5595bd8deadSopenharmony_ci deleted, it is as though BindTexture had been executed with the same 5605bd8deadSopenharmony_ci target and texture zero. ... 5615bd8deadSopenharmony_ci 5625bd8deadSopenharmony_ci (modify second paragraph, p. 182) The texture object name space, including 5635bd8deadSopenharmony_ci the initial one-, two-, and three dimensional, cube map, and one- and 5645bd8deadSopenharmony_ci two-dimensional array texture objects, is shared among all texture 5655bd8deadSopenharmony_ci units. ... 5665bd8deadSopenharmony_ci 5675bd8deadSopenharmony_ci Modify Section 3.8.14, Texture Comparison Modes (p. 185) 5685bd8deadSopenharmony_ci 5695bd8deadSopenharmony_ci (modify second through fourth paragraphs, p. 188, reflecting that the 5705bd8deadSopenharmony_ci texture coordinate used for depth comparisons varies, including a new enum 5715bd8deadSopenharmony_ci name) 5725bd8deadSopenharmony_ci 5735bd8deadSopenharmony_ci Let D_t be the depth texture value, in the range [0, 1]. For 5745bd8deadSopenharmony_ci fixed-function texture lookups, let R be the interpolated <r> texture 5755bd8deadSopenharmony_ci coordinate, clamped to the range [0, 1]. For texture lookups generated by 5765bd8deadSopenharmony_ci a program instruction, let R be the reference value for depth comparisons 5775bd8deadSopenharmony_ci provided in the instruction, also clamped to [0, 1]. Then the effective 5785bd8deadSopenharmony_ci texture value L_t, I_t, or A_t is computed as follows: ... 5795bd8deadSopenharmony_ci 5805bd8deadSopenharmony_ci If the value of TEXTURE_COMPARE_MODE is NONE, then 5815bd8deadSopenharmony_ci 5825bd8deadSopenharmony_ci r = Dt 5835bd8deadSopenharmony_ci 5845bd8deadSopenharmony_ci If the value of TEXTURE_COMPARE_MODE is COMPARE_REF_DEPTH_TO_TEXTURE_EXT), 5855bd8deadSopenharmony_ci then r depends on the texture comparison function as shown in table 3.27. 5865bd8deadSopenharmony_ci 5875bd8deadSopenharmony_ci Modify Section 3.11.2, Shader Execution (p. 194) 5885bd8deadSopenharmony_ci 5895bd8deadSopenharmony_ci (modify second paragraph, p. 195 -- two simple edits: 5905bd8deadSopenharmony_ci 5915bd8deadSopenharmony_ci (1) Change reference to the "r" coordinate to simply indicate that the 5925bd8deadSopenharmony_ci reference value for shadow mapping is provided in the lookup 5935bd8deadSopenharmony_ci function. It's still usually in the "r" coordinate, except for 5945bd8deadSopenharmony_ci two-dimensional array textures, where it's in "q". 5955bd8deadSopenharmony_ci (2) Add new EXT_gpu_shader4 sampler types used for array textures. ) 5965bd8deadSopenharmony_ci 5975bd8deadSopenharmony_ci Texture lookups involving textures with depth component data can either 5985bd8deadSopenharmony_ci return the depth data directly or return the results of a comparison with 5995bd8deadSopenharmony_ci a reference depth value specified in the coordinates passed to the texture 6005bd8deadSopenharmony_ci lookup function. The comparison operation is requested in the shader by 6015bd8deadSopenharmony_ci using the shadow sampler types (sampler1DShadow, sampler2DShadow, 6025bd8deadSopenharmony_ci sampler1DArrayShadow, and sampler2DArrayShadow) and in the texture using 6035bd8deadSopenharmony_ci the TEXTURE COMPARE MODE parameter. ... 6045bd8deadSopenharmony_ci 6055bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment 6065bd8deadSopenharmony_ciOperations and the Frame Buffer) 6075bd8deadSopenharmony_ci 6085bd8deadSopenharmony_ci None. 6095bd8deadSopenharmony_ci 6105bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions) 6115bd8deadSopenharmony_ci 6125bd8deadSopenharmony_ci Modify Section 5.4, Display Lists (p. 237) 6135bd8deadSopenharmony_ci 6145bd8deadSopenharmony_ci (modify first paragraph, p. 242) TexImage3D, TexImage2D, TexImage1D, 6155bd8deadSopenharmony_ci Histogram, and ColorTable are executed immediately when called with the 6165bd8deadSopenharmony_ci corresponding proxy arguments PROXY_TEXTURE_3D or 6175bd8deadSopenharmony_ci PROXY_TEXTURE_2D_ARRAY_EXT; PROXY_TEXTURE_2D, PROXY_TEXTURE_CUBE_MAP, or 6185bd8deadSopenharmony_ci PROXY_TEXTURE_1D_ARRAY_EXT; PROXY_TEXTURE_1D; PROXY_HISTOGRAM; and 6195bd8deadSopenharmony_ci PROXY_COLOR_TABLE, PROXY_POST_CONVOLUTION_COLOR_TABLE, or 6205bd8deadSopenharmony_ci PROXY_POST_COLOR_MATRIX_COLOR_TABLE. 6215bd8deadSopenharmony_ci 6225bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and 6235bd8deadSopenharmony_ciState Requests) 6245bd8deadSopenharmony_ci 6255bd8deadSopenharmony_ci Modify Section 6.1.3, Enumerated Queries (p. 246) 6265bd8deadSopenharmony_ci 6275bd8deadSopenharmony_ci (modify second paragraph, p. 247) 6285bd8deadSopenharmony_ci 6295bd8deadSopenharmony_ci GetTexParameter parameter <target> may be one of TEXTURE_1D, TEXTURE_2D, 6305bd8deadSopenharmony_ci TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or 6315bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT, indicating the currently bound one-, two-, 6325bd8deadSopenharmony_ci three-dimensional, cube map, or one- or two-dimensional array texture. 6335bd8deadSopenharmony_ci GetTexLevelParameter parameter target may be one of TEXTURE_1D, 6345bd8deadSopenharmony_ci TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP_POSITIVE_X, 6355bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y, 6365bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, 6375bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_NEGATIVE_Z, TEXTURE_1D_ARRAY_EXT, TEXTURE_2D_ARRAY_EXT, 6385bd8deadSopenharmony_ci PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_3D, 6395bd8deadSopenharmony_ci PROXY_TEXTURE_CUBE_MAP, PROXY_TEXTURE_1D_ARRAY, or PROXY_TEXTURE_2D_ARRAY, 6405bd8deadSopenharmony_ci indicating the one-, two-, or three-dimensional texture, one of the six 6415bd8deadSopenharmony_ci distinct 2D images making up the cube map texture, the one- or 6425bd8deadSopenharmony_ci two-dimensional array texture, or the one-, two-, three-dimensional, cube 6435bd8deadSopenharmony_ci map, or one- or two-dimensional array proxy state vector. ... 6445bd8deadSopenharmony_ci 6455bd8deadSopenharmony_ci Modify Section 6.1.4, Texture Queries (p. 248) 6465bd8deadSopenharmony_ci 6475bd8deadSopenharmony_ci (modify first three paragraphs of section, p. 248) The command 6485bd8deadSopenharmony_ci 6495bd8deadSopenharmony_ci void GetTexImage( enum tex, int lod, enum format, 6505bd8deadSopenharmony_ci enum type, void *img ); 6515bd8deadSopenharmony_ci 6525bd8deadSopenharmony_ci is used to obtain texture images. It is somewhat different from the other 6535bd8deadSopenharmony_ci get commands; tex is a symbolic value indicating which texture (or texture 6545bd8deadSopenharmony_ci face in the case of a cube map texture target name) is to be obtained. 6555bd8deadSopenharmony_ci TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY_EXT, and 6565bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT indicate a one-, two-, or three-dimensional texture, 6575bd8deadSopenharmony_ci or one- or two-dimensional array texture, respectively. 6585bd8deadSopenharmony_ci TEXTURE_CUBE_MAP_POSITIVE_X, ... 6595bd8deadSopenharmony_ci 6605bd8deadSopenharmony_ci GetTexImage obtains... from the first image to the last for 6615bd8deadSopenharmony_ci three-dimensional textures. One- and two-dimensional array textures are 6625bd8deadSopenharmony_ci treated as two- and three-dimensional images, respectively, where the 6635bd8deadSopenharmony_ci layers are treated as rows or images. These groups are then... 6645bd8deadSopenharmony_ci 6655bd8deadSopenharmony_ci For three-dimensional and two-dimensional array textures, pixel storage 6665bd8deadSopenharmony_ci operations are applied as if the image were two-dimensional, except that 6675bd8deadSopenharmony_ci the additional pixel storage state values PACK_IMAGE_HEIGHT and 6685bd8deadSopenharmony_ci PACK_SKIP_IMAGES are applied. ... 6695bd8deadSopenharmony_ci 6705bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 2.0 Specification (Invariance) 6715bd8deadSopenharmony_ci 6725bd8deadSopenharmony_ci None. 6735bd8deadSopenharmony_ci 6745bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 6755bd8deadSopenharmony_ci 6765bd8deadSopenharmony_ci None. 6775bd8deadSopenharmony_ci 6785bd8deadSopenharmony_ciGLX Protocol 6795bd8deadSopenharmony_ci 6805bd8deadSopenharmony_ci None. 6815bd8deadSopenharmony_ci 6825bd8deadSopenharmony_ciDependencies on EXT_framebuffer_object 6835bd8deadSopenharmony_ci 6845bd8deadSopenharmony_ci If EXT_framebuffer_object is supported, a single layer of an array texture 6855bd8deadSopenharmony_ci can be bound to a framebuffer attachment point, and manual mipmap 6865bd8deadSopenharmony_ci generation support is extended to include array textures. 6875bd8deadSopenharmony_ci 6885bd8deadSopenharmony_ci Several modifications are made to the EXT_framebuffer_object 6895bd8deadSopenharmony_ci specification. First, the token identifying the attached layer of a 3D 6905bd8deadSopenharmony_ci texture, FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT, is renamed to 6915bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT. This is done because this 6925bd8deadSopenharmony_ci extension generalizes the "z offset" concept to become notion of attaching 6935bd8deadSopenharmony_ci a layer of a multi-layer texture, which is applicable for both 6945bd8deadSopenharmony_ci three-dimensional and array textures. All references to this token in 6955bd8deadSopenharmony_ci EXT_framebuffer_object should be changed to the new token, and references 6965bd8deadSopenharmony_ci to "z offset" in the specification text should be replaced with "layer" as 6975bd8deadSopenharmony_ci appropriate. Additional edits follow. 6985bd8deadSopenharmony_ci 6995bd8deadSopenharmony_ci (modify "Manual Mipmap Generation" in edits to Section 3.8.8) 7005bd8deadSopenharmony_ci 7015bd8deadSopenharmony_ci Mipmaps can be generated manually with the command 7025bd8deadSopenharmony_ci 7035bd8deadSopenharmony_ci void GenerateMipmapEXT(enum target); 7045bd8deadSopenharmony_ci 7055bd8deadSopenharmony_ci where <target> is one of TEXTURE_1D, TEXTURE_2D, TEXTURE_CUBE_MAP, 7065bd8deadSopenharmony_ci TEXTURE_3D, TEXTURE_1D_ARRAY, or TEXTURE_2D_ARRAY. Mipmap generation 7075bd8deadSopenharmony_ci affects the texture image attached to <target>. ... 7085bd8deadSopenharmony_ci 7095bd8deadSopenharmony_ci (modify Section 4.4.2.3, Attaching Texture Images to a Framebuffer -- add 7105bd8deadSopenharmony_ci to the end of the section) 7115bd8deadSopenharmony_ci 7125bd8deadSopenharmony_ci The command 7135bd8deadSopenharmony_ci 7145bd8deadSopenharmony_ci void FramebufferTextureLayerEXT(enum target, enum attachment, 7155bd8deadSopenharmony_ci uint texture, int level, int layer); 7165bd8deadSopenharmony_ci 7175bd8deadSopenharmony_ci operates identically to FramebufferTexture3DEXT, except that it attaches a 7185bd8deadSopenharmony_ci single layer of a three-dimensional texture or a one- or two-dimensional 7195bd8deadSopenharmony_ci array texture. <layer> is an integer indicating the layer number, and is 7205bd8deadSopenharmony_ci treated identically to the <zoffset> parameter in FramebufferTexture3DEXT. 7215bd8deadSopenharmony_ci The error INVALID_VALUE is generated if <layer> is negative. The error 7225bd8deadSopenharmony_ci INVALID_OPERATION is generated if <texture> is non-zero and is not the 7235bd8deadSopenharmony_ci name of a three dimensional texture or one- or two-dimensional array 7245bd8deadSopenharmony_ci texture. Unlike FramebufferTexture3D, no <textarget> parameter is 7255bd8deadSopenharmony_ci accepted. 7265bd8deadSopenharmony_ci 7275bd8deadSopenharmony_ci If <texture> is non-zero and the command does not result in an error, the 7285bd8deadSopenharmony_ci framebuffer attachment state corresponding to <attachment> is updated as 7295bd8deadSopenharmony_ci in the other FramebufferTexture commands, except that 7305bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT is set to <layer>. 7315bd8deadSopenharmony_ci 7325bd8deadSopenharmony_ci (modify Section 4.4.4.1, Framebuffer Attachment Completeness) 7335bd8deadSopenharmony_ci 7345bd8deadSopenharmony_ci The framebuffer attachment point <attachment> is said to be "framebuffer 7355bd8deadSopenharmony_ci attachment complete" if ...: 7365bd8deadSopenharmony_ci 7375bd8deadSopenharmony_ci ... 7385bd8deadSopenharmony_ci 7395bd8deadSopenharmony_ci * If FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE and 7405bd8deadSopenharmony_ci FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT names a one- or two-dimensional 7415bd8deadSopenharmony_ci array texture, then FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT must be 7425bd8deadSopenharmony_ci smaller than the number of layers in the texture. 7435bd8deadSopenharmony_ci 7445bd8deadSopenharmony_ci 7455bd8deadSopenharmony_ci (modify Section 6.1.3, Enumerated Queries) 7465bd8deadSopenharmony_ci 7475bd8deadSopenharmony_ci ... 7485bd8deadSopenharmony_ci 7495bd8deadSopenharmony_ci If <pname> is FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT and the texture 7505bd8deadSopenharmony_ci object named FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT is a 7515bd8deadSopenharmony_ci three-dimensional texture or a one- or two-dimensional array texture, 7525bd8deadSopenharmony_ci then <params> will contain the number of texture layer attached to the 7535bd8deadSopenharmony_ci attachment point. Otherwise, <params> will contain the value zero. 7545bd8deadSopenharmony_ci 7555bd8deadSopenharmony_ciDependencies on NV_geometry_program4 7565bd8deadSopenharmony_ci 7575bd8deadSopenharmony_ci NV_geometry_program4 provides additional modifications to 7585bd8deadSopenharmony_ci EXT_framebuffer_object to support layered rendering, which allows 7595bd8deadSopenharmony_ci applications to bind entire three-dimensional, cube map, or array textures 7605bd8deadSopenharmony_ci to a single attachment point, and select a layer to render to according to 7615bd8deadSopenharmony_ci a layer number written by the geometry program. 7625bd8deadSopenharmony_ci 7635bd8deadSopenharmony_ci The framebuffer object modifications provided in NV_geometry_program4 are 7645bd8deadSopenharmony_ci more extensive than the more limited support provided for array textures. 7655bd8deadSopenharmony_ci The edits in this spec are a functional subset of the edits in 7665bd8deadSopenharmony_ci NV_geometry_program4. All of the modifications that this extension makes 7675bd8deadSopenharmony_ci to EXT_framebuffer_object are superseded by NV_geometry_program4, except 7685bd8deadSopenharmony_ci for the minor language changes made to GenerateMipmapsEXT(). 7695bd8deadSopenharmony_ci 7705bd8deadSopenharmony_ciDependencies on NV_gpu_program4 and the OpenGL Shading Language (GLSL) 7715bd8deadSopenharmony_ci 7725bd8deadSopenharmony_ci If NV_gpu_program4, EXT_gpu_shader4, and the OpenGL Shading Language 7735bd8deadSopenharmony_ci (GLSL) are not supported, and no other mechanism is provided to perform 7745bd8deadSopenharmony_ci texture lookups into array textures, this extension is pointless, given 7755bd8deadSopenharmony_ci that it provides no fixed-function mechanism to access texture arrays. 7765bd8deadSopenharmony_ci 7775bd8deadSopenharmony_ci If GLSL is supported, the language below describes the modifications to 7785bd8deadSopenharmony_ci the shading language to support array textures. The extension 7795bd8deadSopenharmony_ci EXT_gpu_shader4 provides a broader set of shading language modifications 7805bd8deadSopenharmony_ci that include array texture lookup functions described here, plus a number 7815bd8deadSopenharmony_ci of additional functions. 7825bd8deadSopenharmony_ci 7835bd8deadSopenharmony_ci If GLSL is not supported, the shading language below and references to the 7845bd8deadSopenharmony_ci SAMPLER_{1D,2D}_ARRAY_EXT and SAMPLER_{1D,2D}_ARRAY_SHADOW_EXT tokens 7855bd8deadSopenharmony_ci should be removed. 7865bd8deadSopenharmony_ci 7875bd8deadSopenharmony_ciDependencies on EXT_texture_compression_s3tc and NV_texture_compression_vtc 7885bd8deadSopenharmony_ci 7895bd8deadSopenharmony_ci S3TC texture compression is supported for two-dimensional array textures. 7905bd8deadSopenharmony_ci When <target> is TEXTURE_2D_ARRAY_EXT, each layer is stored independently 7915bd8deadSopenharmony_ci as a compressed two-dimensional textures. When specifying or querying 7925bd8deadSopenharmony_ci compressed images using one of the S3TC formats, the images are provided 7935bd8deadSopenharmony_ci and/or returned as a series of two-dimensional textures stored 7945bd8deadSopenharmony_ci consecutively in memory, with the layer closest to zero specified first. 7955bd8deadSopenharmony_ci For array textures, images are not arranged in 4x4x4 or 4x4x2 blocks as in 7965bd8deadSopenharmony_ci the three-dimensional compression format provided in the 7975bd8deadSopenharmony_ci EXT_texture_compression_vtc extension. Pixel store parameters, including 7985bd8deadSopenharmony_ci those specific to three-dimensional images, are ignored when compressed 7995bd8deadSopenharmony_ci image data are provided or returned, as in the 8005bd8deadSopenharmony_ci EXT_texture_compression_s3tc extension. 8015bd8deadSopenharmony_ci 8025bd8deadSopenharmony_ci S3TC compression is not supported for one-dimensional texture targets in 8035bd8deadSopenharmony_ci EXT_texture_compression_s3tc, and is not supported for one-dimensional 8045bd8deadSopenharmony_ci array textures in this extension. If compressed one-dimensional arrays 8055bd8deadSopenharmony_ci are needed, use a two-dimensional texture with a height of one. 8065bd8deadSopenharmony_ci 8075bd8deadSopenharmony_ci As with NV_texture_compression_vtc, this extension allows the use of the 8085bd8deadSopenharmony_ci four S3TC internal format types in TexImage3D, CompressedTexImage3D, and 8095bd8deadSopenharmony_ci CompressedTexSubImage3D calls. Unlike NV_texture_compression_vtc (for 3D 8105bd8deadSopenharmony_ci textures), compressed sub-image updates are allowed at arbitrary locations 8115bd8deadSopenharmony_ci along the Z axis. The language describing CompressedTexSubImage* APIs, 8125bd8deadSopenharmony_ci edited by EXT_texture_compression_s3tc (allowing updates at 4x4 boundaries 8135bd8deadSopenharmony_ci for 2D textures) and NV_texture_compression_vtc (allowing updates at 4x4x4 8145bd8deadSopenharmony_ci boundaries for 3D textures) is updated as follows: 8155bd8deadSopenharmony_ci 8165bd8deadSopenharmony_ci "If the internal format of the texture image being modified is 8175bd8deadSopenharmony_ci COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, 8185bd8deadSopenharmony_ci COMPRESSED_RGBA_S3TC_DXT3_EXT, or COMPRESSED_RGBA_S3TC_DXT5_EXT, the 8195bd8deadSopenharmony_ci texture is stored using one of several S3TC or VTC compressed texture 8205bd8deadSopenharmony_ci image formats. Since these algorithms support only 2D and 3D images, 8215bd8deadSopenharmony_ci CompressedTexSubImage1DARB produces an INVALID_ENUM error if <format> is 8225bd8deadSopenharmony_ci an S3TC/VTC format. Since S3TC/VTC images are easily edited along 4x4, 8235bd8deadSopenharmony_ci 4x4x1, or 4x4x4 texel boundaries, the limitations on 8245bd8deadSopenharmony_ci CompressedTexSubImage2D and CompressedTexSubImage3D are relaxed. 8255bd8deadSopenharmony_ci CompressedTexSubImage2D and CompressedTexSubImage3D will result in an 8265bd8deadSopenharmony_ci INVALID_OPERATION error only if one of the following conditions occurs: 8275bd8deadSopenharmony_ci 8285bd8deadSopenharmony_ci * <width> is not a multiple of four or equal to TEXTURE_WIDTH. 8295bd8deadSopenharmony_ci * <height> is not a multiple of four or equal to TEXTURE_HEIGHT. 8305bd8deadSopenharmony_ci * <xoffset> or <yoffset> is not a multiple of four. 8315bd8deadSopenharmony_ci * <depth> is not a multiple of four or equal to TEXTURE_DEPTH, and 8325bd8deadSopenharmony_ci <target> is TEXTURE_3D. 8335bd8deadSopenharmony_ci * <zoffset> is not a multiple of four and <target> is TEXTURE_3D." 8345bd8deadSopenharmony_ci 8355bd8deadSopenharmony_ci (Note: The original version of this specification incorrectly failed to 8365bd8deadSopenharmony_ci allow compressed subimage updates of array textures via 8375bd8deadSopenharmony_ci CompressedTexSubImage3D, except at 4x4x4 boundaries/sizes. This 8385bd8deadSopenharmony_ci undesirable behavior was also implemented by all NVIDIA OpenGL drivers 8395bd8deadSopenharmony_ci published prior to February 2008.) 8405bd8deadSopenharmony_ci 8415bd8deadSopenharmony_ciErrors 8425bd8deadSopenharmony_ci 8435bd8deadSopenharmony_ci None. Some error conditions are removed, due to the ability to use the 8445bd8deadSopenharmony_ci new TEXTURE_1D_ARRAY_EXT and TEXTURE_2D_ARRAY_EXT enums. 8455bd8deadSopenharmony_ci 8465bd8deadSopenharmony_ciNew State 8475bd8deadSopenharmony_ci 8485bd8deadSopenharmony_ci (add to table 6.15, p. 276) 8495bd8deadSopenharmony_ci 8505bd8deadSopenharmony_ci Initial 8515bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attribute 8525bd8deadSopenharmony_ci ---------------------------- ----- ----------- ----- -------------------- ------ --------- 8535bd8deadSopenharmony_ci TEXTURE_BINDING_1D_ARRAY_EXT 2*xZ+ GetIntegerv 0 texture object bound 3.8.12 texture 8545bd8deadSopenharmony_ci to TEXTURE_1D_ARRAY 8555bd8deadSopenharmony_ci TEXTURE_BINDING_2D_ARRAY_EXT 2*xZ+ GetIntegerv 0 texture object bound 3.8.12 texture 8565bd8deadSopenharmony_ci to TEXTURE_2D_ARRAY 8575bd8deadSopenharmony_ciNew Implementation Dependent State 8585bd8deadSopenharmony_ci 8595bd8deadSopenharmony_ci (add to Table 6.32, p. 293) 8605bd8deadSopenharmony_ci 8615bd8deadSopenharmony_ci Minimum 8625bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attribute 8635bd8deadSopenharmony_ci ---------------------------- ---- ----------- ------- ------------------ ----- --------- 8645bd8deadSopenharmony_ci MAX_ARRAY_TEXTURE_LAYERS_EXT Z+ GetIntegerv 64 maximum number of 3.8.1 - 8655bd8deadSopenharmony_ci layers for texture 8665bd8deadSopenharmony_ci arrays 8675bd8deadSopenharmony_ci 8685bd8deadSopenharmony_ciModifications to The OpenGL Shading Language Specification, Version 1.10.59 8695bd8deadSopenharmony_ci 8705bd8deadSopenharmony_ci (This section describes additions to GLSL to allow shaders to access array 8715bd8deadSopenharmony_ci textures. This is a subset of the new shading language provided by the 8725bd8deadSopenharmony_ci EXT_gpu_shader4 extension, limited to array texture support. It is 8735bd8deadSopenharmony_ci provided here in case implementations choose to support EXT_texture_array 8745bd8deadSopenharmony_ci without supporting EXT_gpu_shader4 or equivalent functionality. 8755bd8deadSopenharmony_ci 8765bd8deadSopenharmony_ci Note that if the EXT_gpu_shader4 extension is enabled in a shader via an 8775bd8deadSopenharmony_ci "#extension" line, there is no need to separately enable 8785bd8deadSopenharmony_ci EXT_texture_array.) 8795bd8deadSopenharmony_ci 8805bd8deadSopenharmony_ci Including the following line in a shader can be used to control the 8815bd8deadSopenharmony_ci language features described in this extension: 8825bd8deadSopenharmony_ci 8835bd8deadSopenharmony_ci #extension GL_EXT_texture_array : <behavior> 8845bd8deadSopenharmony_ci 8855bd8deadSopenharmony_ci where <behavior> is as specified in section 3.3. 8865bd8deadSopenharmony_ci 8875bd8deadSopenharmony_ci A new preprocessor #define is added to the OpenGL Shading Language: 8885bd8deadSopenharmony_ci 8895bd8deadSopenharmony_ci #define GL_EXT_texture_array 1 8905bd8deadSopenharmony_ci 8915bd8deadSopenharmony_ci Add to section 3.6 "Keywords" 8925bd8deadSopenharmony_ci 8935bd8deadSopenharmony_ci The following new sampler types are added: 8945bd8deadSopenharmony_ci 8955bd8deadSopenharmony_ci sampler1DArray, sampler2DArray, sampler1DArrayShadow, 8965bd8deadSopenharmony_ci sampler2DArrayShadow 8975bd8deadSopenharmony_ci 8985bd8deadSopenharmony_ci Add to section 4.1 "Basic Types" 8995bd8deadSopenharmony_ci 9005bd8deadSopenharmony_ci Add the following entries to the type table: 9015bd8deadSopenharmony_ci 9025bd8deadSopenharmony_ci sampler1DArray handle for accessing a 1D array texture 9035bd8deadSopenharmony_ci sampler2DArray handle for accessing a 2D array texture 9045bd8deadSopenharmony_ci sampler1DArrayShadow handle for accessing a 1D array depth texture 9055bd8deadSopenharmony_ci with comparison 9065bd8deadSopenharmony_ci sampler2DArrayShadow handle for accessing a 2D array depth texture 9075bd8deadSopenharmony_ci with comparison 9085bd8deadSopenharmony_ci 9095bd8deadSopenharmony_ci Add to section 8.7 "Texture Lookup Functions" 9105bd8deadSopenharmony_ci 9115bd8deadSopenharmony_ci Add new functions to the set of allowed texture lookup functions: 9125bd8deadSopenharmony_ci 9135bd8deadSopenharmony_ci Syntax: 9145bd8deadSopenharmony_ci 9155bd8deadSopenharmony_ci vec4 texture1DArray(sampler1DArray sampler, vec2 coord 9165bd8deadSopenharmony_ci [, float bias]) 9175bd8deadSopenharmony_ci vec4 texture1DArrayLod(sampler1DArray sampler, vec2 coord, 9185bd8deadSopenharmony_ci float lod) 9195bd8deadSopenharmony_ci 9205bd8deadSopenharmony_ci Description: 9215bd8deadSopenharmony_ci 9225bd8deadSopenharmony_ci Use the first element (coord.s) of texture coordinate coord to do a 9235bd8deadSopenharmony_ci texture lookup in the layer indicated by the second coordinate coord.t of 9245bd8deadSopenharmony_ci the 1D texture array currently bound to sampler. The layer to access is 9255bd8deadSopenharmony_ci computed by layer = max (0, min(d - 1, floor (coord.t + 0.5)) where 'd' is 9265bd8deadSopenharmony_ci the depth of the texture array. 9275bd8deadSopenharmony_ci 9285bd8deadSopenharmony_ci Syntax: 9295bd8deadSopenharmony_ci 9305bd8deadSopenharmony_ci vec4 texture2DArray(sampler2DArray sampler, vec3 coord 9315bd8deadSopenharmony_ci [, float bias]) 9325bd8deadSopenharmony_ci vec4 texture2DArrayLod(sampler2DArray sampler, vec3 coord, 9335bd8deadSopenharmony_ci float lod) 9345bd8deadSopenharmony_ci Description: 9355bd8deadSopenharmony_ci 9365bd8deadSopenharmony_ci Use the first two elements (coord.s, coord.t) of texture coordinate coord 9375bd8deadSopenharmony_ci to do a texture lookup in the layer indicated by the third coordinate 9385bd8deadSopenharmony_ci coord.p of the 2D texture array currently bound to sampler. The layer to 9395bd8deadSopenharmony_ci access is computed by layer = max (0, min(d - 1, floor (coord.p + 0.5)) 9405bd8deadSopenharmony_ci where 'd' is the depth of the texture array. 9415bd8deadSopenharmony_ci 9425bd8deadSopenharmony_ci Syntax: 9435bd8deadSopenharmony_ci 9445bd8deadSopenharmony_ci vec4 shadow1DArray(sampler1DArrayShadow sampler, vec3 coord, 9455bd8deadSopenharmony_ci [float bias]) 9465bd8deadSopenharmony_ci vec4 shadow1DArrayLod(sampler1DArrayShadow sampler, 9475bd8deadSopenharmony_ci vec3 coord, float lod) 9485bd8deadSopenharmony_ci Description: 9495bd8deadSopenharmony_ci 9505bd8deadSopenharmony_ci Use texture coordinate coord.s to do a depth comparison lookup on an array 9515bd8deadSopenharmony_ci layer of the depth texture bound to sampler, as described in section 9525bd8deadSopenharmony_ci 3.8.14 of version 2.0 of the OpenGL specification. The layer to access is 9535bd8deadSopenharmony_ci indicated by the second coordinate coord.t and is computed by layer = max 9545bd8deadSopenharmony_ci (0, min(d - 1, floor (coord.t + 0.5)) where 'd' is the depth of the 9555bd8deadSopenharmony_ci texture array. The third component of coord (coord.p) is used as the R 9565bd8deadSopenharmony_ci value. The texture bound to sampler must be a depth texture, or results 9575bd8deadSopenharmony_ci are undefined. 9585bd8deadSopenharmony_ci 9595bd8deadSopenharmony_ci Syntax: 9605bd8deadSopenharmony_ci 9615bd8deadSopenharmony_ci vec4 shadow2DArray(sampler2DArrayShadow sampler, vec4 coord) 9625bd8deadSopenharmony_ci 9635bd8deadSopenharmony_ci Description: 9645bd8deadSopenharmony_ci 9655bd8deadSopenharmony_ci Use texture coordinate (coord.s, coord.t) to do a depth comparison lookup 9665bd8deadSopenharmony_ci on an array layer of the depth texture bound to sampler, as described in 9675bd8deadSopenharmony_ci section 3.8.14 of version 2.0 of the OpenGL specification. The layer to 9685bd8deadSopenharmony_ci access is indicated by the third coordinate coord.p and is computed by 9695bd8deadSopenharmony_ci layer = max (0, min(d - 1, floor (coord.p + 0.5)) where 'd' is the depth 9705bd8deadSopenharmony_ci of the texture array. The fourth component of coord (coord.q) is used as 9715bd8deadSopenharmony_ci the R value. The texture bound to sampler must be a depth texture, or 9725bd8deadSopenharmony_ci results are undefined. 9735bd8deadSopenharmony_ci 9745bd8deadSopenharmony_ciIssues 9755bd8deadSopenharmony_ci 9765bd8deadSopenharmony_ci (1) Should this extension generalize the notion of 1D and 2D textures to 9775bd8deadSopenharmony_ci be arrays of 1D or 2D images, or simply introduce new targets? 9785bd8deadSopenharmony_ci 9795bd8deadSopenharmony_ci RESOLVED: Introduce new targets. 9805bd8deadSopenharmony_ci 9815bd8deadSopenharmony_ci It would have been possible to simply extend the notion of 1D and 2D 9825bd8deadSopenharmony_ci textures, and allow applications to pass TEXTURE_1D to TexImage2D (1D 9835bd8deadSopenharmony_ci arrays) or TEXTURE_2D to TexImage3D (2D arrays). This would have 9845bd8deadSopenharmony_ci avoided introducing a new set of texture targets (and proxy targets), 9855bd8deadSopenharmony_ci and a "default texture" (object zero) for each new target. 9865bd8deadSopenharmony_ci 9875bd8deadSopenharmony_ci It is desirable to have a distinction between array and non-array 9885bd8deadSopenharmony_ci textures in programmable shaders, so compilers can generate code 9895bd8deadSopenharmony_ci appropriate to the texture type. For "normal" textures, a 2D texture 9905bd8deadSopenharmony_ci requires two component texture coordinates, while a 2D array texture 9915bd8deadSopenharmony_ci requires three. Without a distinction between array and non-array 9925bd8deadSopenharmony_ci textures, implementations must choose between compiling shaders to the 9935bd8deadSopenharmony_ci most general form (2D arrays) or recompiling shaders based on texture 9945bd8deadSopenharmony_ci usage. Texture lookups with shadow mapping, LOD bias, or per-pixel LOD 9955bd8deadSopenharmony_ci have additional complexity, and the interpretation of a coordinate 9965bd8deadSopenharmony_ci vector may need to depend on whether the texture was an array or 9975bd8deadSopenharmony_ci non-array texture. 9985bd8deadSopenharmony_ci 9995bd8deadSopenharmony_ci It would be possible to limit the distinction between array and 10005bd8deadSopenharmony_ci non-array textures to the shaders, but it could then become the 10015bd8deadSopenharmony_ci responsibility of the application developer to ensure that a texture 10025bd8deadSopenharmony_ci with multiple layers is used when an "array lookup" is performed, and 10035bd8deadSopenharmony_ci that a single-layer texture is used when a "non-array lookup" is 10045bd8deadSopenharmony_ci performed. That begs the question of what the distinction between an 10055bd8deadSopenharmony_ci "array texture" and a "non-array texture" is. At least two possible 10065bd8deadSopenharmony_ci distinctions have been identified: one vs. multiple layers, or the API 10075bd8deadSopenharmony_ci call used to specify the texture (TexImage3D with TEXTURE_2D == array 10085bd8deadSopenharmony_ci texture, TexImage2D == non-array texture). The former does not allow 10095bd8deadSopenharmony_ci for the possibility of single-layer array textures; it may be the case 10105bd8deadSopenharmony_ci that application developers want to use a general shader supporting 10115bd8deadSopenharmony_ci array textures, but there may be cases where only a single layer might 10125bd8deadSopenharmony_ci be provided. The latter approach allows for single-layer array 10135bd8deadSopenharmony_ci textures, but the distinction is now based on the API call. 10145bd8deadSopenharmony_ci 10155bd8deadSopenharmony_ci Adding separate targets eliminates the need for such a distinction. 10165bd8deadSopenharmony_ci "Array lookups" refer to the TEXTURE_1D_ARRAY_EXT or 10175bd8deadSopenharmony_ci TEXTURE_2D_ARRAY_EXT targets; "non-array lookups" refer to TEXTURE_1D or 10185bd8deadSopenharmony_ci TEXTURE_2D. There is never a case where the wrong kind of texture can 10195bd8deadSopenharmony_ci be used, as TEXTURE_1D_ARRAY_EXT and TEXTURE_2D_ARRAY_EXT textures are 10205bd8deadSopenharmony_ci always arrays by definition. 10215bd8deadSopenharmony_ci 10225bd8deadSopenharmony_ci This distinction should also be helpful if and when fixed-function 10235bd8deadSopenharmony_ci fragment processing is supported; the enabled texture target is used to 10245bd8deadSopenharmony_ci generate an internal fragment shader using the proper "array lookup". 10255bd8deadSopenharmony_ci There would be no need to recompile shaders depending on whether an 10265bd8deadSopenharmony_ci enabled texture is an "array texture" or not. 10275bd8deadSopenharmony_ci 10285bd8deadSopenharmony_ci (2) Should texture arrays be supported for fixed-function fragment 10295bd8deadSopenharmony_ci processing? 10305bd8deadSopenharmony_ci 10315bd8deadSopenharmony_ci RESOLVED: No; it's not believed to be worth the effort. Fixed-function 10325bd8deadSopenharmony_ci fragment processing could be easily supported by allowing applications 10335bd8deadSopenharmony_ci to enable or disable TEXTURE_1D_ARRAY_EXT or TEXTURE_2D_ARRAY_EXT. 10345bd8deadSopenharmony_ci 10355bd8deadSopenharmony_ci Note that for fixed-function fragment processing, there would be issues 10365bd8deadSopenharmony_ci with texture lookups of two-dimensional array textures with shadow 10375bd8deadSopenharmony_ci mapping. Given that all texture lookups are projective, a total of five 10385bd8deadSopenharmony_ci coordinate components would be required (s, t, layer, depth, q). 10395bd8deadSopenharmony_ci 10405bd8deadSopenharmony_ci (3) If fixed-function were supported, should the layer number (T or R) be 10415bd8deadSopenharmony_ci divided by Q in projective texture lookups? 10425bd8deadSopenharmony_ci 10435bd8deadSopenharmony_ci RESOLVED: It doesn't need to be resolved in this extension, but it 10445bd8deadSopenharmony_ci would be a problem. There are probably cases where an application would 10455bd8deadSopenharmony_ci want the divide (handle R more-or-less like S/T); there are probably 10465bd8deadSopenharmony_ci other cases where the divide would not be wanted. Many developers won't 10475bd8deadSopenharmony_ci care, and may not even know what the Q coordinate is used for! The 10485bd8deadSopenharmony_ci default of 1.0 allows applications that don't care about projective 10495bd8deadSopenharmony_ci lookups to simply ignore that fact. 10505bd8deadSopenharmony_ci 10515bd8deadSopenharmony_ci For programmable fragment shading, an application can code it either way 10525bd8deadSopenharmony_ci and use non-projective lookups. To the extent that the divide by Q for 10535bd8deadSopenharmony_ci projective lookups is "free" or "cheap" on OpenGL hardware, compilers 10545bd8deadSopenharmony_ci may be able to recognize a projective pattern in the computed 10555bd8deadSopenharmony_ci coordinates and generate code appropriately. 10565bd8deadSopenharmony_ci 10575bd8deadSopenharmony_ci (4) Should DEPTH_COMPONENT textures be supported for texture arrays? 10585bd8deadSopenharmony_ci 10595bd8deadSopenharmony_ci RESOLVED: Yes; multi-layer shadow maps are useful. 10605bd8deadSopenharmony_ci 10615bd8deadSopenharmony_ci (5) How should shadow mapping in texture arrays work with programmable 10625bd8deadSopenharmony_ci shaders, and fixed-function shaders (if ever supported)? 10635bd8deadSopenharmony_ci 10645bd8deadSopenharmony_ci RESOLVED: The layer number is in the "next" coordinate following the 10655bd8deadSopenharmony_ci normal 1D or 2D coordinate. That's the "t" coordinate for 1D arrays and 10665bd8deadSopenharmony_ci the "r" coordinate for 2D arrays. For shadow maps, this is a problem, 10675bd8deadSopenharmony_ci as the "r" coordinate is generally used as the depth reference value. 10685bd8deadSopenharmony_ci This is resolved by instead taking the depth reference value from the 10695bd8deadSopenharmony_ci "q" coordinate. 10705bd8deadSopenharmony_ci 10715bd8deadSopenharmony_ci For some programmable texture lookups (explicit LOD, LOD bias, 10725bd8deadSopenharmony_ci projective), "too many" coordinates are required. Such lookups are not 10735bd8deadSopenharmony_ci possible with four-component vectors; it would require at least two 10745bd8deadSopenharmony_ci parameters to perform such operations. 10755bd8deadSopenharmony_ci 10765bd8deadSopenharmony_ci For fixed-function shading, it is recommended that shadow mapping 10775bd8deadSopenharmony_ci lookups in two-dimensional array textures be treated as non-projective, 10785bd8deadSopenharmony_ci even though all other lookups would be projective. Additionally, the 10795bd8deadSopenharmony_ci "q" coordinate should be used for the depth reference value in this 10805bd8deadSopenharmony_ci case. 10815bd8deadSopenharmony_ci 10825bd8deadSopenharmony_ci (6) How do texture borders interact with array textures? 10835bd8deadSopenharmony_ci 10845bd8deadSopenharmony_ci RESOLVED: Each individual layer of an array texture can have a border, 10855bd8deadSopenharmony_ci as though it were a normal one- or two-dimensional texture. However, 10865bd8deadSopenharmony_ci there are no "border layers". 10875bd8deadSopenharmony_ci 10885bd8deadSopenharmony_ci (7) How does mipmapping work with array textures? 10895bd8deadSopenharmony_ci 10905bd8deadSopenharmony_ci RESOLVED: Level <N+1> is half the size of level <N> in width and/or 10915bd8deadSopenharmony_ci height, but the number of layers is always the same for each level -- 10925bd8deadSopenharmony_ci layer <M> of level <N+1> is expected to be a filtered version of layer 10935bd8deadSopenharmony_ci <M> of the higher mipmap levels. This behavior impacts the texture 10945bd8deadSopenharmony_ci consistency rules for array textures. 10955bd8deadSopenharmony_ci 10965bd8deadSopenharmony_ci (8) Are compressed textures supported for array textures? 10975bd8deadSopenharmony_ci 10985bd8deadSopenharmony_ci RESOLVED: Yes; they may be loaded via normal TexImage APIs, as well as 10995bd8deadSopenharmony_ci CompressedTexImage2D and CompressedTexImage3D. Compressed array 11005bd8deadSopenharmony_ci textures are treated as arrays of compressed 1D or 2D images. 11015bd8deadSopenharmony_ci 11025bd8deadSopenharmony_ci (9) Should these things be called "array textures" or "texture arrays"? 11035bd8deadSopenharmony_ci 11045bd8deadSopenharmony_ci RESOLVED: "Array textures", mostly because it was easier spec wording. 11055bd8deadSopenharmony_ci Calling them "array textures" also seems like better disambiguation; 11065bd8deadSopenharmony_ci there are several different things that can be thought of as "texture 11075bd8deadSopenharmony_ci arrays": 11085bd8deadSopenharmony_ci 11095bd8deadSopenharmony_ci * the array of texture levels (mipmapping) 11105bd8deadSopenharmony_ci * the array of texture layers (array textures) 11115bd8deadSopenharmony_ci * the array of texels in each image 11125bd8deadSopenharmony_ci 11135bd8deadSopenharmony_ci This spec changes the use of "texture array" in the core specification 11145bd8deadSopenharmony_ci (which means the array of texels) to instead refer to "texel array". 11155bd8deadSopenharmony_ci 11165bd8deadSopenharmony_ci (10) If they're called "array textures", why does the extension name 11175bd8deadSopenharmony_ci include "texture_array"? 11185bd8deadSopenharmony_ci 11195bd8deadSopenharmony_ci RESOLVED: Because this is primarily a texture extension, and all such 11205bd8deadSopenharmony_ci extensions start with "texture". 11215bd8deadSopenharmony_ci 11225bd8deadSopenharmony_ci (11) Should new functions be provided for loading or modifying array 11235bd8deadSopenharmony_ci textures? 11245bd8deadSopenharmony_ci 11255bd8deadSopenharmony_ci RESOLVED: No. Existing TexImage2D (1D arrays) and TexImage3D (2D 11265bd8deadSopenharmony_ci arrays), plus corresponding TexSubImage, CopyTexImage, and 11275bd8deadSopenharmony_ci CopyTexSubImage calls are sufficient. 11285bd8deadSopenharmony_ci 11295bd8deadSopenharmony_ci (12) Should ARB_imaging functionality to be extended to support 11305bd8deadSopenharmony_ci two-dimensional array textures? 11315bd8deadSopenharmony_ci 11325bd8deadSopenharmony_ci RESOLVED: No. Convolution is rarely used when texture images are 11335bd8deadSopenharmony_ci defined, and is even less likely for array teture images. This could be 11345bd8deadSopenharmony_ci addressed via a separate extension if the need were identified, and such 11355bd8deadSopenharmony_ci operations could be defined for 3D textures as well at that time. 11365bd8deadSopenharmony_ci 11375bd8deadSopenharmony_ci Note that with the API chosen, one-dimensional array textures do have 11385bd8deadSopenharmony_ci convolution applied (if enabled), because image data is treated as a 11395bd8deadSopenharmony_ci normal two-dimensional image. 11405bd8deadSopenharmony_ci 11415bd8deadSopenharmony_ci (13) What if an application wants to populate an array texture using 11425bd8deadSopenharmony_ci separate mipmap chains a layer at a time rather than specifying all 11435bd8deadSopenharmony_ci layers of a given mipmap level at once? 11445bd8deadSopenharmony_ci 11455bd8deadSopenharmony_ci RESOLVED: For 2D array textures, call TexImage3D once with a NULL image 11465bd8deadSopenharmony_ci pointer for each level to establish the texel array sizes. Then, call 11475bd8deadSopenharmony_ci TexSubImage3D for each layer/mipmap level to define individual images. 11485bd8deadSopenharmony_ci 11495bd8deadSopenharmony_ci (14) Should we provide a way to query a single layer of an array texture? 11505bd8deadSopenharmony_ci 11515bd8deadSopenharmony_ci RESOLVED: No; we don't expect this to be an issue in practice. 11525bd8deadSopenharmony_ci GetTexImage() will return a two- or three-dimensional image for one- and 11535bd8deadSopenharmony_ci two-dimensional arrays, including all levels. If this were identified 11545bd8deadSopenharmony_ci as an important need, a follow-on extension could be added in the 11555bd8deadSopenharmony_ci future. 11565bd8deadSopenharmony_ci 11575bd8deadSopenharmony_ci (15) How is the LOD (lambda) computed for array textures? 11585bd8deadSopenharmony_ci 11595bd8deadSopenharmony_ci RESOLVED: LOD is computed in the same manner for 1D and 2D array 11605bd8deadSopenharmony_ci textures as it is for normal 1D and 2D textures. The layer coordinate 11615bd8deadSopenharmony_ci has no effect on LOD computations. 11625bd8deadSopenharmony_ci 11635bd8deadSopenharmony_ci (16) What's the deal with this new "COMPARE_REF_DEPTH_TO_TEXTURE_EXT"? 11645bd8deadSopenharmony_ci 11655bd8deadSopenharmony_ci RESOLVED: It's a new name for the existing enumerant 11665bd8deadSopenharmony_ci "COMPARE_R_TO_TEXTURE". This alternate name is provided to reflect the 11675bd8deadSopenharmony_ci fact that it's not always the R coordinate that is used for depth 11685bd8deadSopenharmony_ci comparisons. 11695bd8deadSopenharmony_ci 11705bd8deadSopenharmony_ci (17) How do array textures work with framebuffer objects 11715bd8deadSopenharmony_ci (EXT_framebuffer_object extension, also known as "FBO")? 11725bd8deadSopenharmony_ci 11735bd8deadSopenharmony_ci RESOLVED: A new function, FramebufferTextureLayerEXT(), is provided to 11745bd8deadSopenharmony_ci attach a single layer of a one- or two-dimensional array texture to an 11755bd8deadSopenharmony_ci framebuffer attachment point. That new function can also be used to 11765bd8deadSopenharmony_ci attach a layer of a three-dimensional texture. 11775bd8deadSopenharmony_ci 11785bd8deadSopenharmony_ci In addition to supporting FBO attachments, the manual mipmap generation 11795bd8deadSopenharmony_ci support provided by glGenerateMipmapEXT is extended to array textures. 11805bd8deadSopenharmony_ci Mipmap generation applies to each layer of the array texture 11815bd8deadSopenharmony_ci independently, as is the case with the GENERATE_MIPMAPS texture 11825bd8deadSopenharmony_ci parameter. 11835bd8deadSopenharmony_ci 11845bd8deadSopenharmony_ci This support provided here a limited subset of the FBO support added by 11855bd8deadSopenharmony_ci NV_geometry_program4, which additionally provides the ability to attach 11865bd8deadSopenharmony_ci an entire level of a three-dimensional, cube map, or array texture. 11875bd8deadSopenharmony_ci When such attachments are performed, a geometry program can be used to 11885bd8deadSopenharmony_ci select a layer to render each emitted primitive to. 11895bd8deadSopenharmony_ci 11905bd8deadSopenharmony_ci (18) Should array texture targets be supported for creation of "render 11915bd8deadSopenharmony_ci buffers"? 11925bd8deadSopenharmony_ci 11935bd8deadSopenharmony_ci RESOLVED: No. These are inherently two-dimensional images. 11945bd8deadSopenharmony_ci 11955bd8deadSopenharmony_ci (19) Should we provide a mipmap generation function to generate mipmaps 11965bd8deadSopenharmony_ci for only a single layer of an array texture? 11975bd8deadSopenharmony_ci 11985bd8deadSopenharmony_ci RESOLVED: Not in this extension. We considered adding this toward the 11995bd8deadSopenharmony_ci end of the development of this extension, but decided not to add it 12005bd8deadSopenharmony_ci because this mipmap generation function would have very different 12015bd8deadSopenharmony_ci requirements from the GenerateMipmapEXT function provided by 12025bd8deadSopenharmony_ci EXT_framebuffer_object. 12035bd8deadSopenharmony_ci 12045bd8deadSopenharmony_ci The existing GenerateMipmapEXT function replaces all levels of detail 12055bd8deadSopenharmony_ci below the base level with generated mipmaps. If those mipmap levels are 12065bd8deadSopenharmony_ci unpopulated or inconsistent with the base level, they are completely 12075bd8deadSopenharmony_ci overwritten with a generated image that is consistent with the base 12085bd8deadSopenharmony_ci level. If we were to provide a function to generate mipmaps for only a 12095bd8deadSopenharmony_ci single layer, all other layers of non-base levels would need to be 12105bd8deadSopenharmony_ci preserved. However, since there are not separate formats or sizes per 12115bd8deadSopenharmony_ci level, this form of mipmap generation would require that all non-base 12125bd8deadSopenharmony_ci levels be present and consistent with the base level, or mipmap 12135bd8deadSopenharmony_ci generation wouldn't work. 12145bd8deadSopenharmony_ci 12155bd8deadSopenharmony_ci We expect that future revisions of the GL will change the specification 12165bd8deadSopenharmony_ci of mipmapped textures in 12175bd8deadSopenharmony_ci 12185bd8deadSopenharmony_ci (20) This extension allows the use of S3TC texture internal formats in 12195bd8deadSopenharmony_ci TexImage3D and CompressedTexImage3D. Does this mean that they are 12205bd8deadSopenharmony_ci now supported for 3D textures? 12215bd8deadSopenharmony_ci 12225bd8deadSopenharmony_ci RESOLVED: No. With this extension alone, TexImage3D and 12235bd8deadSopenharmony_ci CompressedTexImage3D only support S3TC compressed formats with a target 12245bd8deadSopenharmony_ci of TEXTURE_2D_ARRAY_EXT. The S3TC tokens were added to the list of 12255bd8deadSopenharmony_ci internal formats supported by TexImage3D and friends because 12265bd8deadSopenharmony_ci two-dimensional array textures are specified using the three-dimensional 12275bd8deadSopenharmony_ci TexImage functions. 12285bd8deadSopenharmony_ci 12295bd8deadSopenharmony_ci The existing extension NV_texture_compression_vtc does provides support 12305bd8deadSopenharmony_ci for S3TC-style compressed 3D textures. 12315bd8deadSopenharmony_ci 12325bd8deadSopenharmony_ciRevision History 12335bd8deadSopenharmony_ci 12345bd8deadSopenharmony_ci Rev. Date Author Changes 12355bd8deadSopenharmony_ci ---- -------- -------- ----------------------------------------- 12365bd8deadSopenharmony_ci 8 09/16/08 mjk Document GenerateMipmapEXT allows array targets 12375bd8deadSopenharmony_ci 7 08/07/08 jleech Corrected token MAX_TEXTURE_ARRAY_LAYERS_EXT in 12385bd8deadSopenharmony_ci state table to MAX_ARRAY_TEXTURE_LAYERS_EXT. 12395bd8deadSopenharmony_ci 12405bd8deadSopenharmony_ci 6 02/04/08 pbrown Added a missing interaction with the VTC texture 12415bd8deadSopenharmony_ci compression spec allowing updates of compressed 12425bd8deadSopenharmony_ci 2D array textures along 4x4x1 boundaries (we 12435bd8deadSopenharmony_ci previously inherited the VTC restriction of 12445bd8deadSopenharmony_ci 4x4x4). 12455bd8deadSopenharmony_ci 12465bd8deadSopenharmony_ci 5 12/15/06 pbrown Documented that the '#extension' token 12475bd8deadSopenharmony_ci for this extension should begin with "GL_", 12485bd8deadSopenharmony_ci as apparently called for per convention. 12495bd8deadSopenharmony_ci 12505bd8deadSopenharmony_ci 4 -- Pre-release revisions. 1251