15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_packed_depth_stencil 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_packed_depth_stencil 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContributors 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Pat Brown 125bd8deadSopenharmony_ci Matt Craighead 135bd8deadSopenharmony_ci Cass Everitt 145bd8deadSopenharmony_ci Michael Gold 155bd8deadSopenharmony_ci Evan Hart 165bd8deadSopenharmony_ci Jeff Juliano 175bd8deadSopenharmony_ci John Kessenich 185bd8deadSopenharmony_ci Mark Kilgard 195bd8deadSopenharmony_ci Jon Leech 205bd8deadSopenharmony_ci Bill Licea-Kane 215bd8deadSopenharmony_ci Barthold Lichtenbelt 225bd8deadSopenharmony_ci Kent Lin 235bd8deadSopenharmony_ci Brian Paul 245bd8deadSopenharmony_ci Ian Romanick 255bd8deadSopenharmony_ci John Rosasco 265bd8deadSopenharmony_ci Jeremy Sandmel 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciContact 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci Jeff Juliano, NVIDIA Corporation (jjuliano 'at' nvidia.com) 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciStatus 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Incomplete 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciVersion 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci Last Modified Date: September 26, 2005 395bd8deadSopenharmony_ci Revision: #12 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ciNumber 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci 312 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciDependencies 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci OpenGL 1.1 and EXT_framebuffer_object are required. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci Written based on the wording of the OpenGL 2.0 specification. 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci Written based on the wording of EXT_framebuffer_object version 117. 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci This extension interacts with EXT_framebuffer_object. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci This extension modifies NV_packed_depth_stencil. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci ARB_depth_texture affects the definition of this extension. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci SGIX_depth_texture affects the definition of this extension. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciOverview 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci Many OpenGL implementations have chosen to interleave the depth and 645bd8deadSopenharmony_ci stencil buffers into one buffer, often with 24 bits of depth 655bd8deadSopenharmony_ci precision and 8 bits of stencil data. 32 bits is more than is 665bd8deadSopenharmony_ci needed for the depth buffer much of the time; a 24-bit depth buffer, 675bd8deadSopenharmony_ci on the other hand, requires that reads and writes of depth data be 685bd8deadSopenharmony_ci unaligned with respect to power-of-two boundaries. On the other 695bd8deadSopenharmony_ci hand, 8 bits of stencil data is more than sufficient for most 705bd8deadSopenharmony_ci applications, so it is only natural to pack the two buffers into a 715bd8deadSopenharmony_ci single buffer with both depth and stencil data. OpenGL never 725bd8deadSopenharmony_ci provides direct access to the buffers, so the OpenGL implementation 735bd8deadSopenharmony_ci can provide an interface to applications where it appears the one 745bd8deadSopenharmony_ci merged buffer is composed of two logical buffers. 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci One disadvantage of this scheme is that OpenGL lacks any means by 775bd8deadSopenharmony_ci which this packed data can be handled efficiently. For example, 785bd8deadSopenharmony_ci when an application reads from the 24-bit depth buffer, using the 795bd8deadSopenharmony_ci type GL_UNSIGNED_SHORT will lose 8 bits of data, while 805bd8deadSopenharmony_ci GL_UNSIGNED_INT has 8 too many. Both require expensive format 815bd8deadSopenharmony_ci conversion operations. A 24-bit format would be no more suitable, 825bd8deadSopenharmony_ci because it would also suffer from the unaligned memory accesses that 835bd8deadSopenharmony_ci made the standalone 24-bit depth buffer an unattractive proposition 845bd8deadSopenharmony_ci in the first place. 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci Many applications, such as parallel rendering applications, may also 875bd8deadSopenharmony_ci wish to draw to or read back from both the depth and stencil buffers 885bd8deadSopenharmony_ci at the same time. Currently this requires two separate operations, 895bd8deadSopenharmony_ci reducing performance. Since the buffers are interleaved, drawing to 905bd8deadSopenharmony_ci or reading from both should be no more expensive than using just 915bd8deadSopenharmony_ci one; in some cases, it may even be cheaper. 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci This extension provides a new data format, GL_DEPTH_STENCIL_EXT, 945bd8deadSopenharmony_ci that can be used with the glDrawPixels, glReadPixels, and 955bd8deadSopenharmony_ci glCopyPixels commands, as well as a packed data type, 965bd8deadSopenharmony_ci GL_UNSIGNED_INT_24_8_EXT, that is meant to be used with 975bd8deadSopenharmony_ci GL_DEPTH_STENCIL_EXT. No other data types are supported with 985bd8deadSopenharmony_ci GL_DEPTH_STENCIL_EXT. If ARB_depth_texture or SGIX_depth_texture is 995bd8deadSopenharmony_ci supported, GL_DEPTH_STENCIL_EXT/GL_UNSIGNED_INT_24_8_EXT data can 1005bd8deadSopenharmony_ci also be used for textures; this provides a more efficient way to 1015bd8deadSopenharmony_ci supply data for a 24-bit depth texture. 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci GL_DEPTH_STENCIL_EXT data, when passed through the pixel path, 1045bd8deadSopenharmony_ci undergoes both depth and stencil operations. The depth data is 1055bd8deadSopenharmony_ci scaled and biased by the current GL_DEPTH_SCALE and GL_DEPTH_BIAS, 1065bd8deadSopenharmony_ci while the stencil data is shifted and offset by the current 1075bd8deadSopenharmony_ci GL_INDEX_SHIFT and GL_INDEX_OFFSET. The stencil data is also put 1085bd8deadSopenharmony_ci through the stencil-to-stencil pixel map. 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci glDrawPixels of GL_DEPTH_STENCIL_EXT data operates similarly to that 1115bd8deadSopenharmony_ci of GL_STENCIL_INDEX data, bypassing the OpenGL fragment pipeline 1125bd8deadSopenharmony_ci entirely, unlike the treatment of GL_DEPTH_COMPONENT data. The 1135bd8deadSopenharmony_ci stencil and depth masks are applied, as are the pixel ownership and 1145bd8deadSopenharmony_ci scissor tests, but all other operations are skipped. 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci glReadPixels of GL_DEPTH_STENCIL_EXT data reads back a rectangle 1175bd8deadSopenharmony_ci from both the depth and stencil buffers. 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci glCopyPixels of GL_DEPTH_STENCIL_EXT data copies a rectangle from 1205bd8deadSopenharmony_ci both the depth and stencil buffers. Like glDrawPixels, it applies 1215bd8deadSopenharmony_ci both the stencil and depth masks but skips the remainder of the 1225bd8deadSopenharmony_ci OpenGL fragment pipeline. 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci glTex[Sub]Image[1,2,3]D of GL_DEPTH_STENCIL_EXT data loads depth and 1255bd8deadSopenharmony_ci stencil data into a depth_stencil texture. glGetTexImage of 1265bd8deadSopenharmony_ci GL_DEPTH_STENCIL_EXT data can be used to retrieve depth and stencil 1275bd8deadSopenharmony_ci data from a depth/stencil texture. 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci In addition, a new base internal format, GL_DEPTH_STENCIL_EXT, can 1305bd8deadSopenharmony_ci be used by both texture images and renderbuffer storage. When an 1315bd8deadSopenharmony_ci image with a DEPTH_STENCIL_EXT internal format is attached to both 1325bd8deadSopenharmony_ci the depth and stencil attachment points of a framebuffer object (see 1335bd8deadSopenharmony_ci EXT_framebuffer_object), then it becomes both the depth and stencil 1345bd8deadSopenharmony_ci buffers of the framebuffer. This fits nicely with hardware that 1355bd8deadSopenharmony_ci interleaves both depth and stencil data into a single buffer. When 1365bd8deadSopenharmony_ci a texture with DEPTH_STENCIL_EXT data is bound for texturing, only 1375bd8deadSopenharmony_ci the depth component is accessible through the texture fetcher. The 1385bd8deadSopenharmony_ci stencil data can be written with TexImage or CopyTexImage, and can 1395bd8deadSopenharmony_ci be read with GetTexImage. When a DEPTH_STENCIL_EXT image is 1405bd8deadSopenharmony_ci attached to the stencil attachment of the bound framebuffer object, 1415bd8deadSopenharmony_ci the stencil data can be accessed through any operation that reads 1425bd8deadSopenharmony_ci from or writes to the framebuffer's stencil buffer. 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciNew Procedures and Functions 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci None. 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ciNew Tokens 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci Accepted by the <format> parameter of DrawPixels, ReadPixels, 1515bd8deadSopenharmony_ci TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, 1525bd8deadSopenharmony_ci TexSubImage3D, and GetTexImage, by the <type> parameter of 1535bd8deadSopenharmony_ci CopyPixels, by the <internalformat> parameter of TexImage1D, 1545bd8deadSopenharmony_ci TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and 1555bd8deadSopenharmony_ci RenderbufferStorageEXT, and returned in the <data> parameter of 1565bd8deadSopenharmony_ci GetTexLevelParameter and GetRenderbufferParameterivEXT: 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci DEPTH_STENCIL_EXT 0x84F9 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci Accepted by the <type> parameter of DrawPixels, ReadPixels, 1615bd8deadSopenharmony_ci TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, 1625bd8deadSopenharmony_ci TexSubImage3D, and GetTexImage: 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT 0x84FA 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage1D, 1675bd8deadSopenharmony_ci TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and 1685bd8deadSopenharmony_ci RenderbufferStorageEXT, and returned in the <data> parameter of 1695bd8deadSopenharmony_ci GetTexLevelParameter and GetRenderbufferParameterivEXT: 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci DEPTH24_STENCIL8_EXT 0x88F0 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci Accepted by the <value> parameter of GetTexLevelParameter: 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci TEXTURE_STENCIL_SIZE_EXT 0x88F1 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL 1785bd8deadSopenharmony_ciOperation) 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci Starting with the bullet list on page 86, update section 2.15.4 1815bd8deadSopenharmony_ci "Shader Execution" to say: 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci "* The sampler used in a texture lookup function is of type 1845bd8deadSopenharmony_ci sampler1D or sampler2D, and the texture object's base internal 1855bd8deadSopenharmony_ci format is DEPTH_COMPONENT or DEPTH_STENCIL_EXT, and the 1865bd8deadSopenharmony_ci TEXTURE_COMPARE_MODE is not NONE. 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type 1895bd8deadSopenharmony_ci sampler1DShadow or sampler2DShadow, and the texture object's base 1905bd8deadSopenharmony_ci internal format is DEPTH_COMPONENT or DEPTH_STENCIL_EXT, and the 1915bd8deadSopenharmony_ci TEXTURE_COMPARE_MODE is NONE. 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type 1945bd8deadSopenharmony_ci sampler1DShadow or sampler2DShadow, and the texture object's base 1955bd8deadSopenharmony_ci internal format is not DEPTH_COMPONENT or DEPTH_STENCIL_EXT. 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci The stencil index texture internal component is ignored if the base 1985bd8deadSopenharmony_ci internal format is DEPTH_STENCIL_EXT. 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ci If a vertex shader uses..." 2015bd8deadSopenharmony_ci 2025bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization) 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci Update the first paragraph on page 118, in the definition of 2055bd8deadSopenharmony_ci ColorTable, to say: 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci "... The <formats> COLOR_INDEX, DEPTH_COMPONENT, DEPTH_STENCIL_EXT, 2085bd8deadSopenharmony_ci and STENCIL_INDEX and the <type> BITMAP are not allowed." 2095bd8deadSopenharmony_ci 2105bd8deadSopenharmony_ci Update the third paragraph on page 118, in the definition of 2115bd8deadSopenharmony_ci ColorTable, to say: 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci "... <internalformat> must be one of the formats in table 3.15 or 2145bd8deadSopenharmony_ci table 3.16, other than the DEPTH or DEPTH_STENCIL_EXT formats in 2155bd8deadSopenharmony_ci those tables." 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci On page 121, update the first paragraph in the definition of 2185bd8deadSopenharmony_ci ConvolutionFilter2D to say: 2195bd8deadSopenharmony_ci 2205bd8deadSopenharmony_ci "... The formats COLOR_INDEX, DEPTH_COMPONENT, DEPTH_STENCIL_EXT, 2215bd8deadSopenharmony_ci and STENCIL_INDEX and the type BITMAP are not allowed." 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci Update the paragraph that spans pages 121 and 122, in the definition 2245bd8deadSopenharmony_ci of ConvolutionFilter2D, to say: 2255bd8deadSopenharmony_ci 2265bd8deadSopenharmony_ci "... <internalformat> must be one of the formats in table 3.15 or 2275bd8deadSopenharmony_ci table 3.16, other than the DEPTH or DEPTH_STENCIL_EXT formats in 2285bd8deadSopenharmony_ci those tables." 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci Update the third paragraph on page 125, in the definition of 2315bd8deadSopenharmony_ci Histogram, to say: 2325bd8deadSopenharmony_ci 2335bd8deadSopenharmony_ci "... The error INVALID ENUM is generated if internalformat is not 2345bd8deadSopenharmony_ci one of the formats in table 3.15 or table 3.16, or is 1, 2, 3, 4, or 2355bd8deadSopenharmony_ci any of the DEPTH_COMPONENT or DEPTH_STENCIL_EXT or INTENSITY formats 2365bd8deadSopenharmony_ci in those tables." 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci On page 126, update the second paragraph in the definition of Minmax 2395bd8deadSopenharmony_ci to say: 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci "... The error INVALID ENUM is generated if internalformat is not 2425bd8deadSopenharmony_ci one of the formats in table 3.15 or table 3.16, or is 1, 2, 3, 4, or 2435bd8deadSopenharmony_ci any of the DEPTH_COMPONENT or DEPTH_STENCIL_EXT or INTENSITY formats 2445bd8deadSopenharmony_ci in those tables. The resulting..." 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci Add a row to Table 3.5 (page 128): 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci type Parameter GL Type Special 2495bd8deadSopenharmony_ci ------------------------------------------------ 2505bd8deadSopenharmony_ci ... ... ... 2515bd8deadSopenharmony_ci UNSIGNED_INT_2_10_10_10_REV uint Yes 2525bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT uint Yes 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_ci Update the paragraph on page 128, in the definition of DrawPixels, 2555bd8deadSopenharmony_ci to say: 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci "... If the GL is in color index mode and <format> is not one of 2585bd8deadSopenharmony_ci COLOR_INDEX, STENCIL_INDEX, DEPTH_COMPONENT, or DEPTH_STENCIL_EXT, 2595bd8deadSopenharmony_ci then the error INVALID_OPERATION occurs. If <type> is BITMAP and 2605bd8deadSopenharmony_ci <format> is not COLOR_INDEX or STENCIL_INDEX then the error 2615bd8deadSopenharmony_ci INVALID_ENUM occurs. If <format> is DEPTH_STENCIL_EXT and <type> is 2625bd8deadSopenharmony_ci not UNSIGNED_INT_24_8_EXT then the error INVALID_ENUM occurs. Some 2635bd8deadSopenharmony_ci additional constraints on the combinations of <format> and <type> 2645bd8deadSopenharmony_ci values that are accepted is discussed below." 2655bd8deadSopenharmony_ci 2665bd8deadSopenharmony_ci Add a row to Table 3.6 (page 129): 2675bd8deadSopenharmony_ci 2685bd8deadSopenharmony_ci Format Name Element Meaning and Order Target Buffer 2695bd8deadSopenharmony_ci ------------------------------------------------------------------ 2705bd8deadSopenharmony_ci ... ... ... 2715bd8deadSopenharmony_ci DEPTH_COMPONENT Depth Depth 2725bd8deadSopenharmony_ci DEPTH_STENCIL_EXT Depth and Stencil Index Depth and Stencil 2735bd8deadSopenharmony_ci ... ... ... 2745bd8deadSopenharmony_ci 2755bd8deadSopenharmony_ci Add a row to Table 3.8 (page 132): 2765bd8deadSopenharmony_ci 2775bd8deadSopenharmony_ci type Parameter GL Type Components Pixel Formats 2785bd8deadSopenharmony_ci ------------------------------------------------------------------ 2795bd8deadSopenharmony_ci ... ... ... ... 2805bd8deadSopenharmony_ci UNSIGNED_INT_2_10_10_10_REV uint 4 RGBA,BGRA 2815bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT uint 2 DEPTH_STENCIL_EXT 2825bd8deadSopenharmony_ci 2835bd8deadSopenharmony_ci Update the last paragraph on page 130 to say: 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci "Calling DrawPixels with a <type> of UNSIGNED_BYTE_3_3_2, ..., 2865bd8deadSopenharmony_ci UNSIGNED_INT_2_10_10_10_REV, or UNSIGNED_INT_24_8_EXT is a special 2875bd8deadSopenharmony_ci case in which all the components of each group are packed into a 2885bd8deadSopenharmony_ci single unsigned byte, unsigned short, or unsigned int, depending on 2895bd8deadSopenharmony_ci the type." 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci Add the following diagram to Table 3.11 (page 134): 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT 2945bd8deadSopenharmony_ci 2955bd8deadSopenharmony_ci 31 30 29 28 27 26 ... 12 11 10 9 8 7 6 5 4 3 2 1 0 2965bd8deadSopenharmony_ci +----------------------------------+---------------+ 2975bd8deadSopenharmony_ci | 1st Component | 2nd Component | 2985bd8deadSopenharmony_ci +----------------------------------+---------------+ 2995bd8deadSopenharmony_ci 3005bd8deadSopenharmony_ci Add a row to Table 3.12 (page 135): 3015bd8deadSopenharmony_ci 3025bd8deadSopenharmony_ci Format | 1st 2nd 3rd 4th 3035bd8deadSopenharmony_ci ------------------+------------------------------- 3045bd8deadSopenharmony_ci ... | ... ... ... ... 3055bd8deadSopenharmony_ci BGRA | blue green red alpha 3065bd8deadSopenharmony_ci DEPTH_STENCIL_EXT | depth stencil N/A N/A 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci Add the following paragraph to the end of the section "Conversion to 3095bd8deadSopenharmony_ci floating-point" (page 135-136): 3105bd8deadSopenharmony_ci 3115bd8deadSopenharmony_ci "For groups of components that contain both standard components and 3125bd8deadSopenharmony_ci index elements, such as DEPTH_STENCIL_EXT, the index elements are 3135bd8deadSopenharmony_ci not converted." 3145bd8deadSopenharmony_ci 3155bd8deadSopenharmony_ci Update the last paragraph in the section "Conversion to Fragments" 3165bd8deadSopenharmony_ci (page 137) to say: 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ci "... Groups arising from DrawPixels with a <format> of STENCIL_INDEX 3195bd8deadSopenharmony_ci or DEPTH_STENCIL_EXT are treated specially and are described in 3205bd8deadSopenharmony_ci section 4.3.1." 3215bd8deadSopenharmony_ci 3225bd8deadSopenharmony_ci Update the first paragraph of section 3.6.5 "Pixel Transfer 3235bd8deadSopenharmony_ci Operations" (pages 137-138) to say: 3245bd8deadSopenharmony_ci 3255bd8deadSopenharmony_ci "The GL defines five kinds of pixel groups: 3265bd8deadSopenharmony_ci 3275bd8deadSopenharmony_ci 1. RGBA component: Each group comprises four color components: 3285bd8deadSopenharmony_ci red, green, blue, and alpha. 3295bd8deadSopenharmony_ci 2. Depth component: Each group comprises a single depth 3305bd8deadSopenharmony_ci component. 3315bd8deadSopenharmony_ci 3. Color index: Each group comprises a single color index. 3325bd8deadSopenharmony_ci 4. Stencil index: Each group comprises a single stencil index. 3335bd8deadSopenharmony_ci 5. Depth/stencil: Each group comprises a single depth component 3345bd8deadSopenharmony_ci and a single stencil index." 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci Update the first paragraph in the section "Arithmetic on Components" 3375bd8deadSopenharmony_ci (page 138) to say: 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci "This step applies only to RGBA component and depth component 3405bd8deadSopenharmony_ci groups, and to the depth components in depth/stencil groups. ..." 3415bd8deadSopenharmony_ci 3425bd8deadSopenharmony_ci Update the first paragraph in the section "Arithmetic on Indices" 3435bd8deadSopenharmony_ci (page 138) to say: 3445bd8deadSopenharmony_ci 3455bd8deadSopenharmony_ci "This step applies only to color index and stencil index groups, and 3465bd8deadSopenharmony_ci to the stencil indices in depth/stencil groups. ..." 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci Update the first paragraph in the section "Stencil Index Lookup" 3495bd8deadSopenharmony_ci (page 139) to say: 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci "This step applies only to stencil index groups and to the stencil 3525bd8deadSopenharmony_ci indices in depth/stencil groups. ..." 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci In section 3.8.1 "Texture Image Specification", update page 151 to 3555bd8deadSopenharmony_ci say: 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci "The selected groups are processed exactly as for DrawPixels, 3585bd8deadSopenharmony_ci stopping just before final conversion. Each R, G, B, A, or depth 3595bd8deadSopenharmony_ci value so generated is clamped to [0, 1], while the stencil index 3605bd8deadSopenharmony_ci values are masked by 2^n-1, where n is the number of stencil bits in 3615bd8deadSopenharmony_ci the internal format resolution (see below). If the base internal 3625bd8deadSopenharmony_ci format is DEPTH_STENCIL_EXT and <format> is not DEPTH_STENCIL_EXT, 3635bd8deadSopenharmony_ci then the values of the stencil index texture component are 3645bd8deadSopenharmony_ci undefined. 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ci Components are then selected from the resulting R, G, B, A, depth, 3675bd8deadSopenharmony_ci or stencil index values to obtain a texture with the base internal 3685bd8deadSopenharmony_ci format specified by (or derived from) <internalformat>. Table 3.15 3695bd8deadSopenharmony_ci summarizes the mapping of R, G, B, A, depth, or stencil values to 3705bd8deadSopenharmony_ci texture components, as a function of the base internal format of the 3715bd8deadSopenharmony_ci texture image. <internalformat> may be specified as one of the 3725bd8deadSopenharmony_ci eight internal format symbolic constants listed in table 3.15, as 3735bd8deadSopenharmony_ci one of ... 3745bd8deadSopenharmony_ci 3755bd8deadSopenharmony_ci Textures with a base internal format of DEPTH_COMPONENT or 3765bd8deadSopenharmony_ci DEPTH_STENCIL_EXT are supported by texture image specification 3775bd8deadSopenharmony_ci commands only if <target> is TEXTURE_1D, TEXTURE_2D, 3785bd8deadSopenharmony_ci PROXY_TEXTURE_1D or PROXY_TEXTURE_2D. Using this format in 3795bd8deadSopenharmony_ci conjunction with any other <target> will result in an 3805bd8deadSopenharmony_ci INVALID_OPERATION error. 3815bd8deadSopenharmony_ci 3825bd8deadSopenharmony_ci Textures with a base internal format of DEPTH_COMPONENT or 3835bd8deadSopenharmony_ci DEPTH_STENCIL_EXT require either depth component data or 3845bd8deadSopenharmony_ci depth/stencil component data. Textures with other base internal 3855bd8deadSopenharmony_ci formats require RGBA component data. The error INVALID_OPERATION is 3865bd8deadSopenharmony_ci generated if the base internal format is DEPTH_COMPONENT or 3875bd8deadSopenharmony_ci DEPTH_STENCIL_EXT and <format> is not DEPTH_COMPONENT or 3885bd8deadSopenharmony_ci DEPTH_STENCIL_EXT, or if the base internal format is not 3895bd8deadSopenharmony_ci DEPTH_COMPONENT or DEPTH_STENCIL_EXT and <format> is DEPTH_COMPONENT 3905bd8deadSopenharmony_ci or DEPTH_STENCIL_EXT." 3915bd8deadSopenharmony_ci 3925bd8deadSopenharmony_ci Update the second paragraph on page 152 to say: 3935bd8deadSopenharmony_ci 3945bd8deadSopenharmony_ci "...the mapping of the R, G, B, A, depth and stencil values to 3955bd8deadSopenharmony_ci texture components..." 3965bd8deadSopenharmony_ci 3975bd8deadSopenharmony_ci Update the third paragraph on page 152 to say: 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci "...the mapping of the R, G, B, A, depth, and stencil values to 4005bd8deadSopenharmony_ci texture components..." 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci Add a row to table 3.15 (page 153), and update the title of the 4035bd8deadSopenharmony_ci second column: 4045bd8deadSopenharmony_ci 4055bd8deadSopenharmony_ci Base Internal Format RGBA and Depth and Stencil Values Internal Components 4065bd8deadSopenharmony_ci ---------------------------------------------------------------------------- 4075bd8deadSopenharmony_ci ... ... ... 4085bd8deadSopenharmony_ci DEPTH_STENCIL_EXT Depth,Stencil D,S 4095bd8deadSopenharmony_ci ... ... ... 4105bd8deadSopenharmony_ci 4115bd8deadSopenharmony_ci Update the caption for table 3.15 (page 153) 4125bd8deadSopenharmony_ci 4135bd8deadSopenharmony_ci "Table 3.15: Conversion from RGBA, depth, and stencil pixel 4145bd8deadSopenharmony_ci components to internal texture, table, or filter components. See 4155bd8deadSopenharmony_ci section 3.8.13 for a description of the texture components R, G, B, 4165bd8deadSopenharmony_ci A, L, I, D, and S." 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ci Add a new column to table 3.16 (page 153) labled "S bits". The 4195bd8deadSopenharmony_ci value of this column is blank for all rows except a new row: 4205bd8deadSopenharmony_ci 4215bd8deadSopenharmony_ci Sized Base R G B A L I D S 4225bd8deadSopenharmony_ci Internal Format InternalFormat bits bits bits bits bits bits bits bits 4235bd8deadSopenharmony_ci ------------------------------------------------------------------------------ 4245bd8deadSopenharmony_ci ... ... ... ... ... ... ... ... ... ... 4255bd8deadSopenharmony_ci DEPTH24_STENCIL8_EXT DEPTH_STENCIL_EXT 24 8 4265bd8deadSopenharmony_ci ... ... ... ... ... ... ... ... ... ... 4275bd8deadSopenharmony_ci 4285bd8deadSopenharmony_ci Update the second paragraph on page 159, in the definition of 4295bd8deadSopenharmony_ci CopyTexImage2D, to say: 4305bd8deadSopenharmony_ci 4315bd8deadSopenharmony_ci "...The image is taken from the framebuffer exactly as if these 4325bd8deadSopenharmony_ci arguments were passed to CopyPixels with argument type set to COLOR 4335bd8deadSopenharmony_ci DEPTH, or DEPTH_STENCIL_EXT, depending on <internalformat>, stopping 4345bd8deadSopenharmony_ci after pixel transfer processing is complete. RGBA data is taken 4355bd8deadSopenharmony_ci from the current color buffer, while depth component and stencil 4365bd8deadSopenharmony_ci index data are taken from the depth and stencil buffers, 4375bd8deadSopenharmony_ci respectively. If depth component data is required and no depth 4385bd8deadSopenharmony_ci buffer is present, or if stencil index data is required and there is 4395bd8deadSopenharmony_ci no stencil buffer, the error INVALID_OPERATION is generated. 4405bd8deadSopenharmony_ci Subsequent processing is identical to that described for TexImage2D, 4415bd8deadSopenharmony_ci beginning with clamping of the R, G, B, A, or depth values, and 4425bd8deadSopenharmony_ci masking of the stencil index value, from the resulting pixel 4435bd8deadSopenharmony_ci groups..." 4445bd8deadSopenharmony_ci 4455bd8deadSopenharmony_ci Update the third paragraph on page 161 to say: 4465bd8deadSopenharmony_ci 4475bd8deadSopenharmony_ci "...except that the assignment of R, G, B, A, depth, and stencil 4485bd8deadSopenharmony_ci pixel group values to the texture components is controlled by the 4495bd8deadSopenharmony_ci internalformat of the texture array, not by an argument to the 4505bd8deadSopenharmony_ci command..." 4515bd8deadSopenharmony_ci 4525bd8deadSopenharmony_ci Update section 3.8.5 "Depth Component Textures" (page 168) to say: 4535bd8deadSopenharmony_ci 4545bd8deadSopenharmony_ci "Depth textures and the depth components of depth/stencil textures 4555bd8deadSopenharmony_ci can be treated as LUMINANCE, INTENSITY or ALPHA textures during 4565bd8deadSopenharmony_ci texture filtering and application. The initial state for depth and 4575bd8deadSopenharmony_ci depth/stencil textures treats them as LUMINANCE textures." 4585bd8deadSopenharmony_ci 4595bd8deadSopenharmony_ci Add a new section between sections 3.8.9 and 3.8.10, after the first 4605bd8deadSopenharmony_ci paragraph on page 177: 4615bd8deadSopenharmony_ci 4625bd8deadSopenharmony_ci "3.8.9-1/2 DEPTH/STENCIL Textures 4635bd8deadSopenharmony_ci 4645bd8deadSopenharmony_ci If the texture image has a base internal format of 4655bd8deadSopenharmony_ci DEPTH_STENCIL_EXT, then the stencil index texture component is 4665bd8deadSopenharmony_ci ignored. The texture value Tau does not include a stencil index 4675bd8deadSopenharmony_ci component, but includes only the depth component." 4685bd8deadSopenharmony_ci 4695bd8deadSopenharmony_ci Update the first paragraph of section 3.8.11 "Texture State and 4705bd8deadSopenharmony_ci Proxy State" on page 178 to say: 4715bd8deadSopenharmony_ci 4725bd8deadSopenharmony_ci "...eight integer values describing the resolutions of each of the 4735bd8deadSopenharmony_ci red, green, blue, alpha, luminance, intensity, depth, and stencil 4745bd8deadSopenharmony_ci components of the image..." 4755bd8deadSopenharmony_ci 4765bd8deadSopenharmony_ci Update the second paragraph on page 179 to say: 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci "... and internal format state values, as well as state for the red, 4795bd8deadSopenharmony_ci green, blue, alpha, luminance, intensity, depth, and stencil 4805bd8deadSopenharmony_ci component resolutions." 4815bd8deadSopenharmony_ci 4825bd8deadSopenharmony_ci Update the first paragraph of "Depth Texture Comparison Mode" in 4835bd8deadSopenharmony_ci section 3.8.14 on page 188 to say: 4845bd8deadSopenharmony_ci 4855bd8deadSopenharmony_ci "If the currently bound texture's base internal format is 4865bd8deadSopenharmony_ci DEPTH_COMPONENT or DEPTH_STENCIL_EXT..." 4875bd8deadSopenharmony_ci 4885bd8deadSopenharmony_ci Update the first paragraph of section 3.8.15 "Texture Application", 4895bd8deadSopenharmony_ci on page 189, to say: 4905bd8deadSopenharmony_ci 4915bd8deadSopenharmony_ci "...Otherwise, a texture value is found according to the parameter 4925bd8deadSopenharmony_ci values of the currently bound texture image of the appropriate 4935bd8deadSopenharmony_ci dimensionality using the rules given in sections 3.8.6 through 4945bd8deadSopenharmony_ci 3.8.9. Note that the texture value may contain R, G, B, A, L, I, or 4955bd8deadSopenharmony_ci D components, but it does not contain an S component. If the 4965bd8deadSopenharmony_ci texture's base internal format is DEPTH_STENCIL_EXT, for the 4975bd8deadSopenharmony_ci purposes of texture application, it is as if the base internal 4985bd8deadSopenharmony_ci format was DEPTH..." 4995bd8deadSopenharmony_ci 5005bd8deadSopenharmony_ci Starting with the bullet list on page 195, update section 3.11.2 5015bd8deadSopenharmony_ci "Shader Execution" to say: 5025bd8deadSopenharmony_ci 5035bd8deadSopenharmony_ci "* The sampler used in a texture lookup function is of type 5045bd8deadSopenharmony_ci sampler1D or sampler2D, and the texture object's base internal 5055bd8deadSopenharmony_ci format is DEPTH_COMPONENT or DEPTH_STENCIL_EXT, and the 5065bd8deadSopenharmony_ci TEXTURE_COMPARE_MODE is not NONE. 5075bd8deadSopenharmony_ci 5085bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type 5095bd8deadSopenharmony_ci sampler1DShadow or sampler2DShadow, and the texture object's base 5105bd8deadSopenharmony_ci internal format is DEPTH_COMPONENT or DEPTH_STENCIL_EXT, and the 5115bd8deadSopenharmony_ci TEXTURE_COMPARE_MODE is NONE. 5125bd8deadSopenharmony_ci 5135bd8deadSopenharmony_ci * The sampler used in a texture lookup function is of type 5145bd8deadSopenharmony_ci sampler1DShadow or sampler2DShadow, and the texture object's base 5155bd8deadSopenharmony_ci internal format is not DEPTH_COMPONENT or DEPTH_STENCIL_EXT. 5165bd8deadSopenharmony_ci 5175bd8deadSopenharmony_ci The stencil index texture internal component is ignored if the base 5185bd8deadSopenharmony_ci internal format is DEPTH_STENCIL_EXT. 5195bd8deadSopenharmony_ci 5205bd8deadSopenharmony_ci If a fragment shader uses..." 5215bd8deadSopenharmony_ci 5225bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment 5235bd8deadSopenharmony_ciOperations and the Frame Buffer) 5245bd8deadSopenharmony_ci 5255bd8deadSopenharmony_ci Replace section 4.3.1 "Writing to the Stencil Buffer" (page 218) 5265bd8deadSopenharmony_ci with the following: 5275bd8deadSopenharmony_ci 5285bd8deadSopenharmony_ci "4.3.1 Writing to the Stencil Buffer or to the Depth and Stencil 5295bd8deadSopenharmony_ci Buffers 5305bd8deadSopenharmony_ci 5315bd8deadSopenharmony_ci The operation of DrawPixels was described in section 3.6.4, except 5325bd8deadSopenharmony_ci if the <format> argument was STENCIL_INDEX or DEPTH_STENCIL_EXT. In 5335bd8deadSopenharmony_ci this case, all operations described for DrawPixels take place, but 5345bd8deadSopenharmony_ci window (x,y) coordinates, each with the corresponding stencil index, 5355bd8deadSopenharmony_ci or depth value and stencil index, are produced in lieu of fragments. 5365bd8deadSopenharmony_ci Each coordinate-data pair is sent directly to the per-fragment 5375bd8deadSopenharmony_ci operations, bypassing the texture, fog, and antialiasing application 5385bd8deadSopenharmony_ci stages of rasterization. Each pair is then treated as a fragment 5395bd8deadSopenharmony_ci for purposes of the pixel ownership and scissor tests; all other 5405bd8deadSopenharmony_ci per-fragment operations are bypassed. Finally, each stencil index 5415bd8deadSopenharmony_ci is written to its indicated location in the framebuffer, subject to 5425bd8deadSopenharmony_ci the current front stencil mask (set with StencilMask or 5435bd8deadSopenharmony_ci StencilMaskSeparate). If a depth component is present, and if the 5445bd8deadSopenharmony_ci setting of DepthMask is not FALSE, the depth component is also 5455bd8deadSopenharmony_ci written to the framebuffer; the setting of DepthTest is ignored. 5465bd8deadSopenharmony_ci 5475bd8deadSopenharmony_ci The error INVALID_OPERATION results if the <format> argument is 5485bd8deadSopenharmony_ci STENCIL_INDEX and there is no stencil buffer, or if <format> is 5495bd8deadSopenharmony_ci DEPTH_STENCIL_EXT and there is neither a depth nor a stencil 5505bd8deadSopenharmony_ci buffer." 5515bd8deadSopenharmony_ci 5525bd8deadSopenharmony_ci Add the following paragraph after the second paragraph of the 5535bd8deadSopenharmony_ci section "Obtaining Pixels from the Framebuffer" (page 219): 5545bd8deadSopenharmony_ci 5555bd8deadSopenharmony_ci "If the <format> is DEPTH_STENCIL_EXT, then values are taken from 5565bd8deadSopenharmony_ci both the depth buffer and the stencil buffer. If there is no depth 5575bd8deadSopenharmony_ci buffer or if there is no stencil buffer, then the error 5585bd8deadSopenharmony_ci INVALID_OPERATION occurs. If the <type> parameter is not 5595bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT, then the error INVALID_ENUM occurs. 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ci If there is a multisample buffer, then values are obtained from the 5625bd8deadSopenharmony_ci depth and stencil samples in this buffer. It is recommended that the 5635bd8deadSopenharmony_ci depth and stencil values of the centermost sample be used, though 5645bd8deadSopenharmony_ci implementations may choose any function of the depth and stencil 5655bd8deadSopenharmony_ci sample values at each pixel." 5665bd8deadSopenharmony_ci 5675bd8deadSopenharmony_ci Update the third paragraph on page 221 to say: 5685bd8deadSopenharmony_ci 5695bd8deadSopenharmony_ci "... If the GL is in color index mode, and <format> is not 5705bd8deadSopenharmony_ci DEPTH_COMPONENT, STENCIL_INDEX, or DEPTH_STENCIL_EXT, then the color 5715bd8deadSopenharmony_ci index is obtained at each pixel location." 5725bd8deadSopenharmony_ci 5735bd8deadSopenharmony_ci Update the first sentence of the section "Conversion of RGBA values" 5745bd8deadSopenharmony_ci (page 222) to say: 5755bd8deadSopenharmony_ci 5765bd8deadSopenharmony_ci "This step applies only if the GL is in RGBA mode, and then only if 5775bd8deadSopenharmony_ci <format> is neither STENCIL_INDEX, DEPTH_COMPONENT, nor 5785bd8deadSopenharmony_ci DEPTH_STENCIL_EXT." 5795bd8deadSopenharmony_ci 5805bd8deadSopenharmony_ci Update the section "Conversion of Depth values" (page 222) to say: 5815bd8deadSopenharmony_ci 5825bd8deadSopenharmony_ci "This step applies only if <format> is DEPTH_COMPONENT or 5835bd8deadSopenharmony_ci DEPTH_STENCIL_EXT. Each element taken from the depth buffer is 5845bd8deadSopenharmony_ci taken to be a fixed-point value in [0,1] with m bits, where m is the 5855bd8deadSopenharmony_ci number of bits in the depth buffer (see section 2.11.1)." 5865bd8deadSopenharmony_ci 5875bd8deadSopenharmony_ci Add a row to Table 4.6 (page 223): 5885bd8deadSopenharmony_ci 5895bd8deadSopenharmony_ci type Parameter Index Mask 5905bd8deadSopenharmony_ci --------------------------------- 5915bd8deadSopenharmony_ci ... ... 5925bd8deadSopenharmony_ci INT 2^31-1 5935bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT 2^8-1 5945bd8deadSopenharmony_ci 5955bd8deadSopenharmony_ci Update the second and third paragraphs of section 4.3.3 (page 223) 5965bd8deadSopenharmony_ci to say: 5975bd8deadSopenharmony_ci 5985bd8deadSopenharmony_ci "<type> is a symbolic constant that must be one of COLOR, STENCIL, 5995bd8deadSopenharmony_ci DEPTH, or DEPTH_STENCIL_EXT, indicating that the values to be 6005bd8deadSopenharmony_ci transferred are colors, stencil values, depth values, or 6015bd8deadSopenharmony_ci depth/stencil pairs, respectively. The first four arguments have the 6025bd8deadSopenharmony_ci same interpretation as the corresponding arguments to ReadPixels. 6035bd8deadSopenharmony_ci 6045bd8deadSopenharmony_ci Values are obtained from the framebuffer, converted (if 6055bd8deadSopenharmony_ci appropriate), then subjected to the pixel transfer operations 6065bd8deadSopenharmony_ci described in section 3.6.5, just as if ReadPixels were called with 6075bd8deadSopenharmony_ci the corresponding arguments. If the <type> is STENCIL or DEPTH, 6085bd8deadSopenharmony_ci then it is as if the <format> for ReadPixels were STENCIL_INDEX, or 6095bd8deadSopenharmony_ci DEPTH_COMPONENT, respectively. If the <type> is DEPTH_STENCIL_EXT, 6105bd8deadSopenharmony_ci then it is as if the <format> for ReadPixels were specified as 6115bd8deadSopenharmony_ci described in table 4.6b. If the <type> is COLOR, then if the GL is 6125bd8deadSopenharmony_ci in RGBA mode, it is as if the <format> were RGBA, while if the GL is 6135bd8deadSopenharmony_ci in color index mode, it is as if the <format> were COLOR_INDEX." 6145bd8deadSopenharmony_ci 6155bd8deadSopenharmony_ci Add Table 4.6b: 6165bd8deadSopenharmony_ci 6175bd8deadSopenharmony_ci DEPTH_BITS STENCIL_BITS format 6185bd8deadSopenharmony_ci ------------------------------------------- 6195bd8deadSopenharmony_ci zero zero DEPTH_STENCIL_EXT 6205bd8deadSopenharmony_ci zero non-zero DEPTH_COMPONENT 6215bd8deadSopenharmony_ci non-zero zero STENCIL_INDEX 6225bd8deadSopenharmony_ci non-zero non-zero DEPTH_STENCIL_EXT 6235bd8deadSopenharmony_ci 6245bd8deadSopenharmony_ci Table 4.6b: Effective ReadPixels format for DEPTH_STENCIL_EXT 6255bd8deadSopenharmony_ci CopyPixels operation. 6265bd8deadSopenharmony_ci 6275bd8deadSopenharmony_ci Add a row to Table 4.7 (page 224): 6285bd8deadSopenharmony_ci 6295bd8deadSopenharmony_ci type Parameter GL Type Component Conversion ... 6305bd8deadSopenharmony_ci ------------------------------------------------------------------ 6315bd8deadSopenharmony_ci ... ... ... 6325bd8deadSopenharmony_ci UNSIGNED_INT_2_10_10_10_REV uint c = (2^N - 1)f 6335bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT uint c = (2^N - 1)f (depth only) 6345bd8deadSopenharmony_ci 6355bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification, as modified by 6365bd8deadSopenharmony_cithe EXT_framebuffer_object specification 6375bd8deadSopenharmony_ci 6385bd8deadSopenharmony_ci In section 4.4.2.1 "Renderbuffer Objects", modify the first 6395bd8deadSopenharmony_ci paragraph in the definition of RenderbufferStorageEXT to say: 6405bd8deadSopenharmony_ci 6415bd8deadSopenharmony_ci "... <internalformat> must be RGB, RGBA, DEPTH_COMPONENT, 6425bd8deadSopenharmony_ci STENCIL_INDEX, DEPTH_STENCIL_EXT, or one of the internal formats 6435bd8deadSopenharmony_ci from table 3.16 or table 2.nnn that has a base internal format of 6445bd8deadSopenharmony_ci RGB, RGBA, DEPTH_COMPONENT, STENCIL_INDEX, or DEPTH_STENCIL_EXT..." 6455bd8deadSopenharmony_ci 6465bd8deadSopenharmony_ci In section 4.4.4 "Framebuffer Completeness", modify the definition of 6475bd8deadSopenharmony_ci "depth-renderable" and "stencil-renderable" to say: 6485bd8deadSopenharmony_ci 6495bd8deadSopenharmony_ci "* An internal format is "depth-renderable" if it is 6505bd8deadSopenharmony_ci DEPTH_COMPONENT or one of the formats from table 3.16 whose 6515bd8deadSopenharmony_ci base internal format is DEPTH_COMPONENT or DEPTH_STENCIL_EXT. 6525bd8deadSopenharmony_ci No other formats are depth-renderable. 6535bd8deadSopenharmony_ci 6545bd8deadSopenharmony_ci * An internal format is "stencil-renderable" if it is 6555bd8deadSopenharmony_ci STENCIL_INDEX or DEPTH_STENCIL_EXT, if it is one of the 6565bd8deadSopenharmony_ci STENCIL_INDEX formats from table 2.nnn, or if it is one of the 6575bd8deadSopenharmony_ci formats from table 3.16 whose base internal format is 6585bd8deadSopenharmony_ci DEPTH_STENCIL_EXT. No other formats are stencil-renderable." 6595bd8deadSopenharmony_ci 6605bd8deadSopenharmony_ci In section 4.4.4.2 "Framebuffer Completeness", modify the 6615bd8deadSopenharmony_ci duplicate attachment clause of "framebuffer complete" to say: 6625bd8deadSopenharmony_ci 6635bd8deadSopenharmony_ci "* A single image is not attached more than once to the framebuffer 6645bd8deadSopenharmony_ci object. The exception is that an image with a DEPTH_STENCIL_EXT 6655bd8deadSopenharmony_ci base internal format may be simultaneously attached to both 6665bd8deadSopenharmony_ci FRAMEBUFFER_DEPTH_ATTACHMENT and FRAMEBUFFER_STENCIL_ATTACHMENT. 6675bd8deadSopenharmony_ci { FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT }" 6685bd8deadSopenharmony_ci 6695bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special 6705bd8deadSopenharmony_ciFunctions) 6715bd8deadSopenharmony_ci 6725bd8deadSopenharmony_ci None. 6735bd8deadSopenharmony_ci 6745bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and State 6755bd8deadSopenharmony_ciRequests) 6765bd8deadSopenharmony_ci 6775bd8deadSopenharmony_ci Update the third paragraph on page 247, of section 6.1.3 "Enumerated 6785bd8deadSopenharmony_ci Queries", to say: 6795bd8deadSopenharmony_ci 6805bd8deadSopenharmony_ci "For texture images with uncompressed internal formats, queries of 6815bd8deadSopenharmony_ci value of TEXTURE_RED_SIZE, TEXTURE_GREEN_SIZE, TEXTURE_BLUE_SIZE, 6825bd8deadSopenharmony_ci TEXTURE_ALPHA_SIZE, TEXTURE_LUMINANCE_SIZE, TEXTURE_INTENSITY_SIZE, 6835bd8deadSopenharmony_ci TEXTURE_DEPTH_SIZE, and TEXTURE_STENCIL_SIZE_EXT return the actual 6845bd8deadSopenharmony_ci resolutions of the stored image array components..." 6855bd8deadSopenharmony_ci 6865bd8deadSopenharmony_ci Section 6.1.4, Texture Queries, p. 248, replace the first two 6875bd8deadSopenharmony_ci sentences of paragraph two as follows: 6885bd8deadSopenharmony_ci 6895bd8deadSopenharmony_ci "Calling GetTexImage with a color format (one of RED, GREEN, 6905bd8deadSopenharmony_ci BLUE, ALPHA, RGB, BGR, RGBA, BGRA, LUMINANCE, or 6915bd8deadSopenharmony_ci LUMINANCE_ALPHA) when the internal format of the texture image 6925bd8deadSopenharmony_ci is not a color format causes the error INVALID_OPERATION. 6935bd8deadSopenharmony_ci 6945bd8deadSopenharmony_ci Calling GetTexImage with a <format> of DEPTH_COMPONENT when the 6955bd8deadSopenharmony_ci base internal format of the texture image is not DEPTH_COMPONENT 6965bd8deadSopenharmony_ci or DEPTH_STENCIL_EXT causes the error INVALID_OPERATION. 6975bd8deadSopenharmony_ci 6985bd8deadSopenharmony_ci Calling GetTexImage with a <format> of DEPTH_STENCIL_EXT when 6995bd8deadSopenharmony_ci the base internal format of the texture image is not 7005bd8deadSopenharmony_ci DEPTH_STENCIL_EXT causes the error INVALID_OPERATION. 7015bd8deadSopenharmony_ci 7025bd8deadSopenharmony_ci GetTexImage obtains component groups from a texture image with 7035bd8deadSopenharmony_ci the indicated level-of-detail. If <format> is a color format, 7045bd8deadSopenharmony_ci then the components are assigned among R, G, B, and A according 7055bd8deadSopenharmony_ci to Table 6.1, starting with the first group in the first row, 7065bd8deadSopenharmony_ci and continuing by obtaining groups in order from each row and 7075bd8deadSopenharmony_ci proceeding from the first row to the last, and from the first 7085bd8deadSopenharmony_ci image to the last for three-dimensional textures. If <format> 7095bd8deadSopenharmony_ci is DEPTH_COMPONENT, then each depth component is assigned with 7105bd8deadSopenharmony_ci the same ordering of rows and images. If <format> is 7115bd8deadSopenharmony_ci DEPTH_STENCIL_EXT, then each depth component and each stencil 7125bd8deadSopenharmony_ci index is assigned with the same ordering of rows and images." 7135bd8deadSopenharmony_ci 7145bd8deadSopenharmony_ci Add a row to table 6.17 "Textures (state per texture image)" on page 7155bd8deadSopenharmony_ci 278: 7165bd8deadSopenharmony_ci 7175bd8deadSopenharmony_ci Get value Type Get Cmd IV Description Sec. 7185bd8deadSopenharmony_ci ------------------------------------------------------------------------------------------------------- 7195bd8deadSopenharmony_ci ... ... ... ... ... ... 7205bd8deadSopenharmony_ci TEXTURE_STENCIL_SIZE_EXT n x Z+ GetTexLevelParameter 0 texture image's intensity resolution 3.8.3 7215bd8deadSopenharmony_ci 7225bd8deadSopenharmony_ci Update 7235bd8deadSopenharmony_ci 7245bd8deadSopenharmony_ciDependencies on EXT_framebuffer_object 7255bd8deadSopenharmony_ci 7265bd8deadSopenharmony_ci If EXT_framebuffer_object is not supported, then all discussion of 7275bd8deadSopenharmony_ci framebuffer objects and renderbuffer objects should be removed. 7285bd8deadSopenharmony_ci 7295bd8deadSopenharmony_ciGLX Protocol 7305bd8deadSopenharmony_ci 7315bd8deadSopenharmony_ci None. 7325bd8deadSopenharmony_ci 7335bd8deadSopenharmony_ciErrors 7345bd8deadSopenharmony_ci 7355bd8deadSopenharmony_ci The error INVALID_ENUM is generated if DrawPixels or ReadPixels is 7365bd8deadSopenharmony_ci called where format is DEPTH_STENCIL_EXT and type is not 7375bd8deadSopenharmony_ci UNSIGNED_INT_24_8_EXT. 7385bd8deadSopenharmony_ci 7395bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if DrawPixels or ReadPixels 7405bd8deadSopenharmony_ci is called where type is UNSIGNED_INT_24_8_EXT and format is not 7415bd8deadSopenharmony_ci DEPTH_STENCIL_EXT. 7425bd8deadSopenharmony_ci 7435bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if DrawPixels or ReadPixels 7445bd8deadSopenharmony_ci is called where format is DEPTH_STENCIL_EXT and there is not both a 7455bd8deadSopenharmony_ci depth buffer and a stencil buffer. 7465bd8deadSopenharmony_ci 7475bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if CopyPixels is called 7485bd8deadSopenharmony_ci where type is DEPTH_STENCIL_EXT and there is not both a depth buffer 7495bd8deadSopenharmony_ci and a stencil buffer. 7505bd8deadSopenharmony_ci 7515bd8deadSopenharmony_ci Update the following error in the EXT_framebuffer_object 7525bd8deadSopenharmony_ci specification by adding mention of DEPTH_STENCIL_EXT formats: 7535bd8deadSopenharmony_ci 7545bd8deadSopenharmony_ci "The error INVALID_ENUM is generated if RenderbufferStorageEXT is 7555bd8deadSopenharmony_ci called with an <internalformat> that is not RGB, RGBA, 7565bd8deadSopenharmony_ci DEPTH_COMPONENT, STENCIL_INDEX, DEPTH_STENCIL_EXT, or one of the 7575bd8deadSopenharmony_ci internal formats from table 3.16 or table 2.nnn that has a base 7585bd8deadSopenharmony_ci internal format of RGB, RGBA, DEPTH_COMPONENT, STENCIL_INDEX, or 7595bd8deadSopenharmony_ci DEPTH_STENCIL_EXT." 7605bd8deadSopenharmony_ci 7615bd8deadSopenharmony_ciNew State 7625bd8deadSopenharmony_ci 7635bd8deadSopenharmony_ci None. 7645bd8deadSopenharmony_ci 7655bd8deadSopenharmony_ciUsage ExampleS 7665bd8deadSopenharmony_ci 7675bd8deadSopenharmony_ci (1) Attach a DEPTH_STENCIL_EXT texture image to an FBO as both the 7685bd8deadSopenharmony_ci depth and stencil buffers. 7695bd8deadSopenharmony_ci 7705bd8deadSopenharmony_ci glGenFramebuffersEXT(1, &fb); 7715bd8deadSopenharmony_ci glGenTextures(1, &tex_color); 7725bd8deadSopenharmony_ci glGenTextures(1, &tex_depthstencil); 7735bd8deadSopenharmony_ci 7745bd8deadSopenharmony_ci glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb); 7755bd8deadSopenharmony_ci 7765bd8deadSopenharmony_ci // Setup color texture (mipmap) 7775bd8deadSopenharmony_ci glBindTexture(GL_TEXTURE_2D, tex_color); 7785bd8deadSopenharmony_ci glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, 7795bd8deadSopenharmony_ci 512, 512, 0, GL_RGBA, GL_INT, NULL); 7805bd8deadSopenharmony_ci glGenerateMipmapEXT(GL_TEXTURE_2D); 7815bd8deadSopenharmony_ci glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, 7825bd8deadSopenharmony_ci GL_COLOR_ATTACHMENT0_EXT, 7835bd8deadSopenharmony_ci GL_TEXTURE_2D, tex_color, 0); 7845bd8deadSopenharmony_ci 7855bd8deadSopenharmony_ci // Setup depth_stencil texture (not mipmap) 7865bd8deadSopenharmony_ci glBindTexture(GL_TEXTURE_2D, tex_depthstencil); 7875bd8deadSopenharmony_ci glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 7885bd8deadSopenharmony_ci glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8_EXT, 7895bd8deadSopenharmony_ci 512, 512, 0, GL_DEPTH_STENCIL_EXT, 7905bd8deadSopenharmony_ci GL_UNSIGNED_INT_24_8_EXT, NULL); 7915bd8deadSopenharmony_ci glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, 7925bd8deadSopenharmony_ci GL_DEPTH_ATTACHMENT_EXT, 7935bd8deadSopenharmony_ci GL_TEXTURE_2D, tex_depthstencil, 0); 7945bd8deadSopenharmony_ci glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, 7955bd8deadSopenharmony_ci GL_STENCIL_ATTACHMENT_EXT, 7965bd8deadSopenharmony_ci GL_TEXTURE_2D, tex_depthstencil, 0); 7975bd8deadSopenharmony_ci 7985bd8deadSopenharmony_ci // Check framebuffer completeness at the end of initialization. 7995bd8deadSopenharmony_ci 8005bd8deadSopenharmony_ci loop { 8015bd8deadSopenharmony_ci glBindTexture(GL_TEXTURE_2D, 0); 8025bd8deadSopenharmony_ci glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb); 8035bd8deadSopenharmony_ci <render to color, depth, and stencil textures> 8045bd8deadSopenharmony_ci glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); 8055bd8deadSopenharmony_ci 8065bd8deadSopenharmony_ci glBindTexture(GL_TEXTURE_2D, tex_color); 8075bd8deadSopenharmony_ci glGenerateMipmapEXT(GL_TEXTURE_2D); 8085bd8deadSopenharmony_ci <draw to the window, reading from the color texture> 8095bd8deadSopenharmony_ci 8105bd8deadSopenharmony_ci glBindTexture(GL_TEXTURE_2D, tex_depthstencil); 8115bd8deadSopenharmony_ci <draw to the window, reading depth from the depthstencil texture> 8125bd8deadSopenharmony_ci } 8135bd8deadSopenharmony_ci 8145bd8deadSopenharmony_ciIssues 8155bd8deadSopenharmony_ci 8165bd8deadSopenharmony_ci 01) Depth data has a format of GL_DEPTH_COMPONENT, and stencil data 8175bd8deadSopenharmony_ci has a format of STENCIL_INDEX. So shouldn't the enumerant be 8185bd8deadSopenharmony_ci called DEPTH_COMPONENT_STENCIL_INDEX_EXT? 8195bd8deadSopenharmony_ci 8205bd8deadSopenharmony_ci RESOLVED: No, this is fairly clumsy. 8215bd8deadSopenharmony_ci 8225bd8deadSopenharmony_ci 02) Should we support CopyPixels? 8235bd8deadSopenharmony_ci 8245bd8deadSopenharmony_ci RESOLVED: Yes. Right now copying stencil data means masking off 8255bd8deadSopenharmony_ci just the stencil bits, while copying depth data has strange 8265bd8deadSopenharmony_ci unintended consequences (fragment operations) and is difficult 8275bd8deadSopenharmony_ci to implement. It is easy and useful to add CopyPixels support. 8285bd8deadSopenharmony_ci 8295bd8deadSopenharmony_ci 03) Should we support textures? 8305bd8deadSopenharmony_ci 8315bd8deadSopenharmony_ci RESOLVED: Yes. 24-bit depth textures have no good format 8325bd8deadSopenharmony_ci without this extension. 8335bd8deadSopenharmony_ci 8345bd8deadSopenharmony_ci 04) Should the depth/stencil format support other standard types, 8355bd8deadSopenharmony_ci like FLOAT or UNSIGNED_INT? 8365bd8deadSopenharmony_ci 8375bd8deadSopenharmony_ci RESOLVED: No, this extension is designed to be minimalist. 8385bd8deadSopenharmony_ci Supporting more types gains little because the new types will 8395bd8deadSopenharmony_ci just require data format conversions. Our goal is to match the 8405bd8deadSopenharmony_ci native format of the buffer, not add broad new classes of 8415bd8deadSopenharmony_ci functionality. 8425bd8deadSopenharmony_ci 8435bd8deadSopenharmony_ci 05) Should the 24/8 format be supported for other formats, such as 8445bd8deadSopenharmony_ci LUMINANCE_ALPHA? Should we support an 8/24 reversed format as 8455bd8deadSopenharmony_ci well? 8465bd8deadSopenharmony_ci 8475bd8deadSopenharmony_ci RESOLVED: No and no, this adds implementation burden and gains 8485bd8deadSopenharmony_ci us little, if anything. 8495bd8deadSopenharmony_ci 8505bd8deadSopenharmony_ci 06) Should anything be said about performance? 8515bd8deadSopenharmony_ci 8525bd8deadSopenharmony_ci RESOLVED: No, not in the spec. However, common sense should 8535bd8deadSopenharmony_ci apply. Apps should probably check that DEPTH_BITS is 24 and 8545bd8deadSopenharmony_ci that STENCIL_BITS is 8 before using either the new DrawPixels or 8555bd8deadSopenharmony_ci ReadPixels formats. CopyPixels is probably safe regardless of 8565bd8deadSopenharmony_ci the size of either buffer. The 24/8 format should probably only 8575bd8deadSopenharmony_ci be used with 24-bit depth textures. 8585bd8deadSopenharmony_ci 8595bd8deadSopenharmony_ci 07) What happens when the format of a DEPTH_STENCIL_EXT pixel path 8605bd8deadSopenharmony_ci operation specifies more components than are present in the 8615bd8deadSopenharmony_ci source? 8625bd8deadSopenharmony_ci 8635bd8deadSopenharmony_ci RESOLVED: INVALID_OPERATION is generated. 8645bd8deadSopenharmony_ci 8655bd8deadSopenharmony_ci Operations affected by this issue include ReadPixels and 8665bd8deadSopenharmony_ci operations defined in terms of ReadPixels, such as CopyPixels, 8675bd8deadSopenharmony_ci CopyTexImage, CopyTexSubImage, and GetTexImage. 8685bd8deadSopenharmony_ci 8695bd8deadSopenharmony_ci For example, if the framebuffer has non-zero DEPTH_BITS but zero 8705bd8deadSopenharmony_ci STENCIL_BITS, then ReadPixels of DEPTH_COMPONENT is legal. But 8715bd8deadSopenharmony_ci ReadPixels of DEPTH_STENCIL_EXT will generate INVALID_OPERATION. 8725bd8deadSopenharmony_ci 8735bd8deadSopenharmony_ci 08) What happens when the format of a DEPTH_STENCIL_EXT pixel path 8745bd8deadSopenharmony_ci operation specifies more components than are present in the 8755bd8deadSopenharmony_ci destination? 8765bd8deadSopenharmony_ci 8775bd8deadSopenharmony_ci RESOLVED: The extra information is thrown away. No GL error is 8785bd8deadSopenharmony_ci generated because the source contains more components than the 8795bd8deadSopenharmony_ci destination. 8805bd8deadSopenharmony_ci 8815bd8deadSopenharmony_ci For example, consider a TexSubImage operation where the source 8825bd8deadSopenharmony_ci data is DEPTH_STENCIL_EXT but the existing texture format is 8835bd8deadSopenharmony_ci DEPTH_COMPONENT. 8845bd8deadSopenharmony_ci 8855bd8deadSopenharmony_ci 09) What happens when the format of a DEPTH_STENCIL_EXT pixel path 8865bd8deadSopenharmony_ci operation specifies fewer components than are present in the 8875bd8deadSopenharmony_ci destination? 8885bd8deadSopenharmony_ci 8895bd8deadSopenharmony_ci RESOLVED: the existing values of the unspecified components are 8905bd8deadSopenharmony_ci preserved. 8915bd8deadSopenharmony_ci 8925bd8deadSopenharmony_ci For example, consider a TexSubImage operation where the <format> 8935bd8deadSopenharmony_ci is DEPTH_COMPONENT and the existing internalformat is 8945bd8deadSopenharmony_ci DEPTH_STENCIL_EXT. The texture image's depth component will be 8955bd8deadSopenharmony_ci updated, but the texture's existing stencil component will be 8965bd8deadSopenharmony_ci preserved. 8975bd8deadSopenharmony_ci 8985bd8deadSopenharmony_ci 10) And, for completeness, what happens when the format of a 8995bd8deadSopenharmony_ci DEPTH_STENCIL_EXT pixel path operation specifies fewer 9005bd8deadSopenharmony_ci components than are present in the source? 9015bd8deadSopenharmony_ci 9025bd8deadSopenharmony_ci RESOLVED: trivial. Only the specified components are read. 9035bd8deadSopenharmony_ci 9045bd8deadSopenharmony_ci 11) How does the texture border color interact with a 9055bd8deadSopenharmony_ci DEPTH_STENCIL_EXT texture? 9065bd8deadSopenharmony_ci 9075bd8deadSopenharmony_ci RESOLVED: nothing special needs to be stated here. 9085bd8deadSopenharmony_ci 9095bd8deadSopenharmony_ci There is no stencil component in the border color. Either 9105bd8deadSopenharmony_ci you're rendering to it, in which case it's just a buffer, or 9115bd8deadSopenharmony_ci texturing from it, in which case stencil is irrelevant. If a 9125bd8deadSopenharmony_ci future use case comes up, the second component of 9135bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR could be used at the stencil border value, 9145bd8deadSopenharmony_ci just as the first component is used as the depth value today. 9155bd8deadSopenharmony_ci 9165bd8deadSopenharmony_ci 12) How does automatic mipmap generation deal with the stencil 9175bd8deadSopenharmony_ci component of a DEPTH_STENCIL_EXT texture? 9185bd8deadSopenharmony_ci 9195bd8deadSopenharmony_ci RESOLVED: The 2.0 spec doesn't talk about depth textures 9205bd8deadSopenharmony_ci specifically. Stencils, which are indexes / counts, are even 9215bd8deadSopenharmony_ci harder. We'll leave this undefined. 9225bd8deadSopenharmony_ci 9235bd8deadSopenharmony_ci Also, an application that wants to generate a stencil mipmap can 9245bd8deadSopenharmony_ci follow the procedure given in example 5 of the 9255bd8deadSopenharmony_ci EXT_framebuffer_object specification. 9265bd8deadSopenharmony_ci 9275bd8deadSopenharmony_ci 13) Should GetTexImage permit <format> of DEPTH_STENCIL_EXT? 9285bd8deadSopenharmony_ci 9295bd8deadSopenharmony_ci RESOLVED: Yes. 9305bd8deadSopenharmony_ci 9315bd8deadSopenharmony_ci The GL 2.0 spec disallows GetTexImage of DEPTH_COMPONENT data. 9325bd8deadSopenharmony_ci But that seems to be an unintentional spec bug. 9335bd8deadSopenharmony_ci ARB_depth_texture permitted it and even addressed the question 9345bd8deadSopenharmony_ci as issue 9. Appendix G.4 of the GL 2.0 spec does not mention 9355bd8deadSopenharmony_ci this discrepancy. 9365bd8deadSopenharmony_ci 9375bd8deadSopenharmony_ci GetTexImage of DEPTH_STENCIL_EXT format should follow the 9385bd8deadSopenharmony_ci resolution for GetTexImage of DEPTH_COMPONENT format. 9395bd8deadSopenharmony_ci 9405bd8deadSopenharmony_ci A future version of the core GL spec will be modified to state 9415bd8deadSopenharmony_ci that GetTexImage of DEPTH_COMPONENT data is legal. 9425bd8deadSopenharmony_ci 9435bd8deadSopenharmony_ci 14) Does DrawPixels with DEPTH_STENCIL_EXT format behave like 9445bd8deadSopenharmony_ci DrawPixels of DEPTH_COMPONENT format, or like DrawPixels of 9455bd8deadSopenharmony_ci STENCIL_INDEX format? 9465bd8deadSopenharmony_ci 9475bd8deadSopenharmony_ci RESOLVED: It behaves like DrawPixels of STENCIL_INDEX format. 9485bd8deadSopenharmony_ci 9495bd8deadSopenharmony_ci See sections 3.6.4 and 4.3.1. It is desirable to give similar 9505bd8deadSopenharmony_ci treatment to both the depth and the stencil components. 9515bd8deadSopenharmony_ci 9525bd8deadSopenharmony_ci 15) If depth/stencil images are mixed such that they violate the 9535bd8deadSopenharmony_ci framebuffer completeness rule in section 4.4.4.2, what 9545bd8deadSopenharmony_ci FRAMEBUFFER_INCOMPLETE_ enum should be used? 9555bd8deadSopenharmony_ci 9565bd8deadSopenharmony_ci UNRESOLVED: FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT and 9575bd8deadSopenharmony_ci FRAMEBUFFER_INCOMPLETE_MIXED_DEPTH_STENCIL_EXT are possible 9585bd8deadSopenharmony_ci answers. 9595bd8deadSopenharmony_ci 9605bd8deadSopenharmony_ci 16) What happens if DEPTH_STENCIL_EXT and STENCIL_ATTACHMENT_EXT 9615bd8deadSopenharmony_ci name distinct framebuffer-attachable images, but the format of 9625bd8deadSopenharmony_ci one or both is DEPTH_STENCIL_EXT? 9635bd8deadSopenharmony_ci 9645bd8deadSopenharmony_ci RESOLVED: This is permitted. The depth component of the depth 9655bd8deadSopenharmony_ci attachment should be updated, the stencil component of the 9665bd8deadSopenharmony_ci stencil attachment should be updated, and the other components 9675bd8deadSopenharmony_ci are preserved. However, it should be noted that some 9685bd8deadSopenharmony_ci implementations might not support such mix-matching, and that 9695bd8deadSopenharmony_ci these implementations are free to label such a framebuffer as 9705bd8deadSopenharmony_ci FRAMEBUFFER_UNSUPPORTED_EXT. 9715bd8deadSopenharmony_ci 9725bd8deadSopenharmony_ci An earlier drafts of this extension contained the following 9735bd8deadSopenharmony_ci language. 9745bd8deadSopenharmony_ci 9755bd8deadSopenharmony_ci In section 4.4.4.2 "Framebuffer Completeness", add a clause 9765bd8deadSopenharmony_ci to the definition of "framebuffer complete": 9775bd8deadSopenharmony_ci 9785bd8deadSopenharmony_ci "* If both attachment points FRAMEBUFFER_DEPTH_ATTACHMENT 9795bd8deadSopenharmony_ci and FRAMEBUFFER_STENCIL_ATTACHMENT have an attached 9805bd8deadSopenharmony_ci image, and if either image's base internal format is 9815bd8deadSopenharmony_ci DEPTH_STENCIL_EXT, then the same image must be attached 9825bd8deadSopenharmony_ci to both FRAMEBUFFER_DEPTH_ATTACHMENT and 9835bd8deadSopenharmony_ci FRAMEBUFFER_STENCIL_ATTACHMENT. 9845bd8deadSopenharmony_ci { FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT }" 9855bd8deadSopenharmony_ci 9865bd8deadSopenharmony_ci That clause was removed from section 4.4.4.2 in revision #10 9875bd8deadSopenharmony_ci after it was pointed out that, on implementations where such 9885bd8deadSopenharmony_ci mix-matching is supported, it need not result in an incomplete 9895bd8deadSopenharmony_ci framebuffer. 9905bd8deadSopenharmony_ci 9915bd8deadSopenharmony_ciRevision History 9925bd8deadSopenharmony_ci 9935bd8deadSopenharmony_ci#12 September 26, 2005 9945bd8deadSopenharmony_ci - Fix copy/paste error in the example. 9955bd8deadSopenharmony_ci 9965bd8deadSopenharmony_ci#11 September 20, 2005 9975bd8deadSopenharmony_ci - Assign enum values. 9985bd8deadSopenharmony_ci 9995bd8deadSopenharmony_ci#10 September 19, 2005 10005bd8deadSopenharmony_ci - Remove FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT clause and add the 10015bd8deadSopenharmony_ci accompanying issue 16 explaining why. 10025bd8deadSopenharmony_ci 10035bd8deadSopenharmony_ci#09 September 19, 2005 10045bd8deadSopenharmony_ci - Add issue 15. 10055bd8deadSopenharmony_ci - Fix FBO interaction. (depth_stencil can be attached twice) 10065bd8deadSopenharmony_ci - Add Usage Examples section and example 1. 10075bd8deadSopenharmony_ci - Move issues to the end according to new precedent. 10085bd8deadSopenharmony_ci - Add more dependencies, add contributors. 10095bd8deadSopenharmony_ci - Fix typos pointed out at ARB meeting. 10105bd8deadSopenharmony_ci 10115bd8deadSopenharmony_ci#08 September 9, 2005 10125bd8deadSopenharmony_ci - Resolve issues 13 and 14. 10135bd8deadSopenharmony_ci - Add issue 10 for completeness. 10145bd8deadSopenharmony_ci - Modify GetTexImage to permit depth and depth/stencil. 10155bd8deadSopenharmony_ci - Incorporate feedback from Barthold's review. 10165bd8deadSopenharmony_ci 10175bd8deadSopenharmony_ci#07 August 29, 2005 10185bd8deadSopenharmony_ci - Record resolutions for issues 7-12. 10195bd8deadSopenharmony_ci - Update the spec body to reflect the issue resolutions. 10205bd8deadSopenharmony_ci - Add new issues 13-14. 10215bd8deadSopenharmony_ci - Remove interaction with copy_depth_to_color (no resolution needed) 10225bd8deadSopenharmony_ci 10235bd8deadSopenharmony_ci#06 July 15, 2005 10245bd8deadSopenharmony_ci - Improve some wording in the issues section. 10255bd8deadSopenharmony_ci - Add issue on interaction with NV_copy_depth_to_color. 10265bd8deadSopenharmony_ci - Remove interaction with stenci_clear_tag (no resolution needed) 10275bd8deadSopenharmony_ci 10285bd8deadSopenharmony_ci#05 June 20, 2005 10295bd8deadSopenharmony_ci - Add (now removed) unresolved issue 12 on interactions with 10305bd8deadSopenharmony_ci EXT_stencil_clear_tag. 10315bd8deadSopenharmony_ci 10325bd8deadSopenharmony_ci#04 June 10, 2005 10335bd8deadSopenharmony_ci - Add modifications to the EXT_framebuffer_object specification. 10345bd8deadSopenharmony_ci 10355bd8deadSopenharmony_ci#03 May 28, 2005 10365bd8deadSopenharmony_ci - Add DEPTH_STENCIL_EXT as a new base internal format, 10375bd8deadSopenharmony_ci - Add DEPTH24_STENCIL8_EXT as a new sized internal format. 10385bd8deadSopenharmony_ci 10395bd8deadSopenharmony_ci#02 May 12, 2005 10405bd8deadSopenharmony_ci - Update to be written against OpenGL 2.0 specification. 10415bd8deadSopenharmony_ci 10425bd8deadSopenharmony_ci#01 May 12, 2005 10435bd8deadSopenharmony_ci - Start with NV_packed_depth_stencil as the basis for 10445bd8deadSopenharmony_ci EXT_packed_depth_stencil. 10455bd8deadSopenharmony_ci - Rename to EXT. 1046