1Name 2 3 ARB_texture_view 4 5Name Strings 6 7 GL_ARB_texture_view 8 9Contact 10 11 Jeff Bolz, NVIDIA Corporation (jbolz 'at' nvidia.com) 12 13Contributors 14 15 Pat Brown, NVIDIA 16 Daniel Koch, TransGaming 17 Jon Leech 18 19Notice 20 21 Copyright (c) 2012-2013 The Khronos Group Inc. Copyright terms at 22 http://www.khronos.org/registry/speccopyright.html 23 24Status 25 26 Complete. 27 Approved by the ARB on 2012/06/12. 28 29Version 30 31 Last Modified Date: July 15, 2013 32 Revision: 4 33 34Number 35 36 ARB Extension #124 37 38Dependencies 39 40 This extension is written against the OpenGL 4.2 Core profile 41 specification. 42 43 ARB_texture_storage or OpenGL 4.2 is required. 44 45 ARB_internalformat_query2 interacts with this extension. 46 47 EXT_texture_compression_s3tc interacts with this extension. 48 49 EXT_texture_sRGB interacts with this extension. 50 51 ARB_texture_storage_multisample interacts with this extension. 52 53Overview 54 55 This extension allows a texture's data store to be "viewed" in multiple 56 ways, either reinterpreting the data format/type as a different format/ 57 type with the same element size, or by clamping the mipmap level range 58 or array slice range. 59 60 The goals of this extension are to avoid having these alternate views 61 become shared mutable containers of shared mutable objects, and to add 62 the views to the API in a minimally invasive way. 63 64 No new object types are added. Conceptually, a texture object is split 65 into the following parts: 66 67 - A data store holding texel data. 68 - State describing which portions of the data store to use, and how 69 to interpret the data elements. 70 - An embedded sampler object. 71 - Various other texture parameters. 72 73 With this extension, multiple textures can share a data store and have 74 different state describing which portions of the data store to use and how 75 to interpret the data elements. The data store is refcounted and not 76 destroyed until the last texture sharing it is deleted. 77 78 This extension leverages the ARB_texture_storage concept of an "immutable 79 texture". Views can only be created of textures created with TexStorage. 80 81 82New Procedures and Functions 83 84 void TextureView(uint texture, enum target, uint origtexture, 85 enum internalformat, 86 uint minlevel, uint numlevels, 87 uint minlayer, uint numlayers); 88 89New Tokens 90 91 Accepted by the <pname> parameters of GetTexParameterfv and 92 GetTexParameteriv: 93 94 TEXTURE_VIEW_MIN_LEVEL 0x82DB 95 TEXTURE_VIEW_NUM_LEVELS 0x82DC 96 TEXTURE_VIEW_MIN_LAYER 0x82DD 97 TEXTURE_VIEW_NUM_LAYERS 0x82DE 98 TEXTURE_IMMUTABLE_LEVELS 0x82DF 99 100 Used as compatibility class names in table 3.X.2 (see the "Interactions 101 with ARB_internalformat_query2" section below). 102 103 VIEW_CLASS_128_BITS 104 VIEW_CLASS_96_BITS 105 VIEW_CLASS_64_BITS 106 VIEW_CLASS_48_BITS 107 VIEW_CLASS_32_BITS 108 VIEW_CLASS_24_BITS 109 VIEW_CLASS_16_BITS 110 VIEW_CLASS_8_BITS 111 VIEW_CLASS_S3TC_DXT1_RGB 112 VIEW_CLASS_S3TC_DXT1_RGBA 113 VIEW_CLASS_S3TC_DXT3_RGBA 114 VIEW_CLASS_S3TC_DXT5_RGBA 115 VIEW_CLASS_RGTC1_RED 116 VIEW_CLASS_RGTC2_RG 117 VIEW_CLASS_BPTC_UNORM 118 VIEW_CLASS_BPTC_FLOAT 119 120 121Additions to Chapter 2 of the OpenGL 4.2 Specification (OpenGL Operation) 122 123 None. 124 125Additions to Chapter 3 of the OpenGL 4.2 Specification (Rasterization) 126 127 Modify subsection 3.9.8 (Texture Parameters) 128 129 Add the following to the end of the paragraph on p. 240: 130 131 If the texture was created with TextureView, then the TEXTURE_BASE_LEVEL 132 and TEXTURE_MAX_LEVEL parameters are interpreted relative to the view and 133 not relative to the original data store. 134 135 Modify subsection 3.9.15 (Texture State and Proxy State) 136 137 Add to the second paragraph on p. 256: 138 139 The values of TEXTURE_IMMUTABLE_LEVELS, TEXTURE_VIEW_MIN_LEVEL, 140 TEXTURE_VIEW_NUM_LEVELS, TEXTURE_VIEW_MIN_LAYER, TEXTURE_VIEW_NUM_LAYERS 141 are 0. 142 143 Modify subsection 3.9.16 (Immutable-Format Texture Images) 144 145 Modify the second to last bullet on p. 258: 146 147 If the command is successful, TEXTURE_IMMUTABLE_FORMAT becomes TRUE, 148 TEXTURE_IMMUTABLE_LEVELS and TEXTURE_VIEW_NUM_LEVELS become <levels>. 149 If the texture target is TEXTURE_1D_ARRAY then TEXTURE_VIEW_NUM_LAYERS 150 becomes <height>. If the texture target is TEXTURE_2D_ARRAY, 151 TEXTURE_CUBE_MAP_ARRAY, or TEXTURE_2D_MULTISAMPLE_ARRAY then 152 TEXTURE_VIEW_NUM_LAYERS becomes <depth>. If the texture target is 153 TEXTURE_CUBE_MAP, then TEXTURE_VIEW_NUM_LAYERS becomes 6. For any other 154 texture target, TEXTURE_VIEW_NUM_LAYERS becomes 1. 155 156 Add a new subsection at the end of 3.9 (Texturing) 157 158 3.9.X Texture Views 159 160 A texture can be created which references the data store of another texture 161 and interprets the data with a different format, and/or selects a subset of 162 the levels and/or layers of the other texture. The data store for such a 163 texture is shared with the data store of the original texture. Updating 164 the shared data store using the original texture affects texture values read 165 using the new texture, and vice versa. A texture data store remains in 166 existence until all textures that reference it are deleted. 167 168 The command: 169 170 void TextureView(uint texture, enum target, uint origtexture, 171 enum internalformat, 172 uint minlevel, uint numlevels, 173 uint minlayer, uint numlayers); 174 175 initializes the texture named <texture> to the target specified by 176 <target>. <texture>'s data store is inherited from the texture named 177 <origtexture>, but elements of the data store are interpreted according 178 to the internal format specified by <internalformat>. Additionally, if the 179 original texture is an array or has multiple mipmap levels, the parameters 180 <minlayer>, <numlayers>, <minlevel>, and <numlevels> control which of those 181 slices and levels are considered part of the texture. 182 183 The <minlevel> and <minlayer> parameters are relative to the view of the 184 original texture. If <numlayers> or <numlevels> extend beyond the original 185 texture, they are clamped to the max extent of the original texture. If 186 <minlevel> or <minlayer> are larger than the greatest level or layer of the 187 original texture, the error INVALID_VALUE is generated. 188 189 If the command is successful, the texture parameters in <texture> are 190 updated as follows: 191 192 - TEXTURE_IMMUTABLE_FORMAT is set to TRUE. 193 194 - TEXTURE_IMMUTABLE_LEVELS is set to the value of TEXTURE_IMMUTABLE_LEVELS 195 from the original texture. 196 197 - TEXTURE_VIEW_MIN_LEVEL is set to <minlevel> plus the value of 198 TEXTURE_VIEW_MIN_LEVEL from the original texture. 199 200 - TEXTURE_VIEW_MIN_LAYER is set to <minlayer> plus the value of 201 TEXTURE_VIEW_MIN_LAYER from the original texture. 202 203 - TEXTURE_VIEW_NUM_LEVELS is set to the lesser of <numlevels> and the 204 value of TEXTURE_VIEW_NUM_LEVELS from the original texture minus 205 <minlevels>. 206 207 - TEXTURE_VIEW_NUM_LAYERS is set to the lesser of <numlayers> and the 208 value of TEXTURE_VIEW_NUM_LAYERS from the original texture minus 209 <minlayer>. 210 211 The new texture's target must be "compatible" with the target of the 212 original texture, or else an INVALID_OPERATION error is generated. 213 Compatibility is defined by Table 3.X.1: 214 215 --------------------------------------------------------------------------------------------------------- 216 | Original target | Valid new targets | 217 --------------------------------------------------------------------------------------------------------- 218 | TEXTURE_1D | TEXTURE_1D, TEXTURE_1D_ARRAY | 219 |-------------------------------------------------------------------------------------------------------| 220 | TEXTURE_2D | TEXTURE_2D, TEXTURE_2D_ARRAY | 221 |-------------------------------------------------------------------------------------------------------| 222 | TEXTURE_3D | TEXTURE_3D | 223 |-------------------------------------------------------------------------------------------------------| 224 | TEXTURE_CUBE_MAP | TEXTURE_CUBE_MAP, TEXTURE_2D, TEXTURE_2D_ARRAY, TEXTURE_CUBE_MAP_ARRAY | 225 |-------------------------------------------------------------------------------------------------------| 226 | TEXTURE_RECTANGLE | TEXTURE_RECTANGLE | 227 |-------------------------------------------------------------------------------------------------------| 228 | TEXTURE_BUFFER | <none> | 229 |-------------------------------------------------------------------------------------------------------| 230 | TEXTURE_1D_ARRAY | TEXTURE_1D_ARRAY, TEXTURE_1D | 231 |-------------------------------------------------------------------------------------------------------| 232 | TEXTURE_2D_ARRAY | TEXTURE_2D_ARRAY, TEXTURE_2D, TEXTURE_CUBE_MAP, TEXTURE_CUBE_MAP_ARRAY | 233 |-------------------------------------------------------------------------------------------------------| 234 | TEXTURE_CUBE_MAP_ARRAY | TEXTURE_CUBE_MAP_ARRAY, TEXTURE_2D_ARRAY, TEXTURE_2D, TEXTURE_CUBE_MAP | 235 |-------------------------------------------------------------------------------------------------------| 236 | TEXTURE_2D_MULTISAMPLE | TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY | 237 |-------------------------------------------------------------------------------------------------------| 238 | TEXTURE_2D_MULTISAMPLE_ARRAY| TEXTURE_2D_MULTISAMPLE, TEXTURE_2D_MULTISAMPLE_ARRAY | 239 --------------------------------------------------------------------------------------------------------- 240 241 Table 3.X.1: Legal texture targets for TextureView. 242 243 If the new texture's target is TEXTURE_CUBE_MAP, the clamped <numlayers> 244 must be equal to 6. If the new texture's target is TEXTURE_CUBE_MAP_ARRAY, 245 then <numlayers> counts layer-faces rather than layers, and the clamped 246 <numlayers> must be a multiple of 6. Otherwise, the error INVALID_VALUE is 247 generated. If the new texture's target is TEXTURE_CUBE_MAP or 248 TEXTURE_CUBE_MAP_ARRAY, the width and height of the original texture's 249 levels must be equal otherwise the error INVALID_OPERATION is generated. 250 251 When the original texture's target is TEXTURE_CUBE_MAP, the layer 252 parameters are interpreted in the same order as if it were a 253 TEXTURE_CUBE_MAP_ARRAY with 6 layer-faces. 254 255 If <target> is TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_RECTANGLE, or 256 TEXTURE_2D_MULTISAMPLE and <numlayers> does not equal 1, the error 257 INVALID_VALUE is generated. 258 259 If the dimensions of the original texture are larger than the maximum 260 supported dimensions of the new target, the error INVALID_OPERATION is 261 generated. For example, if the original texture has a TEXTURE_2D_ARRAY 262 target and its width is greater than MAX_CUBE_MAP_TEXTURE_SIZE, an error 263 will be generated if TextureView is called to create a TEXTURE_CUBE_MAP 264 view. 265 266 The two textures' internal formats must be compatible according to Table 267 3.X.2 (Compatible internal formats for TextureView) if the internal format 268 exists in that table and the internal formats must be identical if not in 269 that table, or else an INVALID_OPERATION error is generated. 270 271 --------------------------------------------------------------------------- 272 | Class | Internal formats | 273 --------------------------------------------------------------------------- 274 | VIEW_CLASS_128_BITS | RGBA32F, RGBA32UI, RGBA32I | 275 --------------------------------------------------------------------------- 276 | VIEW_CLASS_96_BITS | RGB32F, RGB32UI, RGB32I | 277 --------------------------------------------------------------------------- 278 | VIEW_CLASS_64_BITS | RGBA16F, RG32F, RGBA16UI, RG32UI, RGBA16I, | 279 | | RG32I, RGBA16, RGBA16_SNORM | 280 --------------------------------------------------------------------------- 281 | VIEW_CLASS_48_BITS | RGB16, RGB16_SNORM, RGB16F, RGB16UI, RGB16I | 282 --------------------------------------------------------------------------- 283 | VIEW_CLASS_32_BITS | RG16F, R11F_G11F_B10F, R32F, | 284 | | RGB10_A2UI, RGBA8UI, RG16UI, R32UI, | 285 | | RGBA8I, RG16I, R32I, RGB10_A2, RGBA8, RG16, | 286 | | RGBA8_SNORM, RG16_SNORM, SRGB8_ALPHA8, RGB9_E5 | 287 --------------------------------------------------------------------------- 288 | VIEW_CLASS_24_BITS | RGB8, RGB8_SNORM, SRGB8, RGB8UI, RGB8I | 289 --------------------------------------------------------------------------- 290 | VIEW_CLASS_16_BITS | R16F, RG8UI, R16UI, RG8I, R16I, RG8, R16, | 291 | | RG8_SNORM, R16_SNORM | 292 --------------------------------------------------------------------------- 293 | VIEW_CLASS_8_BITS | R8UI, R8I, R8, R8_SNORM | 294 --------------------------------------------------------------------------- 295 | VIEW_CLASS_RGTC1_RED | COMPRESSED_RED_RGTC1, | 296 | | COMPRESSED_SIGNED_RED_RGTC1 | 297 --------------------------------------------------------------------------- 298 | VIEW_CLASS_RGTC2_RG | COMPRESSED_RG_RGTC2, | 299 | | COMPRESSED_SIGNED_RG_RGTC2 | 300 --------------------------------------------------------------------------- 301 | VIEW_CLASS_BPTC_UNORM | COMPRESSED_RGBA_BPTC_UNORM, | 302 | | COMPRESSED_SRGB_ALPHA_BPTC_UNORM | 303 --------------------------------------------------------------------------- 304 | VIEW_CLASS_BPTC_FLOAT | COMPRESSED_RGB_BPTC_SIGNED_FLOAT, | 305 | | COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT | 306 --------------------------------------------------------------------------- 307 308 Table 3.X.2: Compatible internal formats for TextureView. Formats in 309 the same entry may be cast to each other. 310 311 If the internal format does not exactly match the internal format of the 312 original texture, the contents of the memory are reinterpreted in the same 313 manner as for image bindings described in section 3.9.20 (Texture Image 314 Loads and Stores). 315 316 If <texture> has already been bound and given a target, then the error 317 INVALID_OPERATION is generated. If <texture> is 0, INVALID_VALUE is 318 generated. If <texture> is not a valid name returned by GenTextures, the 319 error INVALID_OPERATION is generated. 320 321 If <origtexture> is not the name of a texture, INVALID_VALUE is generated. 322 If <origtexture>'s TEXTURE_IMMUTABLE_FORMAT value is not TRUE, 323 INVALID_OPERATION is generated. 324 325 Texture commands that take a <level> or <layer> parameter, such as 326 TexSubImage2D, interpret that parameter to be relative to the view of the 327 texture. i.e. the mipmap level of the data store that would be updated via 328 TexSubImage2D would be the sum of <level> and the value of 329 TEXTURE_VIEW_MIN_LEVEL. 330 331 332Additions to Chapter 4 of the OpenGL 4.2 Specification (Per-Fragment 333Operations and the Frame Buffer) 334 335 None. 336 337Additions to Chapter 5 of the OpenGL 4.2 Specification (Special Functions) 338 339 None. 340 341Additions to Chapter 6 of the OpenGL 4.2 Specification (State and 342State Requests) 343 344 Modify subsection 6.1.3 (Enumerated Queries) 345 346 Modify the paragraph after GetTexParameter on p. 350: 347 348 ... <value> must be IMAGE_FORMAT_COMPATIBILITY_TYPE, 349 TEXTURE_IMMUTABLE_FORMAT, TEXTURE_VIEW_MIN_LEVEL, 350 TEXTURE_VIEW_NUM_LEVELS, TEXTURE_VIEW_MIN_LAYER, 351 TEXTURE_VIEW_NUM_LAYERS, or TEXTURE_IMMUTABLE_LEVELS. 352 353Additions to Appendix D of the OpenGL 4.2 Specification (Shared Objects and 354Multiple Contexts) 355 356 Modify section D.3 (Propagating Changes to Objects) 357 358 Modify the second bullet point on p 461: 359 360 - The contents of the data stores of textures and renderbuffers. 361 362 Add the following sentence to the paragraph that begins "When the contents 363 of an object <T>": 364 365 When <T> is a texture, "the contents of an object <T>" should be construed 366 to include the contents of the data store of <T>, even if <T>'s data store 367 was modified via a different view of the data store. 368 369Additions to the AGL/GLX/WGL Specifications 370 371 None. 372 373GLX Protocol 374 375 TBD 376 377Dependencies on EXT_texture_compression_s3tc 378 379 If EXT_texture_compression_s3tc and EXT_texture_sRGB are supported, then 380 Table 3.X.2 is updated to add the following rows: 381 382 ------------------------------------------------------------------- 383 | Class | Internal formats | 384 ------------------------------------------------------------------- 385 | VIEW_CLASS_S3TC_DXT1_RGB | COMPRESSED_RGB_S3TC_DXT1_EXT, | 386 | | COMPRESSED_SRGB_S3TC_DXT1_EXT | 387 ------------------------------------------------------------------- 388 | VIEW_CLASS_S3TC_DXT1_RGBA | COMPRESSED_RGBA_S3TC_DXT1_EXT, | 389 | | COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT | 390 ------------------------------------------------------------------- 391 | VIEW_CLASS_S3TC_DXT3_RGBA | COMPRESSED_RGBA_S3TC_DXT3_EXT, | 392 | | COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT | 393 ------------------------------------------------------------------- 394 | VIEW_CLASS_S3TC_DXT5_RGBA | COMPRESSED_RGBA_S3TC_DXT5_EXT, | 395 | | COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT | 396 ------------------------------------------------------------------- 397 398Interactions with ARB_internalformat_query2 399 400 The VIEW_CLASS_* tokens used as compatibility class names in table 3.X.2 401 are the same tokens returned by the VIEW_COMPATIBILITY_CLASS query in 402 ARB_internalformat_query2. In this extension they are simply a labelling 403 mechanism and serve no functional purpose in the API, so their numeric 404 values are not specified. 405 406Dependencies on ARB_texture_storage_multisample 407 408 Views are only supported for textures created by TexStorage. The original 409 ARB_texture_storage extension did not include TexStorage commands for 410 multisample textures. These are added by ARB_texture_storage_multisample, 411 so without that extension multisample textures cannot be used with views. 412 413Errors 414 415 TODO 416 417New State 418 419 Changes to table 6.16, p. 277 (Texture, state per texture object) 420 421 Initial 422 Get Value Type Get Command Value Description Sec. Attribute 423 --------- ---- ----------- ------- ----------- ---- --------- 424 TEXTURE_VIEW_MIN_LEVEL Z+ GetTexParameter 0 view base texture level 3.9.X texture 425 TEXTURE_VIEW_NUM_LEVELS Z+ GetTexParameter 0 view number of texture levels 3.9.X texture 426 TEXTURE_VIEW_MIN_LAYER Z+ GetTexParameter 0 view min array layer 3.9.X texture 427 TEXTURE_VIEW_NUM_LAYERS Z+ GetTexParameter 0 view number of array layers 3.9.X texture 428 TEXTURE_IMMUTABLE_LEVELS Z+ GetTexParameter 0 storage number of levels 3.9.X texture 429 430New Implementation Dependent State 431 432 None. 433 434Examples 435 436 TODO 437 438Issues 439 440 (1) What internal formats can be cast to what other formats? 441 442 RESOLVED: In general, we try to follow the precedent from 443 ARB_shader_image_load_store where formats with the same element size can 444 be cast to each other. Some specific issues with that: 445 446 - Depth formats cannot be cast to other formats. D3D1x handles depth 447 formats differently than GL, depth formats are not texturable and 448 instead there are equivalent "RG" formats for each depth format. In GL, 449 depth formats are all texturable and we don't have equivalent RG 450 formats for most of them (we only have R32F and R16). Since these can 451 be textured from in GL, there's no great need to cast them. 452 453 - Compressed formats can only be cast to other compressed formats with 454 nearly identical encodings. Only the sRGB/signed-ness can change. See 455 also issue (10). 456 457 - RGB formats cannot be cast to/from RGBA. For the case of RGBA->RGB, 458 the same can be accomplished using ARB_texture_swizzle. For the case 459 of RGB->RGBA, an RGB texture may have been allocated without storage 460 for alpha bits so this needs to be disallowed. 461 462 (2) Should TEXTURE_IMMUTABLE_FORMAT be renamed? 463 464 ARB_texture_storage isn't really about the format being immutable, it's 465 more about the data store not needing to be reallocated. This extension 466 allows interpreting the data store with a different format, so this enum 467 now feels poorly named. 468 469 RESOLVED: Leave it as is. 470 471 (3) Is it possible to create a texture view using an original texture 472 which is itself a view? And if so, how are the level/layer values 473 interpreted? 474 475 RESOLVED: It is legal. For example, let's say texture 1 is a 2D_ARRAY 476 texture with 200 layers. It will have TEXTURE_VIEW_MIN_LAYER=0, 477 TEXTURE_VIEW_NUM_LAYERS=200. Then we create texture 2 from texture 1 using 478 <minlayer>=100, <numlayers>=100. It will have TEXTURE_VIEW_MIN_LAYER=100, 479 TEXTURE_VIEW_NUM_LAYERS=100. Then we create texture 3 from texture 2 using 480 <minlayer>=50, <numlayers>=50. It will have TEXTURE_VIEW_MIN_LAYER=150, 481 TEXTURE_VIEW_NUM_LAYERS=50. 482 483 (4) Should we allow views of textures not created through TexStorage? 484 485 RESOLVED: No. It might be possible, but if TexImage is called on a texture 486 whose data store is shared it would likely require orphaning the old data 487 store and creating/copying to a new data store. That's not desirable. 488 489 (5) How are TEXTURE_BASE_LEVEL and TEXTURE_MAX_LEVEL interpreted if 490 TEXTURE_VIEW_MIN_LEVEL is non-zero? 491 492 RESOLVED: The intent is that TEXTURE_BASE_LEVEL is relative to the view, 493 i.e. the base level is TEXTURE_BASE_LEVEL+TEXTURE_VIEW_MIN_LEVEL relative 494 to the data store. 495 496 (6) Do we need any new "typeless" formats? 497 498 RESOLVED: No. Any "compatible" format can be used in place of a typeless 499 format. 500 501 (7) Why aren't BUFFER textures supported? 502 503 RESOLVED: The same can be accomplished with the contemporaneous 504 GL_ARB_texture_buffer_range extension. 505 506 (8) This extension requires TEXTURE_IMMUTABLE_FORMAT to be TRUE, 507 but we don't have TexStorage*Multisample. Should we add these 508 commands, or not require immutable format? 509 510 RESOLVED: Add TexStorage*Multisample. This is done by 511 ARB_texture_storage_multisample. 512 513 (9) Should it be possible to create a 2D view from a RECTANGLE texture 514 or vice versa? 515 516 RESOLVED: No. These targets may have different max dimensions, or may be 517 allocated in memory with different tiling/swizzling. 518 519 (10) Should it be possible to view a compressed texture in such a way 520 that a block of the compressed view corresponds to a texel of an 521 uncompressed view? For example, taking a 256x256 DXT1 texture and viewing 522 it as a 64x64 RG32UI texture? 523 524 RESOLVED: No. The different mipmap stack sizes would be a problem, and 525 it's unclear whether all hardware could support this. Maybe a future 526 extension could enable this, but only allowing the view to have a single 527 level? 528 529 (11) Interaction between TEXTURE_IMMUTABLE_LEVELS and View textures? 530 531 RESOLVED: There are several new TexParameter queries, and the values they 532 return depend on how the texture was created: 533 534 - If the texture is in its initial state or the data store was created 535 with TexImage, then all five new parameters are zero. 536 537 - If the texture was created with TexStorage, then the parameters take 538 their values from the arguments, with both MIN parameters being zero, 539 both LEVELS parameters being <levels>, and NUM_LAYERS being the number 540 of layers if it's an array texture. 541 542 - If the texture was created with TextureView, then the VIEW parameters 543 describe the texture's subset of the entire data store, and 544 IMMUTABLE_LEVELS is inherited from the original texture. 545 546 (12) Are uses of two different views of the same data store automatically 547 coherent? 548 549 RESOLVED: Yes, to the extent that they were for a single texture. A few 550 examples of this are: 551 552 - TexSubImage to view A followed by texturing from view B. 553 554 - Rendering to view A attached to an FBO followed by texturing from 555 view B. 556 557 - Shader image stores to view A followed by texturing from view B. 558 559 The first two cases would automatically work correctly if A and B were 560 the same texture, as described in Appendix D, so they continue to work 561 with separate views. If an implementation were (for example) tracking 562 uses of the texture to do cache invalidations, it should do such 563 tracking on the data store instead. 564 565 The third case would not automatically work if A and B were the same 566 texture, instead requiring a MemoryBarrier call to force coherency. This 567 same solution applies with texture views. 568 569 (13) Are interactions with ETC2/EAC compressed texture formats defined? 570 571 RESOLVED: No. It is likely that these formats are emulated with 572 uncompressed internal formats on older hardware, and the resulting 573 complications make defining texture view classes for these formats too 574 difficult for too little functionality. 575 576 577Revision History 578 579 Rev. Date Author Changes 580 ---- -------- -------- ----------------------------------------- 581 5 10/08/13 Jon Leech Add issue 13 discussing why ETC2/EAC view 582 classes aren't supported (Bug 11011). 583 4 07/15/13 Jon Leech Change "Class" column of table 3.X.2 from 584 abstract names to VIEW_CLASS_* enums from 585 ARB_internalformat_query2 (Bug 10518). 586 3 08/13/12 Jon Leech Renumbered from #142 to #124 587 2 05/07/12 dgkoch Added class names to Table 3.X.2 588 1 jbolz Internal revisions. 589