Path: blob/main_old/extensions/ANGLE_lossy_etc_decode.txt
1693 views
Name12ANGLE_lossy_etc_decode34Name Strings56GL_ANGLE_lossy_etc_decode78Contributors910Minmin Gong (mgong 'at' microsoft.com)1112Contacts1314Minmin Gong (mgong 'at' microsoft.com)1516Status1718Draft1920Version2122Last Modified Date: Nov 25, 201523Author Revision: 12425Number2627TBD2829Dependencies3031Requires OpenGL ES 3.0 for ETC2 and EAC formats, or OpenGL ES 2.0 and32OES_compressed_ETC1_RGB8_texture for ETC1 format.33The extension is written against the OpenGL ES 2.0 specification.3435Overview3637Both the OpenGL ES 3.0 specification and OES_compressed_ETC1_RGB8_texture38specify that Ericsson Texture Compression (ETC) decoding must not be lossy.39The goal of this extension is to allow a lossy decode of40compressed textures in the ETC formats in OpenGL ES, for lower memory41and bandwidth consumption.4243This extension uses the same ETC compression format as OpenGL ES 3.044and OES_compressed_ETC1_RGB8_texture, with the restriction that the texture45dimensions must be a multiple of four (except for mip levels where the46dimensions are either 2 or 1). And the requirement that ETC decoding must47not be lossy is relaxed.4849See OES_compressed_ETC1_RGB8_texture for a description of the ETC1 format.50Also see OpenGL ES 3.0 specification appendix C.2 (ETC Compressed Texture51ImageFormats) for a description of ETC2 and EAC formats.5253IP Status5455See Ericsson's "IP Statement"5657New Procedures and Functions5859None.6061New Types6263None.6465New Tokens6667Accepted by the <internalformat> parameter of CompressedTexImage2D68and the <format> parameter of CompressedTexSubImage2D:6970ETC1_RGB8_LOSSY_DECODE_ANGLE 0x969071COMPRESSED_R11_LOSSY_DECODE_EAC_ANGLE 0x969172COMPRESSED_SIGNED_R11_LOSSY_DECODE_EAC_ANGLE 0x969273COMPRESSED_RG11_LOSSY_DECODE_EAC_ANGLE 0x969374COMPRESSED_SIGNED_RG11_LOSSY_DECODE_EAC_ANGLE 0x969475COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE 0x969576COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE 0x969677COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x969778COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE 0x969879COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x969980COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE 0x969A8182Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)8384Add the following to Section 3.7.3 (Compressed Texture Images)85(at the end of the description of the CompressedTexImage2D command):8687Compressed Internal Format Base Internal Format88========================== ====================89ETC1_RGB8_LOSSY_DECODE_ANGLE RGB90COMPRESSED_R11_LOSSY_DECODE_EAC_ANGLE R91COMPRESSED_SIGNED_R11_LOSSY_DECODE_EAC_ANGLE R92COMPRESSED_RG11_LOSSY_DECODE_EAC_ANGLE RG93COMPRESSED_SIGNED_RG11_LOSSY_DECODE_EAC_ANGLE RG94COMPRESSED_RGB8_LOSSY_DECODE_ETC2_ANGLE RGB95COMPRESSED_SRGB8_LOSSY_DECODE_ETC2_ANGLE RGB96COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE RGBA97COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_LOSSY_DECODE_ETC2_ANGLE RGBA98COMPRESSED_RGBA8_LOSSY_DECODE_ETC2_EAC_ANGLE RGBA99COMPRESSED_SRGB8_ALPHA8_LOSSY_DECODE_ETC2_EAC_ANGLE RGBA100101Table 3.x: Specific Compressed Internal Formats102103If <internalformat> is one of the ETC lossy decode formats listed in104Table 3.x, the compressed texture is stored in an unspecified compressed105texture format, that may introduce losses of precision in the texture data.106The GL and the ETC texture compression algorithm support only 2D images107without borders.108109CompressedTexImage2D will produce the INVALID_OPERATION error when110<internalformat> is one of the lossy decode ETC-format values from111Table 3.x under the following conditions:112113* <border> is non-zero.114* <width> is not one, two, nor a multiple of four.115* <height> is not one, two, nor a multiple of four.116117Add the following to Section 3.7.3 (Compressed Texture Images)118(at the end of the description of the CompressedTexSubImage2D command):119120If the internal format of the texture image being modified is an ETC-format121listed in Table 3.x, the compressed texture is stored in an unspecified122compressed texture format. The xoffset and yoffset must also be aligned to1234x4 texel block boundaries, since ETC encoding makes it difficult to modify124non-aligned regions. CompressedTexSubImage2D will result in an125INVALID_OPERATION error only if one of the following conditions occurs:126127* <width> is not a multiple of four nor equal to TEXTURE_WIDTH.128* <height> is not a multiple of four nor equal to TEXTURE_HEIGHT.129* <xoffset> or <yoffset> is not a multiple of four.130* <format> does not match the internal format of the texture image131being modified.132133Errors134135INVALID_OPERATION is generated by CompressedTexImage2D if136lossy decode ETC-format is used and <internalformat> is one of the137compressed internal formats from Table 3.x and any of the following apply:138- <border> is not equal to zero.139- <width> is not one, two, nor a multiple of four.140- <height> is not one, two, nor a multiple of four.141142INVALID_OPERATION is generated by CompressedTexSubImage2D if143lossy decode ETC-format is used and <format> is one of the compressed144interal formats from Table 3.x and any of the following apply:145- <width> is not a multiple of four nor equal to TEXTURE_WIDTH;146- <height> is not a multiple of four nor equal to TEXTURE_HEIGHT;147- <xoffset> or <yoffset> is not a multiple of four;148- <format> does not match the internal format of the texture image149being modified.150151New State152153None.154155Revision History156157Revision 1, 2015/11/25 - mgong158- Initial revision159160161