gfx/angle/extensions/ANGLE_texture_compression_dxt.txt

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 Name
michael@0 2
michael@0 3 ANGLE_texture_compression_dxt
michael@0 4
michael@0 5 Name Strings
michael@0 6
michael@0 7 GL_ANGLE_texture_compression_dxt1
michael@0 8 GL_ANGLE_texture_compression_dxt3
michael@0 9 GL_ANGLE_texture_compression_dxt5
michael@0 10
michael@0 11 Contributors
michael@0 12
michael@0 13 Gregg Tavares, Google Inc.
michael@0 14 Daniel Koch, TransGaming Inc.
michael@0 15 Al Patrick, Google Inc.
michael@0 16
michael@0 17 Contacts
michael@0 18
michael@0 19 Gregg Tavares, Google Inc. (gman 'at' google 'dot' com)
michael@0 20
michael@0 21 Status
michael@0 22
michael@0 23 Implemented in ANGLE ES2
michael@0 24
michael@0 25 Version
michael@0 26
michael@0 27 Last Modified Date: Sept 22, 2012
michael@0 28 Author Revision: 2
michael@0 29
michael@0 30 Number
michael@0 31
michael@0 32 OpenGL ES Extension #111
michael@0 33
michael@0 34 Dependencies
michael@0 35
michael@0 36 Requires OpenGL ES 1.0.
michael@0 37
michael@0 38 The extension is written against the OpenGL ES 2.0 specification.
michael@0 39
michael@0 40 Overview
michael@0 41
michael@0 42 These extensions are exactly the same as EXT_texture_compression_dxt1
michael@0 43 except they additionally expose the COMPRESSED_RGBA_S3TC_DXT3_ANGLE and
michael@0 44 COMPRESSED_RGBA_S3TC_DXT5_ANGLE formats and have a size restrictions
michael@0 45 such that the size must be a multiple of four (except for mip levels
michael@0 46 where the dimensions are either 2 or 1).
michael@0 47
michael@0 48 See EXT_texture_compression_dxt1 for the full list of changes. Also
michael@0 49 see EXT_texture_compression_s3tc for a description of the formats.
michael@0 50
michael@0 51 IP Status
michael@0 52
michael@0 53 A license to the S3TC Intellectual Property may be necessary for
michael@0 54 implementation of this extension. You should consult with your
michael@0 55 Attorney to determine the need for a license.
michael@0 56
michael@0 57 New Procedures and Functions
michael@0 58
michael@0 59 None.
michael@0 60
michael@0 61 New Types
michael@0 62
michael@0 63 None.
michael@0 64
michael@0 65 New Tokens
michael@0 66
michael@0 67 Accepted by the <internalformat> parameter of CompressedTexImage2D
michael@0 68 and the <format> parameter of CompressedTexSubImage2D:
michael@0 69
michael@0 70 COMPRESSED_RGB_S3TC_DXT1_ANGLE 0x83F0
michael@0 71 COMPRESSED_RGBA_S3TC_DXT1_ANGLE 0x83F1
michael@0 72 COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
michael@0 73 COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
michael@0 74
michael@0 75 Additions to Chapter 3 of the OpenGL ES 2.0 Specification (Rasterization)
michael@0 76
michael@0 77 Add the following to Section 3.7.3 (Compressed Texture Images)
michael@0 78 (at the end of the description of the CompressedTexImage2D command):
michael@0 79
michael@0 80 Compressed Internal Format Base Internal Format
michael@0 81 ========================== ====================
michael@0 82 COMPRESSED_RGB_S3TC_DXT1_ANGLE RGB
michael@0 83 COMPRESSED_RGBA_S3TC_DXT1_ANGLE RGBA
michael@0 84 COMPRESSED_RGBA_S3TC_DXT3_ANGLE RGBA
michael@0 85 COMPRESSED_RGBA_S3TC_DXT5_ANGLE RGBA
michael@0 86
michael@0 87 Table 3.x: Specific Compressed Internal Formats
michael@0 88
michael@0 89 If <internalformat> is one of the S3TC formats listed in Table 3.x,
michael@0 90 the compressed texture is stored in the appropriate S3TC compressed
michael@0 91 texture format (see Appendix). The GL and the S3TC texture compression
michael@0 92 algorithm support only 2D images without borders.
michael@0 93
michael@0 94 CompressedTexImage2D will produce the INVALID_OPERATION error when
michael@0 95 <internalformat> is one of the values from Table 3.x under the following
michael@0 96 conditions:
michael@0 97
michael@0 98 * <border> is non-zero.
michael@0 99 * <width> is not one, two, or a multiple of four.
michael@0 100 * <height> is not one, two, or a multiple of four.
michael@0 101
michael@0 102 Add the following to Section 3.7.3 (Compressed Texture Images)
michael@0 103 (at the end of the description of the CompressedTexSubImage2D command):
michael@0 104
michael@0 105 If the internal format of the texture image being modified is listed
michael@0 106 in Table 3.x, the texture is stored in the appropriate S3TC compressed
michael@0 107 texture format (see Appendix). Since DXT/S3TC images are easily edited
michael@0 108 along 4x4 texel boundaries, the limitations of CompressedTexSubImage2D
michael@0 109 are relaxed. CompressedTexSubImage2D will result in an INVALID_OPERATION
michael@0 110 error only if one of the following conditions occurs:
michael@0 111
michael@0 112 * <width> is not a multiple of four or equal to TEXTURE_WIDTH.
michael@0 113 * <height> is not a multipls of four or equal to TEXTURE_HEIGHT.
michael@0 114 * <xoffset> or <yoffset> is not a multiple of four.
michael@0 115 * <format> does not match the internal format of the texture image
michael@0 116 being modified.
michael@0 117
michael@0 118 The following restrictions at the end of section 3.7.3 do not apply
michael@0 119 to S3TC DXT texture formats, since subimage modification is straightforward
michael@0 120 as long as the subimage is properly aligned.
michael@0 121
michael@0 122 Errors
michael@0 123
michael@0 124 INVALID_OPERATION is generated by CompressedTexImage2D if <internalformat>
michael@0 125 is one of the compressed internal formats from Table 3.x and any of the
michael@0 126 following apply:
michael@0 127 - <border> is not equal to zero.
michael@0 128 - <width> is not one, two, or a multiple of four.
michael@0 129 - <height> is not one, two, or a multiple of four.
michael@0 130
michael@0 131 INVALID_OPERATION is generated by TexImage2D and CopyTexImage2D if
michael@0 132 <internalformat> is one of the compressed internal formats from
michael@0 133 Table 3.x.
michael@0 134
michael@0 135 INVALID_OPERATION is generated by TexSubImage2D and CopyTexSubImage2D
michael@0 136 if the internal format of the texture currently bound to <target> is
michael@0 137 one of the compressed internal formats from Table 3.x.
michael@0 138
michael@0 139 INVALID_OPERATION is generated by CompressedTexSubImage2D if <format>
michael@0 140 is one of the compressed interal formats from Table 3.x and any of the
michael@0 141 following apply:
michael@0 142 - <width> is not a multiple of four or equal to TEXTURE_WIDTH;
michael@0 143 - <height> is not a multiple of four or equal to TEXTURE_HEIGHT;
michael@0 144 - <xoffset> or <yoffset> is not a multiple of four;
michael@0 145 - <format> does not match the internal format of the texture image
michael@0 146 being modified.
michael@0 147
michael@0 148 New State
michael@0 149
michael@0 150 None.
michael@0 151
michael@0 152 Appendix:
michael@0 153
michael@0 154 The format for the S3TC Compressed Texture Images Formats is documented
michael@0 155 in the appendix of EXT_texture_compression_s3tc.
michael@0 156
michael@0 157 Revision History
michael@0 158
michael@0 159 Revision 1, 2010/08/06 - gman
michael@0 160 - Initial revision
michael@0 161 Revision 2, 2012/09/22 - dgkoch
michael@0 162 - Added DXT1 formats and documented multiple of 4 restriction.
michael@0 163

mercurial