15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    ARB_texture_cube_map_array
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_ARB_texture_cube_map_array
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Nick Haemel, AMD (nick.haemel 'at' amd.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci    Jeff Bolz,       NVIDIA
155bd8deadSopenharmony_ci    Yunjun Zhang,    AMD
165bd8deadSopenharmony_ci    Bill Licea-Kane, AMD
175bd8deadSopenharmony_ci    Graham Sellers,  AMD
185bd8deadSopenharmony_ci    Daniel Koch,     TransGaming
195bd8deadSopenharmony_ci    Mark Young,      AMD
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciNotice
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    Copyright (c) 2009-2013 The Khronos Group Inc. Copyright terms at
245bd8deadSopenharmony_ci        http://www.khronos.org/registry/speccopyright.html
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciSpecification Update Policy
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    Khronos-approved extension specifications are updated in response to
295bd8deadSopenharmony_ci    issues and bugs prioritized by the Khronos OpenGL Working Group. For
305bd8deadSopenharmony_ci    extensions which have been promoted to a core Specification, fixes will
315bd8deadSopenharmony_ci    first appear in the latest version of that core Specification, and will
325bd8deadSopenharmony_ci    eventually be backported to the extension document. This policy is
335bd8deadSopenharmony_ci    described in more detail at
345bd8deadSopenharmony_ci        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciStatus
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Complete. Approved by the ARB on July 3, 2009.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciVersion
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    Last Modified Date: 12/07/2009
435bd8deadSopenharmony_ci    Author revision:    9
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ciNumber
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    ARB Extension #71
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciDependencies
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    This extension is written against the OpenGL 3.0 specification and
525bd8deadSopenharmony_ci    version 1.30.08 of the OpenGL Shading Language specification.
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ciOverview
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci    The GL_EXT_texture_array extension, and subsequently OpenGL 3.0 have
575bd8deadSopenharmony_ci    introduced the concept of one- and two-dimensional array textures.
585bd8deadSopenharmony_ci    An array texture is an ordered set of images with the same size and
595bd8deadSopenharmony_ci    format. Each image in an array texture has a unique level. This
605bd8deadSopenharmony_ci    extension expands texture array support to include cube map
615bd8deadSopenharmony_ci    textures.
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    A cube map array texture is a 2-dimensional array texture that may
645bd8deadSopenharmony_ci    contain many cube map layers. Each cube map layer is a unique cube
655bd8deadSopenharmony_ci    map image set. Images in a cube map array have the same size and
665bd8deadSopenharmony_ci    format limitations as one- and two-dimensional array textures. A
675bd8deadSopenharmony_ci    cube map array texture is specified using TexImage3D in a similar
685bd8deadSopenharmony_ci    manner to two-dimensional arrays. Cube map array textures can be
695bd8deadSopenharmony_ci    bound to a render targets of a frame buffer object as
705bd8deadSopenharmony_ci    two-dimensional arrays are using FramebufferTextureLayer.
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci    When accessed by a programmable shader, a cube map array texture
735bd8deadSopenharmony_ci    acts as a single unit. The "s", "t", "r" texture coordinates are
745bd8deadSopenharmony_ci    treated as a regular cube map texture fetch. The "q" texture is
755bd8deadSopenharmony_ci    treated as an unnormalized floating-point value identifying the
765bd8deadSopenharmony_ci    layer of the cube map array texture. Cube map array texture lookups
775bd8deadSopenharmony_ci    do not filter between layers.
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    This extension does not provide for the use of cube map array
805bd8deadSopenharmony_ci    textures with fixed-function fragment processing.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ciNew Procedures and Functions
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci    None
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ciNew Tokens
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci    Accepted by the <target> parameter of TexParameteri, TexParameteriv,
895bd8deadSopenharmony_ci    TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap:
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_ARRAY_ARB                      0x9009
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
945bd8deadSopenharmony_ci    GetIntegerv and GetFloatv:
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci        TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB              0x900A
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    Accepted by the <target> parameter of TexImage3D, TexSubImage3D,
995bd8deadSopenharmony_ci    CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D:
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_ARRAY_ARB
1025bd8deadSopenharmony_ci        PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB                0x900B
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci    Accepted by the <tex> parameter of GetTexImage:
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_ARRAY_ARB
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci    Returned by the <type> parameter of GetActiveUniform:
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci        SAMPLER_CUBE_MAP_ARRAY_ARB                      0x900C
1115bd8deadSopenharmony_ci        SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB               0x900D
1125bd8deadSopenharmony_ci        INT_SAMPLER_CUBE_MAP_ARRAY_ARB                  0x900E
1135bd8deadSopenharmony_ci        UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB         0x900F
1145bd8deadSopenharmony_ci
1155bd8deadSopenharmony_ciAdditions to Chapter 2 of OpenGL 3.0 Specification (OpenGL Operation)
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci    Modify section 2.20.3 "Shader Variables", page 91
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci    (Add the following new return type to the 3rd paragraph on p.97)
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci      SAMPLER_CUBE_MAP_ARRAY_ARB,
1225bd8deadSopenharmony_ci      SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB,
1235bd8deadSopenharmony_ci      INT_SAMPLER_CUBE_MAP_ARRAY_ARB,
1245bd8deadSopenharmony_ci      UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB,
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ciAddition to Chapter 3 of OpenGL 3.0 Specification (Rasterization)
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci    Modify section 3.9, "Texturing", page 175
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ci    (modify the 3rd paragraph, p.175)
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    Six types of texture are supported; each is a collection of images
1335bd8deadSopenharmony_ci    built from one-, two-, or three-dimensional array of image elements
1345bd8deadSopenharmony_ci    referred to as texels. One-, two-, and three-dimensional textures
1355bd8deadSopenharmony_ci    consist respectively of one-, two-, or three-dimensional texel
1365bd8deadSopenharmony_ci    arrays. One- and two-dimensional array textures are arrays of one-
1375bd8deadSopenharmony_ci    or two-dimensional images, consisting of one or more layers. A cube
1385bd8deadSopenharmony_ci    map is a special two-dimensional array texture with six layers that
1395bd8deadSopenharmony_ci    represent the faces of a cube. When accessing a cube map, the
1405bd8deadSopenharmony_ci    texture coordinates are projected onto one of the six faces of the
1415bd8deadSopenharmony_ci    cube. Finally a cube map array is a collection of cube map layers
1425bd8deadSopenharmony_ci    stored as a two-dimensional array texture. When accessing a cube map
1435bd8deadSopenharmony_ci    array, the texture coordinate "s", "t", "r" are applied similarly as
1445bd8deadSopenharmony_ci    cube map while the last texture coordinate "q" is used as the index
1455bd8deadSopenharmony_ci    of on the cube map slices.
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci    Modify Section 3.9.1, Texture Image Specification, page 176
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    (modify the first paragraph of section, p. 176)
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ci    The command
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci      void TexImage3D( enum target, int level, int internalformat,
1555bd8deadSopenharmony_ci                       sizei width, sizei height, sizei depth, int border,
1565bd8deadSopenharmony_ci                       enum format, enum type, void *data );
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    is used to specify a three-dimensional texture image. <target> must
1595bd8deadSopenharmony_ci    be one of TEXTURE_3D for a three-dimensional texture or
1605bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY for a two-dimensional array texture or
1615bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB. Additionally, target may be
1625bd8deadSopenharmony_ci    PROXY_TEXTURE_3D for a three-dimensional proxy texture,
1635bd8deadSopenharmony_ci    PROXY_TEXTURE_2D_ARRAY for a two-dimensional proxy array texture, or
1645bd8deadSopenharmony_ci    PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB for a proxy cube map array texture.
1655bd8deadSopenharmony_ci    If target is TEXTURE_CUBE_MAP_ARRAY_ARB or
1665bd8deadSopenharmony_ci    PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB, specifying a depth value that is
1675bd8deadSopenharmony_ci    not a multiple of six results in an error of INVALID_VALUE.
1685bd8deadSopenharmony_ci    INVALID_VALUE is also generated if the width and the height
1695bd8deadSopenharmony_ci    parameters are not equal. ...
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    When <target> is TEXTURE_CUBE_MAP_ARRAY_ARB or
1725bd8deadSopenharmony_ci    PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB <width> and <height> must be equal,
1735bd8deadSopenharmony_ci    otherwise the error INVALID_VALUE is generated. Also, <depth> must
1745bd8deadSopenharmony_ci    be a multiple of six indicating 6N layer-faces in the cube map
1755bd8deadSopenharmony_ci    array, otherwise the error INVALID_VALUE is generated.
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ci    (modify the third paragraph of section, p. 177)
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ci    Textures with a base internal format of DEPTH_COMPONENT or
1815bd8deadSopenharmony_ci    DEPTH_STENCIL are supported by texture image specification commands
1825bd8deadSopenharmony_ci    only if target is TEXTURE_1D, TEXTURE_2D, TEXTURE_1D_ARRAY,
1835bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY_ARB,
1845bd8deadSopenharmony_ci    PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_1D_ARRAY,
1855bd8deadSopenharmony_ci    PROXY_TEXTURE_2D_ARRAY, PROXY_TEXTURE_CUBE_MAP or
1865bd8deadSopenharmony_ci    PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB. ...
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci
1895bd8deadSopenharmony_ci    (modify the second paragraph of section, p.186)
1905bd8deadSopenharmony_ci
1915bd8deadSopenharmony_ci    and w_b, h_b, and d_b are the specified border width, height, and
1925bd8deadSopenharmony_ci    depth. wb and hb are the specified border value; d_b is the
1935bd8deadSopenharmony_ci    specified border value if target is TEXTURE_3D, or zero if target is
1945bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP_ARRAY_ARB. Thus the last
1955bd8deadSopenharmony_ci    two-dimensional image slice of the three-dimensional image is
1965bd8deadSopenharmony_ci    indexed with the highest value of k. When <target> is
1975bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB. specifying a cube map array texture, k
1985bd8deadSopenharmony_ci    refers to a layer-face. The layer is given by
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci        layer = floor(k/6),
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci    and the face is given by
2035bd8deadSopenharmony_ci
2045bd8deadSopenharmony_ci        face = k mod 6
2055bd8deadSopenharmony_ci
2065bd8deadSopenharmony_ci    When
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci        face = 0: TEXTURE_CUBE_MAP_POSITVE_X,
2095bd8deadSopenharmony_ci        face = 1: TEXTURE_CUBE_MAP_NEGATIVE_X,
2105bd8deadSopenharmony_ci        face = 2: TEXTURE_CUBE_MAP_POSITVE_Y,
2115bd8deadSopenharmony_ci        face = 3: TEXTURE_CUBE_MAP_NEGATIVE_Y,
2125bd8deadSopenharmony_ci        face = 4: TEXTURE_CUBE_MAP_POSITVE_Z,
2135bd8deadSopenharmony_ci        face = 5: TEXTURE_CUBE_MAP_NEGATIVE_Z.
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci
2165bd8deadSopenharmony_ci    (modify the fifth paragraph of section, p. 187)
2175bd8deadSopenharmony_ci
2185bd8deadSopenharmony_ci    ... The maximum allowable width and height of a cube map or cube map
2195bd8deadSopenharmony_ci    array texture must be the same, and must be at least 2^(k-lod) + 2 *
2205bd8deadSopenharmony_ci    b_t for image arrays level 0 through k, where k is the log base 2 of
2215bd8deadSopenharmony_ci    MAX_CUBE_MAP_TEXTURE_SIZE. The maximum number of layers for one- and
2225bd8deadSopenharmony_ci    two-dimensional array textures (height or depth, respectively), and
2235bd8deadSopenharmony_ci    the maximum number of layer-faces for cube map array textures
2245bd8deadSopenharmony_ci    (depth) must be at least MAX_ARRAY_TEXTURE_LAYERS_EXT for all
2255bd8deadSopenharmony_ci    levels.
2265bd8deadSopenharmony_ci
2275bd8deadSopenharmony_ci    (modify the second last paragraph, p. 189)
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci    An element (i, j, k) of the texel array is called a texel (for a
2305bd8deadSopenharmony_ci    two-dimensional texture or one-dimensional array texture, k is
2315bd8deadSopenharmony_ci    irrelevant; for a one-dimensional texture, j and k are both
2325bd8deadSopenharmony_ci    irrelevant). If target is TEXTURE_2D_ARRAY or TEXTURE_3D, the
2335bd8deadSopenharmony_ci    texture value for a fragment is determined by that fragment's
2345bd8deadSopenharmony_ci    associated (s, t, r) coordinates, but may not correspond to any
2355bd8deadSopenharmony_ci    actual texel. See figure 3.10. If target is
2365bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB, the texture value is determined by (s,
2375bd8deadSopenharmony_ci    t, r, q) coordinates where "s", "t", "r" is defined to be the same
2385bd8deadSopenharmony_ci    as for TEXTURE_CUBE_MAP and "q" is defined as the index of a
2395bd8deadSopenharmony_ci    specific cube map in the cube map array.
2405bd8deadSopenharmony_ci
2415bd8deadSopenharmony_ci
2425bd8deadSopenharmony_ci    (modify the first paragraph, p. 193)
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci    ... and the target arguments of TexSubImage3D and CopyTexSubImage3D
2455bd8deadSopenharmony_ci    must be TEXTURE_3D, TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP_ARRAY_ARB.
2465bd8deadSopenharmony_ci    The level parameter of each command specifies the level of the texel
2475bd8deadSopenharmony_ci    array that is modified. If level is less than zero or greater than
2485bd8deadSopenharmony_ci    the base 2 logarithm of the maximum texture width, height, or depth,
2495bd8deadSopenharmony_ci    the error INVALID VALUE is generated.
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci    (modify the second to last paragraph, p. 193)
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci    Arguments <xoffset>, <yoffset>, and <zoffset> of TexSubImage3D and
2545bd8deadSopenharmony_ci    CopyTex- SubImage3D specify the lower left texel coordinates of a
2555bd8deadSopenharmony_ci    <width>-wide by <height>-high by <depth>-deep rectangular subregion
2565bd8deadSopenharmony_ci    of the texel array. For cube map array textures, <zoffset> is the
2575bd8deadSopenharmony_ci    first layer-face to update, and <depth> is the number layer-faces to
2585bd8deadSopenharmony_ci    update. The depth argument ...
2595bd8deadSopenharmony_ci
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci    Modify Section 3.9.4, Texture Parameters, page 200
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci    (modify the first paragraph of section, p. 200)
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ci    ... target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
2665bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP or
2675bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB. ...
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci
2705bd8deadSopenharmony_ci    (modify third paragraph, p. 204)
2715bd8deadSopenharmony_ci
2725bd8deadSopenharmony_ci    ... For a one-dimensional or one-dimensional array texture, define
2735bd8deadSopenharmony_ci    v(x, y) == 0 and w(x, y) == 0; for a two-dimensional,
2745bd8deadSopenharmony_ci    two-dimensional array, cube map, or cube map array texture define
2755bd8deadSopenharmony_ci    w(x, y) == 0. ...
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci
2785bd8deadSopenharmony_ci    (modify the first paragraph of "Mipmapping", p.209)
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci    If the image array of level level_base, excluding its border, has
2815bd8deadSopenharmony_ci    dimensions, w_t x h_t x d_t, then there are floor(log2(maxsize)) + 1
2825bd8deadSopenharmony_ci    levels in the mipmap, where
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci      maxsize = w_t,        for one-dimensional and one-dimensional
2855bd8deadSopenharmony_ci                            array textures,
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci      max(w_t, h_t),        for two-dimensional, two-dimensional array,
2885bd8deadSopenharmony_ci                            cube map and cube map array textures,
2895bd8deadSopenharmony_ci
2905bd8deadSopenharmony_ci      max(w_t, h_t, d_t),   for three dimensional textures.
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ci    (modify the third paragraph in the "Automatic Mipmap Generation", p. 211)
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci    The contents of the derived arrays are computed by repeated,
2965bd8deadSopenharmony_ci    filtered reduction of the level_base array. For one- ,
2975bd8deadSopenharmony_ci    two-dimensional or cube map array textures, each layer is filtered
2985bd8deadSopenharmony_ci    independently. ...
2995bd8deadSopenharmony_ci
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci    (modify the first paragraph in the "Manual Mipmap Generation", p. 211)
3025bd8deadSopenharmony_ci    Mipmaps can be generated manually with the command
3035bd8deadSopenharmony_ci
3045bd8deadSopenharmony_ci        void GenerateMipmap( enum target );
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci    where target is one of TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
3075bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP, or
3085bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB. ...
3095bd8deadSopenharmony_ci
3105bd8deadSopenharmony_ci
3115bd8deadSopenharmony_ci    Modify Section 3.9.10, Texture Completeness, page 212
3125bd8deadSopenharmony_ci
3135bd8deadSopenharmony_ci    (add a new paragraph in the end of the section, p. 213)
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci    A cube map array texture is cube array complete if it is complete
3165bd8deadSopenharmony_ci    when treated as a two-dimensional array and cube complete for every
3175bd8deadSopenharmony_ci    cube map slice within the array texture.
3185bd8deadSopenharmony_ci
3195bd8deadSopenharmony_ci
3205bd8deadSopenharmony_ci    Modify Section 3.9.11, Texture State and Proxy State, page 214
3215bd8deadSopenharmony_ci
3225bd8deadSopenharmony_ci    (modify second and third paragraphs, p. 214)
3235bd8deadSopenharmony_ci
3245bd8deadSopenharmony_ci    In addition to image arrays for one-, two-, and three-dimensional
3255bd8deadSopenharmony_ci    textures, one- and two-dimensional array textures, and the six image
3265bd8deadSopenharmony_ci    arrays for the cube map texture, partially instantiated image arrays
3275bd8deadSopenharmony_ci    are maintained for one-, two-, and three-dimensional textures and
3285bd8deadSopenharmony_ci    one- and two-dimensional array textures, and cube map array
3295bd8deadSopenharmony_ci    textures. Additionally, a single proxy image array is maintained for
3305bd8deadSopenharmony_ci    the cube map texture. Each proxy image array includes width, height,
3315bd8deadSopenharmony_ci    depth, border width, and internal format state values, as well as
3325bd8deadSopenharmony_ci    state for the red, green, blue, alpha, luminance, and intensity
3335bd8deadSopenharmony_ci    component resolutions. Proxy image arrays do not include image data,
3345bd8deadSopenharmony_ci    nor do they include texture properties. ...
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci
3375bd8deadSopenharmony_ci    (update the first paragraph, p. 215)
3385bd8deadSopenharmony_ci
3395bd8deadSopenharmony_ci    Proxy arrays for one- and two-dimensional textures and one- and
3405bd8deadSopenharmony_ci    two-dimensional array textures and cube map array textures are
3415bd8deadSopenharmony_ci    operated on in the same way when TexImage1D is executed with target
3425bd8deadSopenharmony_ci    specified as PROXY_TEXTURE_1D, TexImage2D is executed with target
3435bd8deadSopenharmony_ci    specified as PROXY_TEXTURE_2D or PROXY_TEXTURE_1D_ARRAY, or
3445bd8deadSopenharmony_ci    TexImage3D is executed with target specified as
3455bd8deadSopenharmony_ci    PROXY_TETXURE_2D_ARRAY or PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB.
3465bd8deadSopenharmony_ci
3475bd8deadSopenharmony_ci
3485bd8deadSopenharmony_ci    Modify Section 3.9.12 Texture Objects, page 215
3495bd8deadSopenharmony_ci
3505bd8deadSopenharmony_ci    (update the beginning to add cube map array textures, p. 215)
3515bd8deadSopenharmony_ci
3525bd8deadSopenharmony_ci    In addition to the default textures TEXTURE_1D, TEXTURE_2D,
3535bd8deadSopenharmony_ci    TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY,
3545bd8deadSopenharmony_ci    and TEXTURE_CUBE_MAP_ARRAY_ARB, named one-, two-, and
3555bd8deadSopenharmony_ci    three-dimensional, cube map, and one- , two-dimensional array
3565bd8deadSopenharmony_ci    texture and cube map array texture objects can be created and
3575bd8deadSopenharmony_ci    operated upon. The name space for texture objects is the unsigned
3585bd8deadSopenharmony_ci    integers, with zero reserved by the GL.
3595bd8deadSopenharmony_ci
3605bd8deadSopenharmony_ci    A texture object is created by binding an unused name to TEXTURE_1D,
3615bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY,
3625bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP_ARRAY_ARB. The binding is
3635bd8deadSopenharmony_ci    effected by calling
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci      void BindTexture( enum target, uint texture );
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ci    with <target> set to the desired texture target and <texture> set to
3685bd8deadSopenharmony_ci    the unused name. The resulting texture object is a new state vector,
3695bd8deadSopenharmony_ci    comprising all the state values listed in section 3.8.11, set to the
3705bd8deadSopenharmony_ci    same initial values. If the new texture object is bound to
3715bd8deadSopenharmony_ci    TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
3725bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP_ARRAY_ARB,
3735bd8deadSopenharmony_ci    it is and remains a one-, two-, three-dimensional, cube map, one- ,
3745bd8deadSopenharmony_ci    two-dimensional array texture OR cube map array texture respectively
3755bd8deadSopenharmony_ci    until it is deleted.
3765bd8deadSopenharmony_ci
3775bd8deadSopenharmony_ci    BindTexture may also be used to bind an existing texture object to
3785bd8deadSopenharmony_ci    either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
3795bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP_ARRAY_ARB.
3805bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if an attempt is made to
3815bd8deadSopenharmony_ci    bind a texture object of different dimensionality than the specified
3825bd8deadSopenharmony_ci    target. If the bind is successful no change is made to the state of
3835bd8deadSopenharmony_ci    the bound texture object, and any previous binding to target is
3845bd8deadSopenharmony_ci    broken.
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci    While a texture object is bound, GL operations on the target to
3875bd8deadSopenharmony_ci    which it is bound affect the bound object, and queries of the target
3885bd8deadSopenharmony_ci    to which it is bound return state from the bound object. If texture
3895bd8deadSopenharmony_ci    mapping of the dimensionality of the target to which a texture
3905bd8deadSopenharmony_ci    object is bound is enabled, the state of the bound texture object
3915bd8deadSopenharmony_ci    directs the texturing operation.
3925bd8deadSopenharmony_ci
3935bd8deadSopenharmony_ci    In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
3945bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, and
3955bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB have one-, two-, three-dimensional, cube
3965bd8deadSopenharmony_ci    map, and one- and two-dimensional array and cube map array texture
3975bd8deadSopenharmony_ci    state vectors respectively associated with them. In order that
3985bd8deadSopenharmony_ci    access to these initial textures not be lost, they are treated as
3995bd8deadSopenharmony_ci    texture objects all of whose names are 0. The initial one-, two-,
4005bd8deadSopenharmony_ci    three-dimensional, cube map, one- and two-dimensional array and cube
4015bd8deadSopenharmony_ci    map array textures are therefore operated upon, queried, and applied
4025bd8deadSopenharmony_ci    as TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
4035bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, and TEXTURE_CUBE_MAP_ARRAY_ARB
4045bd8deadSopenharmony_ci    respectively while 0 is bound to the corresponding targets.
4055bd8deadSopenharmony_ci
4065bd8deadSopenharmony_ci
4075bd8deadSopenharmony_ci    (modify the first paragraph, p. 217)
4085bd8deadSopenharmony_ci
4095bd8deadSopenharmony_ci    ... a texture that is currently bound to one of the targets
4105bd8deadSopenharmony_ci    TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
4115bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP_ARRAY_ARB is
4125bd8deadSopenharmony_ci    deleted, it is as though BindTexture had been executed with the same
4135bd8deadSopenharmony_ci    target and texture zero. ...
4145bd8deadSopenharmony_ci
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    (modify the second paragraph, p. 218)
4175bd8deadSopenharmony_ci
4185bd8deadSopenharmony_ci    The texture object name space, including the initial one-, two-, and
4195bd8deadSopenharmony_ci    three dimensional, one- and two-dimensional array, cube map and cube
4205bd8deadSopenharmony_ci    map array texture objects, is shared among all texture units. ...
4215bd8deadSopenharmony_ci
4225bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 3.0 Specification (Per-fragment Operations and the Frame Buffer)
4235bd8deadSopenharmony_ci
4245bd8deadSopenharmony_ci    Modify Section 4.4.2, Attaching Images to Framebuffer Objects, page 281
4255bd8deadSopenharmony_ci
4265bd8deadSopenharmony_ci    (modify the third paragraph in the section, p. 287)
4275bd8deadSopenharmony_ci
4285bd8deadSopenharmony_ci    The command
4295bd8deadSopenharmony_ci
4305bd8deadSopenharmony_ci      void FramebufferTextureLayer(enum target, enum attachment,
4315bd8deadSopenharmony_ci                                   uint texture, int level, int layer);
4325bd8deadSopenharmony_ci
4335bd8deadSopenharmony_ci    operates identically to FramebufferTexture3D, except that it
4345bd8deadSopenharmony_ci    attaches a single layer of a three-dimensional texture or a one- or
4355bd8deadSopenharmony_ci    two-dimensional array texture, or a cube map array texture. <layer>
4365bd8deadSopenharmony_ci    is an integer indicating the layer number, and is treated
4375bd8deadSopenharmony_ci    identically to the <zoffset> parameter in FramebufferTexture3D for
4385bd8deadSopenharmony_ci    three-dimensional textures, one- and two-dimensional textures. For
4395bd8deadSopenharmony_ci    cube map array textures, <layer> mod 6 indicates a face of a cube
4405bd8deadSopenharmony_ci    map slice within the cube map array. the order of the face is
4415bd8deadSopenharmony_ci    defined as in 3.9.1. The error INVALID_VALUE is generated if <layer>
4425bd8deadSopenharmony_ci    is negative. The error INVALID_OPERATION is generated if <texture>
4435bd8deadSopenharmony_ci    is non-zero and is not the name of a three dimensional texture, one-
4445bd8deadSopenharmony_ci    or two-dimensional array texture, or cube map array texture. Unlike
4455bd8deadSopenharmony_ci    FramebufferTexture3D, no <textarget> parameter is accepted.
4465bd8deadSopenharmony_ci
4475bd8deadSopenharmony_ci    (modify last condition for framebuffer attachment completeness, p. 291)
4485bd8deadSopenharmony_ci
4495bd8deadSopenharmony_ci     * If FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is TEXTURE and
4505bd8deadSopenharmony_ci        FRAMEBUFFER_ATTACHMENT_OBJECT_NAME names a one-dimensional,
4515bd8deadSopenharmony_ci        two-dimensional or cube map array texture, then
4525bd8deadSopenharmony_ci        FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER must be smaller than the
4535bd8deadSopenharmony_ci        number of layers in the texture.
4545bd8deadSopenharmony_ci
4555bd8deadSopenharmony_ci    Modify Section 4.4.4.2, Framebuffer Completeness
4565bd8deadSopenharmony_ci
4575bd8deadSopenharmony_ci    (modify the completeness requirements of layered framebuffer
4585bd8deadSopenharmony_ci    completeness added by GL_ARB_geometry_shader4)
4595bd8deadSopenharmony_ci
4605bd8deadSopenharmony_ci    * If any framebuffer attachment is layered, ... (i.e., three-
4615bd8deadSopenharmony_ci      dimensional, cube map, one- or two dimensional array, or cube map
4625bd8deadSopenharmony_ci      array textures).
4635bd8deadSopenharmony_ci      { FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_{EXT|ARB} }
4645bd8deadSopenharmony_ci
4655bd8deadSopenharmony_ci    * If any framebuffer attachment is layered, ... For one- and two-
4665bd8deadSopenharmony_ci      dimensional array textures, and cube map array textures, the layer
4675bd8deadSopenharmony_ci      count is the number of layers in the array texture.
4685bd8deadSopenharmony_ci      { FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_{EXT|ARB} }
4695bd8deadSopenharmony_ci
4705bd8deadSopenharmony_ci    Modify Section 4.4.7, Layered Framebuffers
4715bd8deadSopenharmony_ci
4725bd8deadSopenharmony_ci    (add the following paragraph following table X.4, Layer numbers
4735bd8deadSopenharmony_ci    for cube map texture faces)
4745bd8deadSopenharmony_ci
4755bd8deadSopenharmony_ci    When cube map array texture levels are attached to a layered
4765bd8deadSopenharmony_ci    framebuffer, the layer number corresponds to a layer-face. The
4775bd8deadSopenharmony_ci    layer-face can be translated into an array layer and a cube map face
4785bd8deadSopenharmony_ci    by
4795bd8deadSopenharmony_ci
4805bd8deadSopenharmony_ci        array_layer = floor(layer/6), and
4815bd8deadSopenharmony_ci        face = layer mod 6.
4825bd8deadSopenharmony_ci
4835bd8deadSopenharmony_ci    The face number correspond to the cube map faces as listed in
4845bd8deadSopenharmony_ci    table X.4.
4855bd8deadSopenharmony_ci
4865bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 3.0 specification (Special Functions)
4875bd8deadSopenharmony_ci
4885bd8deadSopenharmony_ci    Modify Section 5.4, Display List, page 306
4895bd8deadSopenharmony_ci
4905bd8deadSopenharmony_ci    (modify the fifth paragraph in the section, p. 311)
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_ci    TexImage3D, TexImage2D, TexImage1D, Histogram, and ColorTable are
4935bd8deadSopenharmony_ci    executed immediately when called with the corresponding proxy
4945bd8deadSopenharmony_ci    arguments PROXY_TEXTURE_3D or PROXY_TEXTURE_2D_ARRAY or
4955bd8deadSopenharmony_ci    PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB; ...
4965bd8deadSopenharmony_ci
4975bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 3.0 specification (State and State Requests)
4985bd8deadSopenharmony_ci
4995bd8deadSopenharmony_ci    Modify Section 6.1.3, Enumerated Queries, page 316
5005bd8deadSopenharmony_ci
5015bd8deadSopenharmony_ci    (modify the last paragraph, p. 317)
5025bd8deadSopenharmony_ci
5035bd8deadSopenharmony_ci    GetTexParameter parameter <target> may be one of TEXTURE_1D,
5045bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY,
5055bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP_ARRAY_ARB, indicating the
5065bd8deadSopenharmony_ci    currently bound one-, two-, three-dimensional, cube map, or one- or
5075bd8deadSopenharmony_ci    two-dimensional array texture or cube map array texture.
5085bd8deadSopenharmony_ci    GetTexLevelParameter parameter target may be one of TEXTURE_1D,
5095bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP_POSITIVE_X,
5105bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,
5115bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z,
5125bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_NEGATIVE_Z, TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY,
5135bd8deadSopenharmony_ci    PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_3D,
5145bd8deadSopenharmony_ci    PROXY_TEXTURE_CUBE_MAP, PROXY_TEXTURE_1D_ARRAY,
5155bd8deadSopenharmony_ci    PROXY_TEXTURE_2D_ARRAY, or PROXY_TEXTURE_CUBE_MAP_ARRAY, indicating
5165bd8deadSopenharmony_ci    the one-, two-, or three-dimensional texture, one of the six
5175bd8deadSopenharmony_ci    distinct 2D images making up the cube map texture, the one- or
5185bd8deadSopenharmony_ci    two-dimensional array texture, or the one-, two-, three-dimensional,
5195bd8deadSopenharmony_ci    cube map, or one- or two-dimensional array or cube map array proxy
5205bd8deadSopenharmony_ci    state vector. ...
5215bd8deadSopenharmony_ci
5225bd8deadSopenharmony_ci
5235bd8deadSopenharmony_ci    Modify Section 6.1.4, Texture Queries, page 322
5245bd8deadSopenharmony_ci
5255bd8deadSopenharmony_ci    (modify the first paragraph, p. 322)
5265bd8deadSopenharmony_ci
5275bd8deadSopenharmony_ci    The command
5285bd8deadSopenharmony_ci
5295bd8deadSopenharmony_ci      void GetTexImage( enum tex, int lod, enum format,
5305bd8deadSopenharmony_ci                        enum type, void *img );
5315bd8deadSopenharmony_ci
5325bd8deadSopenharmony_ci    is used to obtain texture images. It is somewhat different from the
5335bd8deadSopenharmony_ci    other get commands; tex is a symbolic value indicating which texture
5345bd8deadSopenharmony_ci    (or texture face in the case of a cube map texture target name) is
5355bd8deadSopenharmony_ci    to be obtained. TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
5365bd8deadSopenharmony_ci    TEXTURE_1D_ARRAY, TEXTURE_2D_ARRAY and TEXTURE_CUBE_MAP_ARRAY_ARB
5375bd8deadSopenharmony_ci    indicate a one-, two-, or three-dimensional texture, or one- or
5385bd8deadSopenharmony_ci    two-dimensional array texture, or cube map array texture,
5395bd8deadSopenharmony_ci    respectively. ...
5405bd8deadSopenharmony_ci
5415bd8deadSopenharmony_ci    (modify the third paragraph, p. 322)
5425bd8deadSopenharmony_ci
5435bd8deadSopenharmony_ci    GetTexImage obtains... from the first image to the last for
5445bd8deadSopenharmony_ci    three-dimensional textures. One- and two-dimensional array textures
5455bd8deadSopenharmony_ci    and cube map array textures are treated as two-dimensional
5465bd8deadSopenharmony_ci    three-dimensional and three-dimensional images, respectively, where
5475bd8deadSopenharmony_ci    the layers are treated as rows or images. These groups are then...
5485bd8deadSopenharmony_ci
5495bd8deadSopenharmony_ci    (modify the first paragraph, p. 323)
5505bd8deadSopenharmony_ci
5515bd8deadSopenharmony_ci    For three-dimensional ,two-dimensional array and cube map array
5525bd8deadSopenharmony_ci    textures, pixel storage operations are applied as if the image were
5535bd8deadSopenharmony_ci    two-dimensional, except that the additional pixel storage state
5545bd8deadSopenharmony_ci    values PACK_IMAGE_HEIGHT and PACK_SKIP_IMAGES are applied. ...
5555bd8deadSopenharmony_ci
5565bd8deadSopenharmony_ciDependencies on EXT_gpu_shader4 and the OpenGL Shading Language (GLSL)
5575bd8deadSopenharmony_ci
5585bd8deadSopenharmony_ci    Because there is no fixed-function pipeline access for cube map
5595bd8deadSopenharmony_ci    array textures, this extension is only valid when EXT_gpu_shader4
5605bd8deadSopenharmony_ci    and GLSL is supported. if GLSL is not supported, the shading
5615bd8deadSopenharmony_ci    language modifications and references to SAMPLER_CUBE_MAP_ARRAY_ARB
5625bd8deadSopenharmony_ci    and SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB should be removed.
5635bd8deadSopenharmony_ci
5645bd8deadSopenharmony_ciErrors
5655bd8deadSopenharmony_ci
5665bd8deadSopenharmony_ci    TexImage3D generates the error INVALID_VALUE if <target> is
5675bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB and <depth> is not a multiple of 6.
5685bd8deadSopenharmony_ci
5695bd8deadSopenharmony_ci    TexImage3D generates the error INVALID_VALUE if <target> is
5705bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB and <width> and <height> are not equal.
5715bd8deadSopenharmony_ci
5725bd8deadSopenharmony_ciNew State
5735bd8deadSopenharmony_ci
5745bd8deadSopenharmony_ci    (add to table 6.19, p. 357)
5755bd8deadSopenharmony_ci                                                              Initial
5765bd8deadSopenharmony_ci    Get Value                           Type     Get Command  Value       Description                       Sec.    Attribute
5775bd8deadSopenharmony_ci    ----------------------------------  -------  -----------  ----------  -----------------------------  ------  ---------
5785bd8deadSopenharmony_ci    TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB  2*x3xZ+  GetIntegerv    0         texture object bound              3.9.12  texture
5795bd8deadSopenharmony_ci                                                                          to TEXTURE_CUBE_MAP_ARRAY_ARB
5805bd8deadSopenharmony_ci
5815bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP_ARRAY_ARB          nxI      GetTexImage   see 3.9.1  cube map array texture image      3.9.1    -
5825bd8deadSopenharmony_ci                                                                          at lod i
5835bd8deadSopenharmony_ci
5845bd8deadSopenharmony_ciModification to the OpenGL shading Language Specification, Version 1.30.08
5855bd8deadSopenharmony_ci
5865bd8deadSopenharmony_ci    #extension GL_ARB_texture_cube_map_array: <behavior>
5875bd8deadSopenharmony_ci
5885bd8deadSopenharmony_ci    The above line is needed to control the GLSL features described in
5895bd8deadSopenharmony_ci    this section.
5905bd8deadSopenharmony_ci
5915bd8deadSopenharmony_ci
5925bd8deadSopenharmony_ci    A new preprocessor #define is added to the OpenGL Shading Language:
5935bd8deadSopenharmony_ci
5945bd8deadSopenharmony_ci     #define GL_ARB_texture_cube_map_array 1
5955bd8deadSopenharmony_ci
5965bd8deadSopenharmony_ci
5975bd8deadSopenharmony_ci    Add to Section 3.6 "Keywords"
5985bd8deadSopenharmony_ci
5995bd8deadSopenharmony_ci    (add new sampler type )
6005bd8deadSopenharmony_ci
6015bd8deadSopenharmony_ci    samplerCubeArray, samplerCubeArrayShadow, isamplerCubeArray,
6025bd8deadSopenharmony_ci    usamplerCubeArray
6035bd8deadSopenharmony_ci
6045bd8deadSopenharmony_ci
6055bd8deadSopenharmony_ci    Add to Section 4.1 "Basic Types"
6065bd8deadSopenharmony_ci
6075bd8deadSopenharmony_ci    (add the following entries to the table: Floating Point Sampler Types)
6085bd8deadSopenharmony_ci
6095bd8deadSopenharmony_ci    samplerCubeArray         handle for accessing a cube map array texture
6105bd8deadSopenharmony_ci
6115bd8deadSopenharmony_ci    samplerCubeArrayShadow   handle for accessing a cube map array depth
6125bd8deadSopenharmony_ci                             texture with comparison
6135bd8deadSopenharmony_ci
6145bd8deadSopenharmony_ci    (add the following entries to the table: Signed Integer Sampler Types)
6155bd8deadSopenharmony_ci
6165bd8deadSopenharmony_ci    isamplerCubeArray        handle for accessing an integer cube map
6175bd8deadSopenharmony_ci                             array texture
6185bd8deadSopenharmony_ci
6195bd8deadSopenharmony_ci    (add the following entries to the table: Unsigned Integer Sampler Types)
6205bd8deadSopenharmony_ci
6215bd8deadSopenharmony_ci    usamplerCubeArray        handle for accessing an unsigned integer
6225bd8deadSopenharmony_ci                             cube map array texture
6235bd8deadSopenharmony_ci
6245bd8deadSopenharmony_ci    Add at the end of Section 7.1
6255bd8deadSopenharmony_ci       "Vertex and Geometry Shader Special Variables"
6265bd8deadSopenharmony_ci
6275bd8deadSopenharmony_ci    (after last paragraph already talking about gl_Layer)
6285bd8deadSopenharmony_ci
6295bd8deadSopenharmony_ci    The output variable gl_Layer takes on a special value when used with
6305bd8deadSopenharmony_ci    an array of cubemap textures. Instead of simply refering to the
6315bd8deadSopenharmony_ci    layer, it is used to reference a cube map face inside a particular
6325bd8deadSopenharmony_ci    layer as well. Setting gl_Layer to the value (layer*6+face) will
6335bd8deadSopenharmony_ci    render to the appropriate <face> of the cube defined in <layer>. The
6345bd8deadSopenharmony_ci    face values are defined in Table 4.x of Section 4.4.7 'Layered
6355bd8deadSopenharmony_ci    Framebuffers' of the GL spec, but repeated here for clarity:
6365bd8deadSopenharmony_ci
6375bd8deadSopenharmony_ci          face value            resulting target
6385bd8deadSopenharmony_ci        --------------   ------------------------------
6395bd8deadSopenharmony_ci              0            TEXTURE_CUBE_MAP_POSITVE_X
6405bd8deadSopenharmony_ci              1            TEXTURE_CUBE_MAP_NEGATIVE_X
6415bd8deadSopenharmony_ci              2            TEXTURE_CUBE_MAP_POSITVE_Y
6425bd8deadSopenharmony_ci              3            TEXTURE_CUBE_MAP_NEGATIVE_Y
6435bd8deadSopenharmony_ci              4            TEXTURE_CUBE_MAP_POSITVE_Z
6445bd8deadSopenharmony_ci              5            TEXTURE_CUBE_MAP_NEGATIVE_Z
6455bd8deadSopenharmony_ci
6465bd8deadSopenharmony_ci    For example, to render to the Positive Y cube map face located in
6475bd8deadSopenharmony_ci    the 5th layer of the cube map array, gl_Layer should be set to
6485bd8deadSopenharmony_ci    (5*6+2).
6495bd8deadSopenharmony_ci
6505bd8deadSopenharmony_ci    Add to section 8.7 "Texture Lookup Functions"
6515bd8deadSopenharmony_ci
6525bd8deadSopenharmony_ci    (Add new functions to the set of allowed texture lookup functions p. 85):
6535bd8deadSopenharmony_ci    Syntax:
6545bd8deadSopenharmony_ci
6555bd8deadSopenharmony_ci      ivec3 textureSize(samplerCubeArray sampler, int lod)
6565bd8deadSopenharmony_ci      gvec4 texture(gsamplerCubeArray sampler, vec4 coord
6575bd8deadSopenharmony_ci                    [, float bias])
6585bd8deadSopenharmony_ci      gvec4 textureLod(gsamplerCubeArray sampler, vec4 coord, float lod)
6595bd8deadSopenharmony_ci      ivec3 textureSize(samplerCubeArrayShadow sampler, int lod)
6605bd8deadSopenharmony_ci      float texture(samplerCubeArrayShadow sampler, vec4 coord, float compare)
6615bd8deadSopenharmony_ci      gvec4 textureGrad(gsamplerCubeArray sampler, vec4 coord,
6625bd8deadSopenharmony_ci                        vec3 ddx, vec3 ddy);
6635bd8deadSopenharmony_ci
6645bd8deadSopenharmony_ci    Description:
6655bd8deadSopenharmony_ci
6665bd8deadSopenharmony_ci      Cube map array functions are similar to the equivalent cube map or
6675bd8deadSopenharmony_ci      2D array functions. The value of coord.w is used to select the
6685bd8deadSopenharmony_ci      layer of the array and the value coord.xyz is used to select the
6695bd8deadSopenharmony_ci      location within the selected layer of the cubemap. See section 3.8
6705bd8deadSopenharmony_ci      for more details. The shadow comparison texture functions take the
6715bd8deadSopenharmony_ci      comparison value from a separate input rather than from the
6725bd8deadSopenharmony_ci      primary coord vector.
6735bd8deadSopenharmony_ci
6745bd8deadSopenharmony_ci    Modify the Description of the textureSize function.
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci       For the array forms, the last component of the return value is
6775bd8deadSopenharmony_ci       the number of layers in the texture array, or the number of cubes
6785bd8deadSopenharmony_ci       in the texture cube map array.
6795bd8deadSopenharmony_ci
6805bd8deadSopenharmony_ciIssues
6815bd8deadSopenharmony_ci
6825bd8deadSopenharmony_ci    (1) When fetching the Cubemap array texture in shader, should the
6835bd8deadSopenharmony_ci        "q" coordinate be used to index a single layer of the whole
6845bd8deadSopenharmony_ci        array as 2D array texture does, or to index a specific cubemap
6855bd8deadSopenharmony_ci        within the array?
6865bd8deadSopenharmony_ci
6875bd8deadSopenharmony_ci      RESOLVED: "q" is used to index a specific cubemap in the array.
6885bd8deadSopenharmony_ci      This is an intuitive selection because otherwise the it only need
6895bd8deadSopenharmony_ci      2 coordinates instead of 3 to fetch a value in one layer of the
6905bd8deadSopenharmony_ci      array.
6915bd8deadSopenharmony_ci
6925bd8deadSopenharmony_ci
6935bd8deadSopenharmony_ci    (2) When specifying and indexing cube map array texture, should the
6945bd8deadSopenharmony_ci        depth(layer) be the absolute number of layers in the array or
6955bd8deadSopenharmony_ci        the number of cube maps?
6965bd8deadSopenharmony_ci
6975bd8deadSopenharmony_ci      RESOLVED: To support the indexing of cube map in cube map array, a
6985bd8deadSopenharmony_ci      list of new api calls needs to be added, which may not be a
6995bd8deadSopenharmony_ci      preferred direction.
7005bd8deadSopenharmony_ci
7015bd8deadSopenharmony_ci
7025bd8deadSopenharmony_ci    (3) Should partial updates to a cube map set in a cube map array
7035bd8deadSopenharmony_ci        texture be allowed?
7045bd8deadSopenharmony_ci
7055bd8deadSopenharmony_ci      RESOLVED: No, maintain the same restriction as updating a cube map
7065bd8deadSopenharmony_ci      texture to retain orthogonality.
7075bd8deadSopenharmony_ci
7085bd8deadSopenharmony_ci
7095bd8deadSopenharmony_ci    (4) Are cube map arrays cube maps where each "face" is an array or
7105bd8deadSopenharmony_ci        arrays where each layer is a cube map? Should the API follow the
7115bd8deadSopenharmony_ci        cube map or texture array paradigm? Should the data organization
7125bd8deadSopenharmony_ci        for cube map arrays be exposed to or hidden from applications?
7135bd8deadSopenharmony_ci
7145bd8deadSopenharmony_ci      RESOLVED: Cube map arrays are specified in a manner similar to
7155bd8deadSopenharmony_ci      two-dimensional array textures (as described in the
7165bd8deadSopenharmony_ci      EXT_texture_array extension), where each mipmap level is
7175bd8deadSopenharmony_ci      represented as a set of two-dimensional images. Each of these
7185bd8deadSopenharmony_ci      two-dimensional images corresponds to a single face of a single
7195bd8deadSopenharmony_ci      layer of the full cube map array, referred to as a "layer-face".
7205bd8deadSopenharmony_ci      The first six two-dimensional images of the mipmap level
7215bd8deadSopenharmony_ci      correspond to the six faces of the first layer of the cube map
7225bd8deadSopenharmony_ci      array, and subsequent groups of six layer-faces correspond to
7235bd8deadSopenharmony_ci      subsequent cube map array layers. For each cube map array layer,
7245bd8deadSopenharmony_ci      the six two-dimensional images correspond to the positive X,
7255bd8deadSopenharmony_ci      negative X, positive Y, negative Y, positive Z and negative Z
7265bd8deadSopenharmony_ci      faces, respectively. A valid cube map array texture will thus
7275bd8deadSopenharmony_ci      always have a multiple of 6 texture layers.
7285bd8deadSopenharmony_ci
7295bd8deadSopenharmony_ci      Cube maps and array textures use different paradigms for texture
7305bd8deadSopenharmony_ci      image specification. Cube maps are specified one face at a time
7315bd8deadSopenharmony_ci      (using TEXTURE_CUBE_MAP_POSITIVE_X, etc.). Sub-texture updates to
7325bd8deadSopenharmony_ci      cube maps are also performed one face at a time. On the other
7335bd8deadSopenharmony_ci      hand, array textures are specified entirely at once, and
7345bd8deadSopenharmony_ci      sub-texture updates can span a subset of layers.
7355bd8deadSopenharmony_ci
7365bd8deadSopenharmony_ci      Cube map arrays follow the array texture paradigm. Cube map arrays
7375bd8deadSopenharmony_ci      are specified all layer-faces at once or as a subset of
7385bd8deadSopenharmony_ci      layer-faces. This avoids adding complexity to the API and targets
7395bd8deadSopenharmony_ci      higher performance by lowering the number of calls necessary to
7405bd8deadSopenharmony_ci      build a cube map array texture. It also ensures that there will
7415bd8deadSopenharmony_ci      not be any texture completeness problems because of missing faces
7425bd8deadSopenharmony_ci      or faces with mismatched sizes.
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci      Since cube map array textures use the array texture paradigm, it
7455bd8deadSopenharmony_ci      is necessary for applications to understand the data organization
7465bd8deadSopenharmony_ci      of a cube map array. The data organization is exposed both at the
7475bd8deadSopenharmony_ci      bitmap level and at the depth/zoffset/layer level. The <depth>
7485bd8deadSopenharmony_ci      parameter used when specifying cube map array data is the number
7495bd8deadSopenharmony_ci      of layer-faces. The <zoffset> parameter used for sub-texture
7505bd8deadSopenharmony_ci      updates is also given as a layer-face. The <layer> parameter used
7515bd8deadSopenharmony_ci      with the FBO API is also a layer-face.
7525bd8deadSopenharmony_ci
7535bd8deadSopenharmony_ci
7545bd8deadSopenharmony_ci    (5) Should this organization be exposed when using geometry
7555bd8deadSopenharmony_ci        programs/shaders to select layer-faces for rendering?
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci      RESOLVED: Yes. Since layer-faces (layer*6+face) are exposed at the
7585bd8deadSopenharmony_ci      API level, it is reasonable to expose this at the shader level.
7595bd8deadSopenharmony_ci      The single layer output is preserved, and the value written to it
7605bd8deadSopenharmony_ci      is interpreted as a layer-face.
7615bd8deadSopenharmony_ci
7625bd8deadSopenharmony_ci      Since the cube map array is treated as a special array of 2
7635bd8deadSopenharmony_ci      dimensional textures, the user may render to it inside of a
7645bd8deadSopenharmony_ci      geometry shader using the layered rendering functionality. The
7655bd8deadSopenharmony_ci      user must first attach the cube map texture array to a framebuffer
7665bd8deadSopenharmony_ci      color attachment using:
7675bd8deadSopenharmony_ci
7685bd8deadSopenharmony_ci            void FramebufferTextureARB(enum target, enum attachment,
7695bd8deadSopenharmony_ci                                       uint texture, int level)
7705bd8deadSopenharmony_ci
7715bd8deadSopenharmony_ci      where <texture> defines the texture object containing a cube map
7725bd8deadSopenharmony_ci      array texture.
7735bd8deadSopenharmony_ci
7745bd8deadSopenharmony_ci      Inside of the geometry shader, setting 'gl_Layer' to the value
7755bd8deadSopenharmony_ci      (layer*6+face) will render to the appropriate <face> of the cube
7765bd8deadSopenharmony_ci      defined in <layer>. The face values are defined in Table 4.x of
7775bd8deadSopenharmony_ci      Section 4.4.7 'Layered Framebuffers' of the GL spec, but repeated
7785bd8deadSopenharmony_ci      here for clarity:
7795bd8deadSopenharmony_ci
7805bd8deadSopenharmony_ci          face value            resulting target
7815bd8deadSopenharmony_ci        --------------   ------------------------------
7825bd8deadSopenharmony_ci              0            TEXTURE_CUBE_MAP_POSITVE_X
7835bd8deadSopenharmony_ci              1            TEXTURE_CUBE_MAP_NEGATIVE_X
7845bd8deadSopenharmony_ci              2            TEXTURE_CUBE_MAP_POSITVE_Y
7855bd8deadSopenharmony_ci              3            TEXTURE_CUBE_MAP_NEGATIVE_Y
7865bd8deadSopenharmony_ci              4            TEXTURE_CUBE_MAP_POSITVE_Z
7875bd8deadSopenharmony_ci              5            TEXTURE_CUBE_MAP_NEGATIVE_Z
7885bd8deadSopenharmony_ci
7895bd8deadSopenharmony_ci      For example, to render to the Positive Y cube map face located in
7905bd8deadSopenharmony_ci      the 5th layer of the cube map array, gl_Layer should be set to
7915bd8deadSopenharmony_ci      (5*6+2).
7925bd8deadSopenharmony_ci
7935bd8deadSopenharmony_ci
7945bd8deadSopenharmony_ci    (6) Should TexImage3D be enhanced to take TEXTURE_CUBE_MAP as a
7955bd8deadSopenharmony_ci        <target> where the data is the whole cube map?
7965bd8deadSopenharmony_ci
7975bd8deadSopenharmony_ci      RESOLVED: No. From an implementation perspective this may be quite
7985bd8deadSopenharmony_ci      simple (a cube map is a cube map array with one layer). However,
7995bd8deadSopenharmony_ci      there is not much value added by doing this. An abundance of
8005bd8deadSopenharmony_ci      existing code that uses cube maps would not benefit from the
8015bd8deadSopenharmony_ci      change.
8025bd8deadSopenharmony_ci
8035bd8deadSopenharmony_ci
8045bd8deadSopenharmony_ci    (7) Should the FBO API provide a mechanism for attaching a single
8055bd8deadSopenharmony_ci        cube map from an array as an attachment for layered rendering?
8065bd8deadSopenharmony_ci
8075bd8deadSopenharmony_ci     RESOLVED: No. This is an interesting idea, but it doesn't provide
8085bd8deadSopenharmony_ci     much functionality. This can easily be done as part of the geometry
8095bd8deadSopenharmony_ci     program/shader. A more interesting idea for future versions of
8105bd8deadSopenharmony_ci     OpenGL or as an extension is to allow texture data specified with
8115bd8deadSopenharmony_ci     one texture target to be "typecast" or viewed as if specified with
8125bd8deadSopenharmony_ci     a different target. Such an extension would allow an application to
8135bd8deadSopenharmony_ci     view an array (or subset of an array) of two-dimensional texture
8145bd8deadSopenharmony_ci     images as a two-dimensional array, a three-dimensional texture, or
8155bd8deadSopenharmony_ci     a cube map array.
8165bd8deadSopenharmony_ci
8175bd8deadSopenharmony_ci
8185bd8deadSopenharmony_ci    (8) How do you determine the maximum number of cube map array
8195bd8deadSopenharmony_ci        texture layers allowed by an implementation?
8205bd8deadSopenharmony_ci
8215bd8deadSopenharmony_ci      RESOLVED: This extension treats cube map array textures like
8225bd8deadSopenharmony_ci      two-dimensional array textures, except that the number of
8235bd8deadSopenharmony_ci      layer-faces must be a multiple of six, and the width and height
8245bd8deadSopenharmony_ci      must be equal. There is no separate query for the number of layers
8255bd8deadSopenharmony_ci      in a cube map array, but the limit on the number of layers in an
8265bd8deadSopenharmony_ci      array texture (EXT_texture_array) also applies to the total number
8275bd8deadSopenharmony_ci      of layer-faces in a cube map array texture.
8285bd8deadSopenharmony_ci
8295bd8deadSopenharmony_ci      For example, if an implementation supporting this extension has a
8305bd8deadSopenharmony_ci      limit of 512 layers for array, a cube map array texture may have
8315bd8deadSopenharmony_ci      no more than floor(512/6) = 85 layers.
8325bd8deadSopenharmony_ci
8335bd8deadSopenharmony_ci    (9) Do we really need to define integer versions of cube map array
8345bd8deadSopenharmony_ci        sampler types?
8355bd8deadSopenharmony_ci
8365bd8deadSopenharmony_ci      RESOLVED: Yes. It's not clear if they will be useful to any
8375bd8deadSopenharmony_ci      applications, but there is no real reason no to provide them.
8385bd8deadSopenharmony_ci
8395bd8deadSopenharmony_ci    (10) Should we provide texture LOD functions for shadow sampler
8405bd8deadSopenharmony_ci         targets?
8415bd8deadSopenharmony_ci
8425bd8deadSopenharmony_ci      RESOLVED: Yes. The level of detail computations for a texture used
8435bd8deadSopenharmony_ci      as a shadow map are completely identical to that for other
8445bd8deadSopenharmony_ci      textures.
8455bd8deadSopenharmony_ci
8465bd8deadSopenharmony_ci      However, we provide separate data types for the two textures
8475bd8deadSopenharmony_ci      (e.g., sampler2D vs. sampler2DShadow), and there is no mechanism
8485bd8deadSopenharmony_ci      to cast from one to the other. If we didn't provide these
8495bd8deadSopenharmony_ci      functions, the only way to perform an LOD computation for a
8505bd8deadSopenharmony_ci      texture used as a shadow map would be to bind the same texture
8515bd8deadSopenharmony_ci      object to two different texture image units, one associated with a
8525bd8deadSopenharmony_ci      shadow sampler and the other associated with a normal sampler.
8535bd8deadSopenharmony_ci
8545bd8deadSopenharmony_ci    (11) What built-in functions are available for 2D arrays that are
8555bd8deadSopenharmony_ci         not provided for cube map arrays?
8565bd8deadSopenharmony_ci
8575bd8deadSopenharmony_ci      RESOLVED: Functions equivalent to the following 2D array functions
8585bd8deadSopenharmony_ci      are not available for cube map arrays:
8595bd8deadSopenharmony_ci
8605bd8deadSopenharmony_ci        vec4 texelFetch2DArray(sampler2DArray sampler, ivec3 coord, int lod)
8615bd8deadSopenharmony_ci        vec4 shadow2DArrayGrad(sampler2DArrayShadow sampler, vec4 coord,
8625bd8deadSopenharmony_ci                               vec2 ddx, vec2 ddy);
8635bd8deadSopenharmony_ci        vec4 texelFetch2DArrayOffset(sampler2DArray sampler, ivec3 coord,
8645bd8deadSopenharmony_ci                                     int lod, ivec2 offset)
8655bd8deadSopenharmony_ci        vec4 shadow2DArrayGradOffset(sampler2DArrayShadow sampler,
8665bd8deadSopenharmony_ci                                     vec4 coord, vec2 ddx, vec2 ddy,
8675bd8deadSopenharmony_ci                                     ivec2 offset);
8685bd8deadSopenharmony_ci
8695bd8deadSopenharmony_ci    (12) What does ivec3 textureSize(samplerCubeArray sampler, int lod)
8705bd8deadSopenharmony_ci         in the z component?
8715bd8deadSopenharmony_ci
8725bd8deadSopenharmony_ci      Resolved: array_layer (that is, number of cube maps in the array).
8735bd8deadSopenharmony_ci
8745bd8deadSopenharmony_ci      The spec is currently ambiguous, and can be interpreted as
8755bd8deadSopenharmony_ci      layer (the number of cube map faces) or array_layer = floor(layer/6),
8765bd8deadSopenharmony_ci      the number of cube maps.
8775bd8deadSopenharmony_ci 
8785bd8deadSopenharmony_ciRevision History
8795bd8deadSopenharmony_ci
8805bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
8815bd8deadSopenharmony_ci    ----  --------  --------  -----------------------------------------
8825bd8deadSopenharmony_ci     9    12/07/09  wwlk      Edit texture function table description
8835bd8deadSopenharmony_ci                              as resolved in issue 12
8845bd8deadSopenharmony_ci     8    12/07/09  wwlk      Resolved issue 12
8855bd8deadSopenharmony_ci     7    11/13/09  wwlk      Added array size returned issue 12
8865bd8deadSopenharmony_ci     6    11/11/09  wwlk      Correct more mistaken GLSL prototypes
8875bd8deadSopenharmony_ci                              gSamplerCube takes vec3 ddx and ddy
8885bd8deadSopenharmony_ci                              gSamplerCube do not have offsets
8895bd8deadSopenharmony_ci                              gSamplerCubeArray should match.
8905bd8deadSopenharmony_ci     5    09/09/09  groth     Correct some mistaken GLSL prototypes
8915bd8deadSopenharmony_ci     4    08/02/09  Jon Leech Reformat to 80 columns and assign ARB
8925bd8deadSopenharmony_ci                              extension number.
8935bd8deadSopenharmony_ci     3    07/22/09  myoung    Fix gl_layer interaction description
8945bd8deadSopenharmony_ci     2    06/30/09  gsellers  Fix enumerant values
8955bd8deadSopenharmony_ci     1    05/06/09  nickh     First draft
896