1Name 2 3 OES_copy_image 4 5Name Strings 6 7 GL_OES_copy_image 8 9Contact 10 11 Daniel Koch, NVIDIA Corporation (dkoch 'at' nvidia.com) 12 13Contributors 14 15 Ian Stewart, NVIDIA 16 Graham Connor, Imagination 17 Ben Bowman, Imagination 18 Jonathan Putsman, Imagination 19 And the contributors to ARB_copy_image 20 21Notice 22 23 Copyright (c) 2012-2013 The Khronos Group Inc. Copyright terms at 24 http://www.khronos.org/registry/speccopyright.html 25 26Specification Update Policy 27 28 Khronos-approved extension specifications are updated in response to 29 issues and bugs prioritized by the Khronos OpenGL ES Working Group. For 30 extensions which have been promoted to a core Specification, fixes will 31 first appear in the latest version of that core Specification, and will 32 eventually be backported to the extension document. This policy is 33 described in more detail at 34 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 35 36Status 37 38 Approved by the OpenGL ES Working Group 39 Ratified by the Khronos Board of Promoters on November 7, 2014 40 41Version 42 43 Last Modified Date: June 18, 2014 44 Revision: 1 45 46Number 47 48 OpenGL ES Extension #208 49 50Dependencies 51 52 OpenGL ES 3.0 is required. 53 54 This extension is written against the OpenGL ES 3.0 specification. 55 56 This extension interacts with EXT_texture_view and OES_texture_view. 57 58 This extension interacts with EXT_texture_buffer and OES_texture_buffer. 59 60 This extension interacts with EXT_texture_cube_map_array and 61 OES_texture_cube_map_array. 62 63 This extension interacts with EXT_texture_compression_s3tc. 64 65 This extension interacts with EXT_texture_compression_rgtc. 66 67 This extension interacts with EXT_texture_compression_bptc. 68 69 This extension interacts with KHR_texture_compression_astc_ldr. 70 71 This extension interacts with KHR_texture_compression_astc_hdr. 72 73 This extension interacts with OES_texture_compression_astc. 74 75Overview 76 77 This extension enables efficient image data transfer between image 78 objects (i.e. textures and renderbuffers) without the need to bind 79 the objects or otherwise configure the rendering pipeline. 80 81 This is accomplised by adding a new entry-point CopyImageSubData, 82 which takes a named source and destination. 83 84 CopyImageSubData does not perform general-purpose conversions 85 such as scaling, resizing, blending, color-space, or format 86 conversions. It should be considered to operate in a manner 87 similar to a CPU memcpy, but using the GPU for the copy. 88 89 CopyImageSubData supports copies between images with different 90 internal formats, if the formats are compatible as described in 91 this extension. 92 93 CopyImageSubData also supports copying between compressed and 94 uncompressed images if the compressed block / uncompressed texel 95 sizes are the same. 96 97New Procedures and Functions 98 99 void CopyImageSubDataOES( 100 uint srcName, enum srcTarget, int srcLevel, 101 int srcX, int srcY, int srcZ, 102 uint dstName, enum dstTarget, int dstLevel, 103 int dstX, int dstY, int dstZ, 104 sizei srcWidth, sizei srcHeight, sizei srcDepth); 105 106New Tokens 107 108 None 109 110Additions to Chapter 4 of the OpenGL ES 3.0 Specification (Per-Fragment 111Operations and the Framebuffer) 112 113 Append to section 4.3.3 (Copying Pixels): 114 115 The function 116 117 void CopyImageSubDataOES( 118 uint srcName, enum srcTarget, int srcLevel, 119 int srcX, int srcY, int srcZ, 120 uint dstName, enum dstTarget, int dstLevel, 121 int dstX, int dstY, int dstZ, 122 sizei srcWidth, sizei srcHeight, sizei srcDepth); 123 124 may be used to copy a region of texel data between two image 125 objects. An image object may be either a texture or a 126 renderbuffer. 127 128 CopyImageSubData does not perform general-purpose conversions 129 such as scaling, resizing, blending, color-space, or format 130 conversions. It should be considered to operate in a manner 131 similar to a CPU memcpy. CopyImageSubData can copy between 132 images with different internal formats, provided 133 the formats are compatible. 134 135 CopyImageSubData also allows copying between certain 136 types of compressed and uncompressed internal formats as detailed 137 in Table 4.X.1. This copy does not perform on-the-fly compression 138 or decompression. When copying from an uncompressed internal format 139 to a compressed internal format, each texel of uncompressed data 140 becomes a single block of compressed data. When copying from a 141 compressed internal format to an uncompressed internal format, 142 a block of compressed data becomes a single texel of uncompressed 143 data. The texel size of the uncompressed format must be the same 144 size the block size of the compressed formats. Thus it is permitted 145 to copy between a 128-bit uncompressed format and a compressed 146 format which uses 8-bit 4x4 blocks, or between a 64-bit uncompressed 147 format and a compressed format which uses 4-bit 4x4 blocks. 148 INVALID_OPERATION is generated if the texel size of 149 the uncompressed image is not equal to the block size of the 150 compressed image. 151 152 The source object is identified by <srcName> and <srcTarget>. 153 Similarly the destination object is identified by <dstName> and 154 <dstTarget>. The interpretation of the name depends on the value 155 of the corresponding target parameter. If the target parameter is 156 RENDERBUFFER, the name is interpreted as the name of a 157 renderbuffer object. If the target parameter is a texture target, 158 the name is interpreted as a texture object. All 159 texture targets are accepted, with the exception of TEXTURE_BUFFER_OES 160 and the cubemap face selectors described in table 3.17. 161 INVALID_ENUM is generated if either target is not RENDERBUFFER 162 or a valid texture target, or is TEXTURE_BUFFER, or is one 163 of the cubemap face selectors described in table 3.21, or if the 164 target does not match the type of the object. INVALID_OPERATION 165 is generated if either object is a texture and the texture is 166 not complete (as defined in section 3.8.13), if the source and 167 destination internal formats are not compatible (see below), 168 or if the number of samples do not match. 169 INVALID_VALUE is generated if either name does not correspond to a 170 valid renderbuffer or texture object according to the corresponding 171 target parameter. 172 173 <srcLevel> and <dstLevel> identify the source and destination 174 level of detail. For textures, this must be a valid level of 175 detail in the texture object. For renderbuffers, this value must 176 be zero. INVALID_VALUE is generated if the specified level is not 177 a valid level for the image. 178 179 <srcX>, <srcY>, and <srcZ> specify the lower left texel 180 coordinates of a <srcWidth>-wide by <srcHeight>-high by 181 <srcDepth>-deep rectangular subregion of the source texel array. 182 Similarly, <dstX>, <dstY> and <dstZ> specify the coordinates of a 183 subregion of the destination texel array. The source and destination 184 subregions must be contained entirely within the specified level of the 185 corresponding image objects. 186 The dimensions are always specified in texels, even for compressed 187 texture formats. But it should be noted that if only one of the 188 source and destination textures is compressed then the number of 189 texels touched in the compressed image will be a factor of the 190 block size larger than in the uncompressed image. 191 INVALID_VALUE is generated if the 192 dimensions of the either subregion exceeds the boundaries of the 193 corresponding image object, or if the image format is compressed 194 and the dimensions of the subregion fail to meet the alignment 195 constraints of the format. 196 197 If the source and destination images are identical, and the source 198 and destination rectangles overlap, the result of the operation is 199 undefined. 200 201 Slices of a TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY_OES, 202 TEXTURE_3D and faces of TEXTURE_CUBE_MAP are all compatible provided 203 they share a compatible internal format, and multiple slices or faces 204 may be copied between these objects with a single call by specifying the 205 starting slice with <srcZ> and <dstZ>, and the number of slices to 206 be copied with <srcDepth>. Cubemap textures always have six faces 207 which are selected by a zero-based face index, according to the 208 order specified in table 3.21. 209 210 For the purposes of CopyImageSubData, two internal formats 211 are considered compatible if any of the following conditions are 212 met: 213 * the formats are the same, 214 * the formats are both listed in the same entry of Table 4.X.2, or 215 * one format is compressed and the other is uncompressed and 216 Table 4.X.1 lists the two formats in the same row. 217 If the formats are not compatible INVALID_OPERATION is generated. 218 219 ------------------------------------------------------------------------------ 220 | Texel / | Uncompressed | | 221 | Block | internal format | Compressed internal format | 222 | size | | | 223 ------------------------------------------------------------------------------ 224 | 128-bit | RGBA32UI, | COMPRESSED_RGBA_S3TC_DXT3_EXT, | 225 | | RGBA32I, | COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, | 226 | | RGBA32F | COMPRESSED_RGBA_S3TC_DXT5_EXT, | 227 | | | COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, | 228 | | | COMPRESSED_RG_RGTC2_EXT, | 229 | | | COMPRESSED_SIGNED_RG_RGTC2_EXT, | 230 | | | COMPRESSED_RGBA_BPTC_UNORM_EXT, | 231 | | | COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, | 232 | | | COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, | 233 | | | COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT, | 234 | | | COMPRESSED_RGBA8_ETC2_EAC, | 235 | | | COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, | 236 | | | COMPRESSED_RG11_EAC, | 237 | | | COMPRESSED_SIGNED_RG11_EAC, | 238 | | | COMPRESSED_RGBA_ASTC_4x4_KHR, | 239 | | | COMPRESSED_RGBA_ASTC_5x4_KHR, | 240 | | | COMPRESSED_RGBA_ASTC_5x5_KHR, | 241 | | | COMPRESSED_RGBA_ASTC_6x5_KHR, | 242 | | | COMPRESSED_RGBA_ASTC_6x6_KHR, | 243 | | | COMPRESSED_RGBA_ASTC_8x5_KHR, | 244 | | | COMPRESSED_RGBA_ASTC_8x6_KHR, | 245 | | | COMPRESSED_RGBA_ASTC_8x8_KHR, | 246 | | | COMPRESSED_RGBA_ASTC_10x5_KHR, | 247 | | | COMPRESSED_RGBA_ASTC_10x6_KHR, | 248 | | | COMPRESSED_RGBA_ASTC_10x8_KHR, | 249 | | | COMPRESSED_RGBA_ASTC_10x10_KHR, | 250 | | | COMPRESSED_RGBA_ASTC_12x10_KHR, | 251 | | | COMPRESSED_RGBA_ASTC_12x12_KHR, | 252 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR, | 253 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR, | 254 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR, | 255 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR, | 256 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR, | 257 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR, | 258 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR, | 259 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR, | 260 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR, | 261 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR, | 262 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR, | 263 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR, | 264 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR, | 265 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR, | 266 | | | COMPRESSED_RGBA_ASTC_3x3x3_OES, | 267 | | | COMPRESSED_RGBA_ASTC_4x3x3_OES, | 268 | | | COMPRESSED_RGBA_ASTC_4x4x3_OES, | 269 | | | COMPRESSED_RGBA_ASTC_4x4x4_OES, | 270 | | | COMPRESSED_RGBA_ASTC_5x4x4_OES, | 271 | | | COMPRESSED_RGBA_ASTC_5x5x4_OES, | 272 | | | COMPRESSED_RGBA_ASTC_5x5x5_OES, | 273 | | | COMPRESSED_RGBA_ASTC_6x5x5_OES, | 274 | | | COMPRESSED_RGBA_ASTC_6x6x5_OES, | 275 | | | COMPRESSED_RGBA_ASTC_6x6x6_OES, | 276 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES, | 277 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES, | 278 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES, | 279 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES, | 280 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES, | 281 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES, | 282 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES, | 283 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES, | 284 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES, | 285 | | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES | 286 ------------------------------------------------------------------------------ 287 | 64-bit | RGBA16F, RG32F, | COMPRESSED_RGB_S3TC_DXT1_EXT, | 288 | | RGBA16UI, RG32UI, | COMPRESSED_SRGB_S3TC_DXT1_EXT, | 289 | | RGBA16I, RG32I, | COMPRESSED_RGBA_S3TC_DXT1_EXT, | 290 | | | COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, | 291 | | | COMPRESSED_RED_RGTC1_EXT, | 292 | | | COMPRESSED_SIGNED_RED_RGTC1_EXT, | 293 | | | COMPRESSED_RGB8_ETC2, | 294 | | | COMPRESSED_SRGB8_ETC2, | 295 | | | COMPRESSED_R11_EAC, | 296 | | | COMPRESSED_SIGNED_R11_EAC, | 297 | | | COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, | 298 | | | COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 | 299 ------------------------------------------------------------------------------ 300 301 Table 4.X.1: Compatible internal formats for copying between 302 compressed and uncompressed internal formats with CopyImageSubDataOES. 303 Formats in the same row can be copied between each other. 304 305 -------------------------------------------------------------------------- 306 | Class | Internal formats | 307 -------------------------------------------------------------------------- 308 | VIEW_CLASS_128_BITS | RGBA32F, RGBA32UI, RGBA32I | 309 -------------------------------------------------------------------------- 310 | VIEW_CLASS_96_BITS | RGB32F, RGB32UI, RGB32I | 311 -------------------------------------------------------------------------- 312 | VIEW_CLASS_64_BITS | RGBA16F, RG32F, RGBA16UI, RG32UI, | 313 | | RGBA16I, RG32I | 314 -------------------------------------------------------------------------- 315 | VIEW_CLASS_48_BITS | RGB16F, RGB16UI, RGB16I | 316 -------------------------------------------------------------------------- 317 | VIEW_CLASS_32_BITS | RG16F, R11F_G11F_B10F, R32F, | 318 | | RGB10_A2UI, RGBA8UI, RG16UI, R32UI, | 319 | | RGBA8I, RG16I, R32I, RGB10_A2, RGBA8, | 320 | | RGBA8_SNORM, SRGB8_ALPHA8, RGB9_E5 | 321 ------------------------------------------------------------------------- 322 | VIEW_CLASS_24_BITS | RGB8, RGB8_SNORM, SRGB8, RGB8UI, RGB8I | 323 -------------------------------------------------------------------------- 324 | VIEW_CLASS_16_BITS | R16F, RG8UI, R16UI, RG8I, R16I, RG8, | 325 | | RG8_SNORM | 326 -------------------------------------------------------------------------- 327 | VIEW_CLASS_8_BITS | R8UI, R8I, R8, R8_SNORM | 328 -------------------------------------------------------------------------- 329 | VIEW_CLASS_RGTC1_RED | COMPRESSED_RED_RGTC1_EXT, | 330 | | COMPRESSED_SIGNED_RED_RGTC1_EXT | 331 -------------------------------------------------------------------------- 332 | VIEW_CLASS_RGTC2_RG | COMPRESSED_RG_RGTC2_EXT, | 333 | | COMPRESSED_SIGNED_RG_RGTC2_EXT | 334 -------------------------------------------------------------------------- 335 | VIEW_CLASS_BPTC_UNORM | COMPRESSED_RGBA_BPTC_UNORM_EXT, | 336 | | COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT | 337 -------------------------------------------------------------------------- 338 | VIEW_CLASS_BPTC_FLOAT | COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, | 339 | | COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT | 340 -------------------------------------------------------------------------- 341 | VIEW_CLASS_S3TC_DXT1_RGB | COMPRESSED_RGB_S3TC_DXT1_EXT, | 342 | | COMPRESSED_SRGB_S3TC_DXT1_EXT | 343 -------------------------------------------------------------------------- 344 | VIEW_CLASS_S3TC_DXT1_RGBA | COMPRESSED_RGBA_S3TC_DXT1_EXT, | 345 | | COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT | 346 -------------------------------------------------------------------------- 347 | VIEW_CLASS_S3TC_DXT3_RGBA | COMPRESSED_RGBA_S3TC_DXT3_EXT, | 348 | | COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT | 349 -------------------------------------------------------------------------- 350 | VIEW_CLASS_S3TC_DXT5_RGBA | COMPRESSED_RGBA_S3TC_DXT5_EXT, | 351 | | COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT | 352 -------------------------------------------------------------------------- 353 | VIEW_CLASS_EAC_R11 | COMPRESSED_R11_EAC, | 354 | | COMPRESSED_SIGNED_R11_EAC | 355 -------------------------------------------------------------------------- 356 | VIEW_CLASS_EAC_RG11 | COMPRESSED_RG11_EAC, | 357 | | COMPRESSED_SIGNED_RG11_EAC | 358 -------------------------------------------------------------------------- 359 | VIEW_CLASS_ETC2_RGB | COMPRESSED_RGB8_ETC2, | 360 | | COMPRESSED_SRGB8_ETC2 | 361 -------------------------------------------------------------------------- 362 | VIEW_CLASS_ETC2_RGBA | COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, | 363 | | COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 | 364 -------------------------------------------------------------------------- 365 | VIEW_CLASS_ETC2_EAC_RGBA | COMPRESSED_RGBA8_ETC2_EAC, | 366 | | COMPRESSED_SRGB8_ALPHA8_ETC2_EAC | 367 -------------------------------------------------------------------------- 368 | VIEW_CLASS_ASTC_4x4_RGBA | COMPRESSED_RGBA_ASTC_4x4_KHR, | 369 | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR | 370 -------------------------------------------------------------------------- 371 | VIEW_CLASS_ASTC_5x4_RGBA | COMPRESSED_RGBA_ASTC_5x4_KHR, | 372 | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR | 373 -------------------------------------------------------------------------- 374 | VIEW_CLASS_ASTC_5x5_RGBA | COMPRESSED_RGBA_ASTC_5x5_KHR, | 375 | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR | 376 -------------------------------------------------------------------------- 377 | VIEW_CLASS_ASTC_6x5_RGBA | COMPRESSED_RGBA_ASTC_6x5_KHR, | 378 | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR | 379 -------------------------------------------------------------------------- 380 | VIEW_CLASS_ASTC_6x6_RGBA | COMPRESSED_RGBA_ASTC_6x6_KHR, | 381 | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR | 382 -------------------------------------------------------------------------- 383 | VIEW_CLASS_ASTC_8x5_RGBA | COMPRESSED_RGBA_ASTC_8x5_KHR, | 384 | | COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR | 385 -------------------------------------------------------------------------- 386 | VIEW_CLASS_ASTC_8x6_RGBA | COMPRESSED_RGBA_ASTC_8x6_KHR, | 387 | | COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR | 388 -------------------------------------------------------------------------- 389 | VIEW_CLASS_ASTC_8x8_RGBA | COMPRESSED_RGBA_ASTC_8x8_KHR, | 390 | | COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR | 391 -------------------------------------------------------------------------- 392 | VIEW_CLASS_ASTC_10x5_RGBA | COMPRESSED_RGBA_ASTC_10x5_KHR, | 393 | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR | 394 -------------------------------------------------------------------------- 395 | VIEW_CLASS_ASTC_10x6_RGBA | COMPRESSED_RGBA_ASTC_10x6_KHR, | 396 | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR | 397 -------------------------------------------------------------------------- 398 | VIEW_CLASS_ASTC_10x8_RGBA | COMPRESSED_RGBA_ASTC_10x8_KHR, | 399 | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR | 400 -------------------------------------------------------------------------- 401 | VIEW_CLASS_ASTC_10x10_RGBA | COMPRESSED_RGBA_ASTC_10x10_KHR, | 402 | | COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR | 403 -------------------------------------------------------------------------- 404 | VIEW_CLASS_ASTC_12x10_RGBA | COMPRESSED_RGBA_ASTC_12x10_KHR, | 405 | | COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR | 406 -------------------------------------------------------------------------- 407 | VIEW_CLASS_ASTC_12x12_RGBA | COMPRESSED_RGBA_ASTC_12x12_KHR, | 408 | | COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR | 409 -------------------------------------------------------------------------- 410 | VIEW_CLASS_ASTC_3x3x3_RGBA | COMPRESSED_RGBA_ASTC_3x3x3_OES, | 411 | | COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES | 412 -------------------------------------------------------------------------- 413 | VIEW_CLASS_ASTC_4x3x3_RGBA | COMPRESSED_RGBA_ASTC_4x3x3_OES, | 414 | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES | 415 -------------------------------------------------------------------------- 416 | VIEW_CLASS_ASTC_4x4x3_RGBA | COMPRESSED_RGBA_ASTC_4x4x3_OES, | 417 | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES | 418 -------------------------------------------------------------------------- 419 | VIEW_CLASS_ASTC_4x4x4_RGBA | COMPRESSED_RGBA_ASTC_4x4x4_OES, | 420 | | COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES | 421 -------------------------------------------------------------------------- 422 | VIEW_CLASS_ASTC_5x4x4_RGBA | COMPRESSED_RGBA_ASTC_5x4x4_OES, | 423 | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES | 424 -------------------------------------------------------------------------- 425 | VIEW_CLASS_ASTC_5x5x4_RGBA | COMPRESSED_RGBA_ASTC_5x5x4_OES, | 426 | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES | 427 -------------------------------------------------------------------------- 428 | VIEW_CLASS_ASTC_5x5x5_RGBA | COMPRESSED_RGBA_ASTC_5x5x5_OES, | 429 | | COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES | 430 -------------------------------------------------------------------------- 431 | VIEW_CLASS_ASTC_6x5x5_RGBA | COMPRESSED_RGBA_ASTC_6x5x5_OES, | 432 | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES | 433 -------------------------------------------------------------------------- 434 | VIEW_CLASS_ASTC_6x6x5_RGBA | COMPRESSED_RGBA_ASTC_6x6x5_OES, | 435 | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES | 436 -------------------------------------------------------------------------- 437 | VIEW_CLASS_ASTC_6x6x6_RGBA | COMPRESSED_RGBA_ASTC_6x6x6_OES, | 438 | | COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES | 439 -------------------------------------------------------------------------- 440 441 Table 4.X.2: Compatible internal formats for CopyImageSubDataOES. 442 Formats in the same entry may be copied between each other. 443 [[Note that if texture_view is supported, this table should 444 be replaced with a reference to Table 3.X.2 from that extension.]] 445 446 If the internal format does not exactly match the internal format of the 447 original texture, the contents of the memory are reinterpreted in the same 448 manner as for image bindings described in section 3.8.X (Texture Image 449 Loads and Stores). 450 451Dependencies on EXT_texture_view or OES_texture_view: 452 453 As written, this extension incorporates some of the "view class" 454 terminology that is introduced by EXT_texture_view or OES_texture_view. 455 However this is only enough to define the equivalence classes and does 456 not actually imply the texture view capability. 457 458 If EXT_texture_view or OES_texture_view is supported, Table 4.X.2 should 459 be replaced with a reference to Table 3.X.2 from the appropriate extension 460 instead. 461 462Dependencies on EXT_texture_buffer or OES_texture_buffer 463 464 If EXT_texture_buffer or OES_texture_buffer is not supported, then remove 465 all references to TEXTURE_BUFFER_EXT or TEXTURE_BUFFER_OES, respectively. 466 467 If EXT_texture_buffer is supported but OES_texture_buffer is not, 468 replace all references to TEXTURE_BUFFER_OES with TEXTURE_BUFFER_EXT. 469 470Dependencies on EXT_texture_cube_map_array or OES_texture_cube_map_array 471 472 If EXT_texture_cube_map_array or OES_texture_cube_map_array is not supported, 473 then remove all references to TEXTURE_CUBE_MAP_ARRAY_EXT or 474 TEXTURE_CUBE_MAP_ARRAY_OES, respectively. 475 476 If EXT_texture_cube_map_array is supported but OES_texture_cube_map_array 477 is not, replace all references to TEXTURE_CUBE_MAP_ARRAY_OES with 478 TEXTURE_CUBE_MAP_ARRAY_EXT. 479 480Dependencies on EXT_texture_compression_s3tc 481 482 If EXT_texture_compression_s3tc is not supported, remove any 483 references to S3TC compressed texture formats. 484 485Dependencies on EXT_texture_compression_rgtc 486 487 If EXT_texture_compression_rgtc is not supported, remove any 488 references to the RGTC compressed texture formats. 489 490Dependencies on EXT_texture_compression_bptc 491 492 If EXT_texture_compression_bptc is not supported, remove any 493 references to the PBTC compressed texture formats. 494 495Dependencies on KHR_texture_compression_astc_ldr 496 497 If KHR_texture_compression_astc_ldr is not supported, remove any 498 references to the ASTC LDR compressed texture formats. 499 500Dependencies on KHR_texture_compression_astc_hdr 501 502 If KHR_texture_compression_astc_hdr is not supported, remove any 503 references to the ASTC HDR compressed texture formats. 504 505Dependencies on OES_texture_compression_astc 506 507 If OES_texture_compression_astc is not supported, remove any 508 references to the ASTC 3D compressed texture formats. 509 510Errors 511 512 CopyImageSubDataOES may fail with any of the following errors: 513 514 INVALID_ENUM is generated 515 * if either <srcTarget> or <dstTarget> 516 - is not RENDERBUFFER or a valid non-proxy texture target 517 - is TEXTURE_BUFFER, or 518 - is one of the cubemap face selectors described in table 3.17, 519 * if the target does not match the type of the object. 520 521 INVALID_OPERATION is generated 522 * if either object is a texture and the texture is not complete, 523 * if the source and destination formats are not compatible, 524 * if the source and destination number of samples do not match, 525 * if one image is compressed and the other is uncompressed and the 526 block size of compressed image is not equal to the texel size 527 of the compressed image. 528 529 INVALID_VALUE is generated 530 * if either <srcName> or <dstName> does not correspond to a valid 531 renderbuffer or texture object according to the corresponding 532 target parameter, or 533 * if the specified level is not a valid level for the image, or 534 * if the dimensions of the either subregion exceeds the boundaries 535 of the corresponding image object, or 536 * if the image format is compressed and the dimensions of the 537 subregion fail to meet the alignment constraints of the format. 538 539Sample Code 540 541 TBD 542 543Issues 544 545 Note: these issues apply specifically to the definition of 546 OES_copy_image, which is based on the OpenGL ARB_copy_image extension 547 as updated by OpenGL 4.4. Resolved issues from ARB_copy_image have 548 been removed but remain largely applicable to this extension. That 549 extension can be found in the OpenGL Registry. 550 551 (1) What functionality was removed from ARB_copy_image? 552 553 - removed mention of proxy textures, TEXTURE_1D_ARRAY target 554 - removed mention of RGBA16, RGBA16_SNORM texture formats 555 - removed compatibility profile interactions and negative borders 556 557 (2) What functionality was changed or added relative to ARB_copy_image? 558 559 - added compatibility class definition to avoid texture_view dependency 560 - added ability to copy to/from ETC2/EAC formats and uncompressed formats 561 - added ability to copy between ETC2/EAC formats that are compatible 562 - added ability to copy to/from ASTC formats and uncompressed formats 563 - added ability to copy between ASTC formats that are compatible 564 565 (3) Is copying from/to images with ETC2/EAC compressed texture formats 566 defined? 567 568 RESOLVED: Yes. This extension adds support for copying between ETC2/EAC 569 compressed texture formats that belong to the same view class. It also 570 adds the ability to copy between uncompressed texture formats and 571 compressed ETC2/EAC texture formats and in a similar fashion the other 572 compressed formats. This was requirement was not added to GL 4.x, 573 because at the time GL 4.x HW did not natively support ETC2/EAC compressed 574 textures, and thus it was expected that they may be uncompressed or 575 transcoded. It is expected that this may be a very useful capability 576 for mobile parts and so this capability is included here. For GL 4.x 577 hardware that wishes to expose this capability, it will need to 578 transparently handle these copies as if the compressed formats where 579 natively supported. 580 581 (4) Is copying from/to images with ASTC compressed texture formats 582 defined? 583 584 RESOLVED. Yes, as in issue 3. Any of the ASTC LHR, HDR, or 3D formats 585 that are supported may be copied within their compatibility class. 586 587 (5) What is the behavior when the source and destination images are the 588 same? 589 590 RESOLVED: This was also not stated in GL 4.4, ARB_copy_image or 591 NV_copy_image. This was clarified to be undefined behaviour in Bug 11355. 592 We follow that resolution here. 593 594 (6) Should the R16, RG16, RGB16, and RGBA16 (and _SNORM) texture formats 595 be supported? 596 597 RESOLVED. No. OpenGL ES 3.0 does not support these formats. They were 598 considered for late addition to OpenGL ES 3.1 in Bug 11366, but didn't 599 make the cut. In the absence of another extension to add them, they 600 are not supported here either. 601 602Revision History 603 604 Rev. Date Author Changes 605 ---- ---------- -------- ----------------------------------------- 606 1 06/18/2014 dkoch Initial OES version based on EXT. 607 No functional changes. 608 609