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