15bd8deadSopenharmony_ciXXX - Not complete -- needs errors & GLX protocol 25bd8deadSopenharmony_ciwork 35bd8deadSopenharmony_ci 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci SGIX_icc_texture 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciName Strings 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci GL_SGIX_icc_texture 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciVersion 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci $Date: 1999/06/09 18:23:05 $ $Revision: 1.16 $ 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciNumber 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci 154 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciDependencies 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci OpenGL 1.1 is required. 245bd8deadSopenharmony_ci EXT_texture3D affects the definition of this extension 255bd8deadSopenharmony_ci SGIS_texture4D affects the definition of this extension 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciOverview 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci This extension defines new host and internal formats for the 305bd8deadSopenharmony_ci storage of compressed images. The formats utilize a variant of 315bd8deadSopenharmony_ci color cell compression, in which 4x4 pixel blocks are represented 325bd8deadSopenharmony_ci by two color values and a two bit index per pixel. Two additional 335bd8deadSopenharmony_ci values are interpolated between the two explicitly stored values, 345bd8deadSopenharmony_ci and each pixel's index selects one of these four values. For RGB 355bd8deadSopenharmony_ci and RGBA images, two RGB colors and a single index per pixel are 365bd8deadSopenharmony_ci used to store the R, G, and B channels. For RGBA and 375bd8deadSopenharmony_ci LUMINANCE_ALPHA formats, the alpha channel is encoded 385bd8deadSopenharmony_ci independently using two alpha values and an index per pixel. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciIssues 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci - Do we really want compressed textures to be a full-blown host 435bd8deadSopenharmony_ci format that may be used to specify things like color tables? 445bd8deadSopenharmony_ci Orthogonality says yes, simplicity says no. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci A: ICC formats don't seem useful for things other than textures 475bd8deadSopenharmony_ci so limit it to that. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci - What about one, three, and four dimensional textures? 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci A: Three and four should work as stacks of 2D textures. One 525bd8deadSopenharmony_ci could be made to work but the natural hardware implementation 535bd8deadSopenharmony_ci would be to have a block represent a 16x1 subimage. The 545bd8deadSopenharmony_ci locality probably wouldn't be good and equivalent results could 555bd8deadSopenharmony_ci be obtained with texture filtering. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci - Method of dealing with width & height of host image is awkward 585bd8deadSopenharmony_ci when downloading small mipmap levels since UNPACK_ROW_LENGTH 595bd8deadSopenharmony_ci must be set. Should we say that the rounding up happens 605bd8deadSopenharmony_ci automatically? 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci A: Yes. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci - Should unpacking of ICC formats be described in the section 655bd8deadSopenharmony_ci about pixel rectangles (with the rest of the unpacking) or in 665bd8deadSopenharmony_ci the section about texture downloads (since they cannot be used 675bd8deadSopenharmony_ci in any other situation)? Similar question for readbacks. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ci - There are still some problems with the sized and base internal 705bd8deadSopenharmony_ci formats. We're ok for now since there is only one sized 715bd8deadSopenharmony_ci internal format for each base internal format. Can we get rid 725bd8deadSopenharmony_ci of the unsized internal formats? 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci - Need to say that pixel transfer modes are not applied. Ideally this 755bd8deadSopenharmony_ci should be done in such a way that removing this restriction in a 765bd8deadSopenharmony_ci later extension is not a problem. We could say that trying to 775bd8deadSopenharmony_ci do a ICC download with a non-identity pixel transfer operation 785bd8deadSopenharmony_ci applied results in an error, but checking for non-identity pixel 795bd8deadSopenharmony_ci transfer operations can be tricky. 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci - Is there any way to change this extension such that 825bd8deadSopenharmony_ci implementations which don't support a certain compressed format 835bd8deadSopenharmony_ci can "fake it?" With the "no compressor" limitation this might 845bd8deadSopenharmony_ci require the texture manager to maintain a shadowed copy of the 855bd8deadSopenharmony_ci compressed texture and put decompressed versions in texture 865bd8deadSopenharmony_ci memory. 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci - Need to document behavior when interlacing is on. Won't work 895bd8deadSopenharmony_ci but should it be ignored or an error? 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ciReasoning 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci - This spec is designed to avoid adding the ability to compress 945bd8deadSopenharmony_ci into the ICC formats within GL. Therefore, we do not allow 955bd8deadSopenharmony_ci subtexture downloads which are not aligned to the 4x4 tile size 965bd8deadSopenharmony_ci or downloads of host images which are not already in a ICC 975bd8deadSopenharmony_ci format. This ability can be added by a subsequent extension. 985bd8deadSopenharmony_ci For now, the compression should go in a GLU extension. 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ciNew Procedures and Functions 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci None 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ciNew Tokens 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Accepted by the <internalformat> parameter of TexImage2D, 1075bd8deadSopenharmony_ci TexImage3DEXT, and TexImage4DSGIS: 1085bd8deadSopenharmony_ci 1095bd8deadSopenharmony_ci RGB_ICC_SGIX 0x8460 1105bd8deadSopenharmony_ci RGBA_ICC_SGIX 0x8461 1115bd8deadSopenharmony_ci ALPHA_ICC_SGIX 0x8462 1125bd8deadSopenharmony_ci LUMINANCE_ICC_SGIX 0x8463 1135bd8deadSopenharmony_ci INTENSITY_ICC_SGIX 0x8464 1145bd8deadSopenharmony_ci LUMINANCE_ALPHA_ICC_SGIX 0x8465 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci Accepted by the <internalformat> and <format> parameters of 1175bd8deadSopenharmony_ci TexImage2D, TexImage3DEXT, and TexImage4DSGIS: 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci R5_G6_B5_ICC_SGIX 0x8466 1205bd8deadSopenharmony_ci R5_G6_B5_A8_ICC_SGIX 0x8467 1215bd8deadSopenharmony_ci ALPHA16_ICC_SGIX 0x8468 1225bd8deadSopenharmony_ci LUMINANCE16_ICC_SGIX 0x8469 1235bd8deadSopenharmony_ci INTENSITY16_ICC_SGIX 0x846A 1245bd8deadSopenharmony_ci LUMINANCE16_ALPHA8_ICC_SGIX 0x846B 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation) 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci None 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization) 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci The following is added to the end if the last paragraph in the 1335bd8deadSopenharmony_ci introduction: "Six ICC formats are described in this section: 1345bd8deadSopenharmony_ci R5_G6_B5_ICC_SGIX, R5_G6_B5_A8_ICC_SGIX, ALPHA16_ICC_SGIX, 1355bd8deadSopenharmony_ci LUMINANCE16_ICC_SGIX, INTENSITY16_ICC_SGIX, and 1365bd8deadSopenharmony_ci LUMINANCE16_ALPHA8_ICC_SGIX. The ICC formats are used only as 1375bd8deadSopenharmony_ci arguments to texture download commands and not as arguments to 1385bd8deadSopenharmony_ci other commands which take pixel data from client memory. If the 1395bd8deadSopenharmony_ci format argument to a command other than a texture download command 1405bd8deadSopenharmony_ci is an enumerant for a ICC format, the error INVALID_ENUM is 1415bd8deadSopenharmony_ci generated. Other restrictions on the use of ICC formats are 1425bd8deadSopenharmony_ci described below and in Section 3.8" 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci The following is added to section 3.6.3 at the end of the 1455bd8deadSopenharmony_ci subsection entitled "Unpacking": 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci If the data in host memory is in one of the ICC formats, the data 1485bd8deadSopenharmony_ci is treated as being a sequence of blocks each of which represents 1495bd8deadSopenharmony_ci a 4x4 pixel subimage. The blocks are stored in a row-major order, 1505bd8deadSopenharmony_ci analogous to the host memory storage of pixels. The length of 1515bd8deadSopenharmony_ci each block in words and how it is decoded depends on the specific 1525bd8deadSopenharmony_ci ICC format. This information is given in the subsection 1535bd8deadSopenharmony_ci "Decompression from ICC." For each format, the block length is a 1545bd8deadSopenharmony_ci non-zero integer number of words. The type argument to the 1555bd8deadSopenharmony_ci function must be set to GL_UNSIGNED_SHORT or the error 1565bd8deadSopenharmony_ci INVALID_ENUM will be generated. 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci A ICC-compressed image in host memory must be made of complete 4x4 1595bd8deadSopenharmony_ci blocks. The width and height arguments give the uncompressed size 1605bd8deadSopenharmony_ci and both must be multiples of four. The number of pixels in a row 1615bd8deadSopenharmony_ci of the host image is determined in the same manner as for 1625bd8deadSopenharmony_ci uncompressed host images. If this value is not a multiple of 1635bd8deadSopenharmony_ci four, it is rounded up to the next multiple of four. The 1645bd8deadSopenharmony_ci resulting value is referred to as l. If p indicates the location 1655bd8deadSopenharmony_ci in memory of the first byte of the first block of the first row, 1665bd8deadSopenharmony_ci then the first byte of the first block of the Nth row is indicated 1675bd8deadSopenharmony_ci by 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci p + (N/4)k 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ci where N is the row number (counting from zero). N must be a 1725bd8deadSopenharmony_ci multiple of four; rows which are not four-aligned may not be 1735bd8deadSopenharmony_ci individually accessed. k is defined as: 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci k = ceil(sl / a) * a 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci where s is the size of a block for the given format in GL ubytes 1785bd8deadSopenharmony_ci and a is the value of UNPACK_ALIGNMENT. 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci The height h of the host image is assumed to be: 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci h = ceil((height + s) / 4) * 4 1835bd8deadSopenharmony_ci 1845bd8deadSopenharmony_ci where s is the value of SKIP_ROWS and height is the value of the 1855bd8deadSopenharmony_ci height argument to the pixel function. In other words, the sum of 1865bd8deadSopenharmony_ci the value of SKIP_ROWS and the height argument to the function is 1875bd8deadSopenharmony_ci rounded up to the next multiple of four to give the height of the 1885bd8deadSopenharmony_ci host image. 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci Subrectangles of ICC images may be extracted in a manner similar 1915bd8deadSopenharmony_ci to uncompressed images as determined by the parameters 1925bd8deadSopenharmony_ci UNPACK_ROW_LENGTH, UNPACK_SKIP_ROWS, and UNPACK_SKIP_PIXELS. For 1935bd8deadSopenharmony_ci compressed images, the lower left corner of the subrectangle must 1945bd8deadSopenharmony_ci be aligned to four-pixel boundaries in both x and y. The values 1955bd8deadSopenharmony_ci of UNPACK_SKIP_ROWS and UNPACK_SKIP_PIXELS must be multiples of 1965bd8deadSopenharmony_ci four (positive, negative, or zero) or the error INVALID_OPERATION 1975bd8deadSopenharmony_ci is generated. Before obtaining the first group from memory, the 1985bd8deadSopenharmony_ci pointer p is effectively advanced by (UNPACK_SKIP_PIXELS / 4)s + 1995bd8deadSopenharmony_ci (UNPACK_SKIP_ROWS/4)k bytes. ceil(width / 4) blocks are 2005bd8deadSopenharmony_ci obtained from contiguous memory (without advancing the pointer), 2015bd8deadSopenharmony_ci after which the pointer is advanced by k bytes. ceil(height/4) 2025bd8deadSopenharmony_ci sets of ceil(width/4) blocks are obtained this way. 2035bd8deadSopenharmony_ci 2045bd8deadSopenharmony_ci The following is added to the end of table 3.5: 2055bd8deadSopenharmony_ci 2065bd8deadSopenharmony_ci Element Meaning Target 2075bd8deadSopenharmony_ci Name and Order Buffer 2085bd8deadSopenharmony_ci ---- --------------- -------- 2095bd8deadSopenharmony_ci RGB_ICC_SGIX R, G, B Components Color 2105bd8deadSopenharmony_ci RGBA_ICC_SGIX R, G, B, A Components Color 2115bd8deadSopenharmony_ci LUMINANCE_ICC_SGIX Luminance Component Color 2125bd8deadSopenharmony_ci LUMINANCE_ALPHA_ICC_SGIX Luminance, A Components Color 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ci The following subsection is added to section 3.6.3 just prior to 2155bd8deadSopenharmony_ci the subsection entitled "Conversion to floating-point": 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci Decompression from ICC 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci After being extracted from host memory, a ICC-compressed image is 2205bd8deadSopenharmony_ci converted into a floating-point color image. Each 4x4 block is 2215bd8deadSopenharmony_ci decompressed independently using mechanisms described below. We 2225bd8deadSopenharmony_ci start by describing mechanisms we will describe mechanisms common 2235bd8deadSopenharmony_ci to all ICC formats and then describe the organization of the data 2245bd8deadSopenharmony_ci within a block for each format. In this section, we assume that 2255bd8deadSopenharmony_ci byte swapping (if SWAP_BYTES is TRUE) has already taken place. 2265bd8deadSopenharmony_ci 2275bd8deadSopenharmony_ci Each ICC format contains one or two fields containing 2-bit 2285bd8deadSopenharmony_ci indices for the each of the 16 pixels in the block. Within the 2295bd8deadSopenharmony_ci field, the indices are stored in bottom-to-top, left-to-right 2305bd8deadSopenharmony_ci order regardless of user-specified pixel storage modes. The index 2315bd8deadSopenharmony_ci of the bottom left pixel is stored in the two high-order bits of 2325bd8deadSopenharmony_ci the first byte of the field. The index of the top right pixel is 2335bd8deadSopenharmony_ci stored in the low-order bits of the last byte. 2345bd8deadSopenharmony_ci 2355bd8deadSopenharmony_ci For ICC formats which contain RGB data (R5_G6_B5_ICC_SGIX and 2365bd8deadSopenharmony_ci R5_G6_B5_A8_ICC_SGIX), two field contain RGB color values. The 2375bd8deadSopenharmony_ci fields are each 16 bits wide with the top 5 bits specifying the 2385bd8deadSopenharmony_ci red value, the middle 6 bits specifying the green value, and the 2395bd8deadSopenharmony_ci lower 5 bits specifying the blue value. For ICC formats which 2405bd8deadSopenharmony_ci contain luminance data (LUMINANCE16_ICC_SGIX and 2415bd8deadSopenharmony_ci LUMINANCE16_ALPHA8_ICC_SGIX), two 16-bit wide fields contain 2425bd8deadSopenharmony_ci luminance values. For ICC formats which contain alpha data 2435bd8deadSopenharmony_ci (R5_G6_B5_A8_ICC_SGIX and LUMINANCE16_ALPHA8_ICC_SGIX), two 8-bit 2445bd8deadSopenharmony_ci wide fields contain alpha values. For each channel, the bits are 2455bd8deadSopenharmony_ci interpreted as unsigned fixed-point values between 0 and 1 and are 2465bd8deadSopenharmony_ci converted to floating point using the formula: 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci f = c / ((2**N) - 1) 2495bd8deadSopenharmony_ci 2505bd8deadSopenharmony_ci where f is the floating-point representation of the value, c is 2515bd8deadSopenharmony_ci the value of the bitfield (interpreted as an unsigned integer), N 2525bd8deadSopenharmony_ci is the number of bits in the fixed-point color value, and the 2535bd8deadSopenharmony_ci division is performed in floating-point. 2545bd8deadSopenharmony_ci 2555bd8deadSopenharmony_ci Once the color fields have been extracted and converted into 2565bd8deadSopenharmony_ci floating point RGB, L, or A values, intermediate values are 2575bd8deadSopenharmony_ci constructed from them. For each pair of fields c0 and c1, four 2585bd8deadSopenharmony_ci values are created: 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci v0 = c0 2615bd8deadSopenharmony_ci v1 = (2 * c0 + c1) / 3 2625bd8deadSopenharmony_ci v2 = (c0 + 2 * c1) / 3 2635bd8deadSopenharmony_ci v3 = c1 2645bd8deadSopenharmony_ci 2655bd8deadSopenharmony_ci Operations are performed with unspecified precision. For fields 2665bd8deadSopenharmony_ci which encode RGB data, the computations are performed independently 2675bd8deadSopenharmony_ci on a per-channel basis to give the vectors RGB0, RGB1, RGB2, and 2685bd8deadSopenharmony_ci RGB3. For fields which encode alpha data, the computations give 2695bd8deadSopenharmony_ci the values A0, A1, A2, and A3. For fields which encode luminance 2705bd8deadSopenharmony_ci data, the computations give L0, L1, L2, and L3. 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci After the intermediate values are created, indices for each pixel 2735bd8deadSopenharmony_ci are used to choose the output value for the pixel. The indices 2745bd8deadSopenharmony_ci are each two bits. R5_G6_B5_ICC_SGIX values contain one index per 2755bd8deadSopenharmony_ci pixel to choose the intermediate value RGB0, RGB1, RGB2, or RGB3. 2765bd8deadSopenharmony_ci R5_G6_B5_A8_ICC_SGIX values contain two indices per pixel: one to 2775bd8deadSopenharmony_ci choose the RGB value and one to choose the alpha value. 2785bd8deadSopenharmony_ci Similarly, LUMINANCE16_A8_ICC_SGIX values contain an index per 2795bd8deadSopenharmony_ci pixel to choose the luminance value and an index per pixel to 2805bd8deadSopenharmony_ci choose the alpha value. LUMINANCE16_ICC_SGIX values contain an 2815bd8deadSopenharmony_ci index per pixel to choose the luminance value. In each case, an 2825bd8deadSopenharmony_ci index value of 0 results in the channel (or channels) being set to 2835bd8deadSopenharmony_ci the 0th intermediate value (RGB0, A0, or L0). A value of 1 gives 2845bd8deadSopenharmony_ci the 1st intermediate value and so on. 2855bd8deadSopenharmony_ci 2865bd8deadSopenharmony_ci The bit encodings for the formats are described below. Each 2875bd8deadSopenharmony_ci description assumes that the first byte is in the lowest memory 2885bd8deadSopenharmony_ci location and the last byte is in the highest memory location. The 2895bd8deadSopenharmony_ci high-order bit of each byte is assumed to be the "first." 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci An R5_G6_B5_ICC_SGIX encoded block consists of 64 bits divided 2925bd8deadSopenharmony_ci into 3 fields. The first is a 32 bit field containing the two-bit 2935bd8deadSopenharmony_ci indices for the RGB channels. The second and third fields are 16 2945bd8deadSopenharmony_ci bit R5G6B5 values containing c0 and c1 for the RGB channels. 2955bd8deadSopenharmony_ci 2965bd8deadSopenharmony_ci R5_G6_B5_A8_ICC_SGIX blocks encode RGB and alpha independently. 2975bd8deadSopenharmony_ci An R5_G6_B5_A8_ICC_SGIX encoded block consists of 128 bits divided 2985bd8deadSopenharmony_ci into 7 fields. The first 64 bits of the block contain the two-bit 2995bd8deadSopenharmony_ci RGB indices followed by the two 16-bit R5G6B5 values for c0 and c1 3005bd8deadSopenharmony_ci (this encoding is equivalent to the 64-bit R5_G6_B5_ICC_SGIX block 3015bd8deadSopenharmony_ci described above). The fourth field is 32 bits wide and contains 3025bd8deadSopenharmony_ci indices for the alpha values. The fifth and sixth fields are 8 3035bd8deadSopenharmony_ci bit alpha representing c0 and c1. The seventh field is 16 bits 3045bd8deadSopenharmony_ci wide and is unused. It is necessary to pad out the block so that 3055bd8deadSopenharmony_ci the 16-bit color boundaries will always fall on half-word 3065bd8deadSopenharmony_ci boundaries in host memory. 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci An ALPHA16_ICC_SGIX, LUMINANCE16_ICC_SGIX, or INTENSITY16_ICC_SGIX 3095bd8deadSopenharmony_ci encoded block consists of 64 bits divided into 3 fields. The 3105bd8deadSopenharmony_ci first is a 32 bit field containing the two-bit indices for the 3115bd8deadSopenharmony_ci alpha, luminance, or intensity values. The second and third 3125bd8deadSopenharmony_ci fields are 16 bit unsigned fixed-point alpha, luminance, or 3135bd8deadSopenharmony_ci intensity values containing c0 and c1 respectively. This encoding 3145bd8deadSopenharmony_ci is identical to the encoding of R5_G6_B5_ICC_SGIX blocks except 3155bd8deadSopenharmony_ci that the c0 and c1 fields represent alpha, luminance, or intensity 3165bd8deadSopenharmony_ci instead of RGB. 3175bd8deadSopenharmony_ci 3185bd8deadSopenharmony_ci A LUMINANCE16_ALPHA8_ICC_SGIX encoded block is identical to a 3195bd8deadSopenharmony_ci R5_G6_B5_A8_ICC_SGIX block except that sixteen-bit unsigned 3205bd8deadSopenharmony_ci luminance values are stored in place of the sixteen-bit RGB 3215bd8deadSopenharmony_ci values. 3225bd8deadSopenharmony_ci 3235bd8deadSopenharmony_ci After decompression, the image is recombined into a ceil(width / 3245bd8deadSopenharmony_ci 4) * 4 by ceil(height / 4) * 4 image of RGB, RGBA, A, L, I, or LA 3255bd8deadSopenharmony_ci pixels. Pixels whose y positions in the image (where the bottom 3265bd8deadSopenharmony_ci row is 0 and the top row is (ceil(height / 4) * 4) - 1) are 3275bd8deadSopenharmony_ci greater than (height - 1) are discarded. Likewise, pixels whose x 3285bd8deadSopenharmony_ci positions are greater than (width - 1) are discarded. 3295bd8deadSopenharmony_ci 3305bd8deadSopenharmony_ci The following is added to Section 3.8: 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci In the paragraph beginning "The image itself (pointed to by data)" 3335bd8deadSopenharmony_ci the sentence beginning "Each color component is converted" is 3345bd8deadSopenharmony_ci prefixed by "If the internal format of the texture is not one of 3355bd8deadSopenharmony_ci RGB_ICC_SGIX, RGBA_ICC_SGIX, LUMINANCE_ICC_SGIX, 3365bd8deadSopenharmony_ci LUMINANCE_ALPHA_ICC_SGIX, R5_G6_B5_ICC_SGIX, R5_G6_B5_A8_ICC_SGIX, 3375bd8deadSopenharmony_ci LUMINANCE16_ICC_SGIX, or LUMINANCE16_ALPHA8_ICC_SGIX." The 3385bd8deadSopenharmony_ci following is added to the end of the paragraph: "If the internal 3395bd8deadSopenharmony_ci format is one of the ICC formats, the format parameter of the 3405bd8deadSopenharmony_ci function must either be equal to the internal format parameter (if 3415bd8deadSopenharmony_ci the internal format parameter is sized) or contain the same 3425bd8deadSopenharmony_ci channels as the internal format (if the internal format is 3435bd8deadSopenharmony_ci unsized) or the error INVALID_ENUM will be generated. Also, a ICC 3445bd8deadSopenharmony_ci internal format may not be specified for a one-dimensional 3455bd8deadSopenharmony_ci texture. If the format parameter to TexImage1D is set to one of 3465bd8deadSopenharmony_ci the ICC internal formats, the error INVALID_ENUM is generated." 3475bd8deadSopenharmony_ci 3485bd8deadSopenharmony_ci The sentence in the paragraph describing CopyTexImage2D which 3495bd8deadSopenharmony_ci reads: "Parameters level, internalformat, and border are specified 3505bd8deadSopenharmony_ci using the same values, with the same meanings, as the equivalent 3515bd8deadSopenharmony_ci arguments of TexImage2D, except that internalformat may not be 3525bd8deadSopenharmony_ci specified as 1, 2, 3, or 4." is changed to read: "Parameters 3535bd8deadSopenharmony_ci level, internalformat, and border are specified using the same 3545bd8deadSopenharmony_ci values, with the same meanings, as the equivalent arguments of 3555bd8deadSopenharmony_ci TexImage2D, except that internalformat may not be specified as 1, 3565bd8deadSopenharmony_ci 2, 3, 4, or any of the ICC internal formats." 3575bd8deadSopenharmony_ci 3585bd8deadSopenharmony_ci The following is added to the end of the paragraph which describes 3595bd8deadSopenharmony_ci the subtexture download and copy commands: "CopyTexSubImage1D and 3605bd8deadSopenharmony_ci CopyTexSubImage2D may not be used with a target texture whose 3615bd8deadSopenharmony_ci internal format is one of the ICC formats or the error 3625bd8deadSopenharmony_ci INVALID_OPERATION is generated. For TexSubImage1D and 3635bd8deadSopenharmony_ci TexSubImage2D, the target texture have a ICC internal format but 3645bd8deadSopenharmony_ci requirements in addition to those mentioned above are enforced. 3655bd8deadSopenharmony_ci The xoffset and yoffset parameters must be multiples of four or 3665bd8deadSopenharmony_ci the error INVALID_OPERATION is generated. Also, the width 3675bd8deadSopenharmony_ci parameter must either be a multiple of four which is less than the 3685bd8deadSopenharmony_ci width of the texture minus xoffset or be equal to the width of the 3695bd8deadSopenharmony_ci texture minus xoffset or the error INVALID_VALUE is generated. 3705bd8deadSopenharmony_ci The height parameter must either a multiple of four which is less 3715bd8deadSopenharmony_ci than the height of the texture minus yoffset or be equal to the 3725bd8deadSopenharmony_ci height of the texture minus yoffset or the error INVALID_VALUE is 3735bd8deadSopenharmony_ci generated. In other words, the subimage may not partially cover a 3745bd8deadSopenharmony_ci 4x4 region of the target texture. Additionally, for 3755bd8deadSopenharmony_ci TexSubImage2D, TexSubImage3DEXT, and TexSubImage4DSGIS calls, the 3765bd8deadSopenharmony_ci format parameter must have the same channels as the base internal 3775bd8deadSopenharmony_ci format of the texture or the error INVALID_ENUM will be 3785bd8deadSopenharmony_ci generated." 3795bd8deadSopenharmony_ci 3805bd8deadSopenharmony_ci The following is added to Table 3.8: 3815bd8deadSopenharmony_ci 3825bd8deadSopenharmony_ci Sized Base R G B A L I 3835bd8deadSopenharmony_ci Internal Format Internal Format Bits Bits Bits Bits Bits Bits 3845bd8deadSopenharmony_ci --------------- --------------- ---- ---- ---- ---- ---- ---- 3855bd8deadSopenharmony_ci R5_G6_B5_ICC_SGIX RGB 5 6 5 3865bd8deadSopenharmony_ci R5_G6_B5_A8_ICC_SGIX RGBA 5 6 5 8 3875bd8deadSopenharmony_ci LUMINANCE16_ICC_SGIX LUMINANCE 16 3885bd8deadSopenharmony_ci LUMINANCE16_ALPHA8_ICC_SGIX LUMINANCE_ALPHA 8 16 3895bd8deadSopenharmony_ci 3905bd8deadSopenharmony_ci The caption for Table 3.8 is updated as follows: 3915bd8deadSopenharmony_ci 3925bd8deadSopenharmony_ci Correspondence of sized internal formats to base internal formats 3935bd8deadSopenharmony_ci and desired component resolutions for each sized internal format. 3945bd8deadSopenharmony_ci For ICC compressed formats, the component resolutions do not 3955bd8deadSopenharmony_ci directly reflect the stored size of each pixel, but rather the 3965bd8deadSopenharmony_ci resolution of the two color values stored for each 4x4 pixel 3975bd8deadSopenharmony_ci block. 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations 4015bd8deadSopenharmony_ciand the Frame Buffer) 4025bd8deadSopenharmony_ci 4035bd8deadSopenharmony_ci The following is added to the first paragraph of section 4.3.2 4045bd8deadSopenharmony_ci after the sentence beginning "The arguments after x and y: "As in 4055bd8deadSopenharmony_ci the case of TexImage, ICC formats may only be used for reading 4065bd8deadSopenharmony_ci back ICC textures or the error INVALID_ENUM is generated. For 4075bd8deadSopenharmony_ci more information, see Chapter 6 (State and State Requests). 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ciAdditionally, the host ICC format must have the same 4105bd8deadSopenharmony_ci channels as the base internal format of the source ICC texture of 4115bd8deadSopenharmony_ci the error INVALID_ENUM is generated. During TexSubImage readbacks of ICC 4125bd8deadSopenharmony_ci textures, the " 4135bd8deadSopenharmony_ci 4145bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions) 4155bd8deadSopenharmony_ci 4165bd8deadSopenharmony_ci None 4175bd8deadSopenharmony_ci 4185bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests) 4195bd8deadSopenharmony_ci 4205bd8deadSopenharmony_ci Added to the end of the paragraph in the introduction which talks 4215bd8deadSopenharmony_ci about the GetTexImage command: "Additional restrictions apply if 4225bd8deadSopenharmony_ci the format is one of the ICC formats. The internal format of the 4235bd8deadSopenharmony_ci texture must have a base internal format equal to the format 4245bd8deadSopenharmony_ci parameter or the error INVALID_ENUM is generated. Similarly to 4255bd8deadSopenharmony_ci the download case, the width and height of the data read back is 4265bd8deadSopenharmony_ci rounded up to the next multiples of 4 such that only complete 4275bd8deadSopenharmony_ci compressed tiles are returned." 4285bd8deadSopenharmony_ci 4295bd8deadSopenharmony_ciAdditions to the GLX Specification 4305bd8deadSopenharmony_ci 4315bd8deadSopenharmony_ci None 4325bd8deadSopenharmony_ci 4335bd8deadSopenharmony_ciDependencies on EXT_texture3D 4345bd8deadSopenharmony_ci 4355bd8deadSopenharmony_ci If EXT_texture3D is not supported, all references to 4365bd8deadSopenharmony_ci TexImage3DEXT, TexSubImage3DEXT, CopyTexImage3DEXT, and 4375bd8deadSopenharmony_ci CopyTexSubImage3DEXT are ignored. 4385bd8deadSopenharmony_ci 4395bd8deadSopenharmony_ciDependencies on SGIS_texture4D 4405bd8deadSopenharmony_ci 4415bd8deadSopenharmony_ci If SGIS_texture4D is not supported, all references to 4425bd8deadSopenharmony_ci TexImage4DSGIS, TexSubImage4DSGIS, CopyTexImage4DSGIS, and 4435bd8deadSopenharmony_ci CopyTexSubImage4DSGIS are ignored. 4445bd8deadSopenharmony_ci 4455bd8deadSopenharmony_ciErrors 4465bd8deadSopenharmony_ci 4475bd8deadSopenharmony_ci XXX 4485bd8deadSopenharmony_ci 4495bd8deadSopenharmony_ciNew State 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ci None 4525bd8deadSopenharmony_ci 4535bd8deadSopenharmony_ciNew Implementation Dependent State 4545bd8deadSopenharmony_ci 4555bd8deadSopenharmony_ci None 456