Path: blob/main_old/extensions/ANGLE_robust_resource_initialization.txt
1693 views
Name12ANGLE_robust_resource_initialization34Name Strings56GL_ANGLE_robust_resource_initialization78Contributors910Geoff Lang, Google11Ken Russell, Google1213Contacts1415Shannon Woods, Google (shannonwoods 'at' google.com)1617Status1819Draft2021Version2223Version 3, September 19, 20172425Number2627OpenGL ES Extension TBD2829Dependencies3031OpenGL ES 2.0 is required.3233This extension is written against the wording of the OpenGL ES343.1 specification.3536EGL_ANGLE_robust_initialization is required to request a37context that supports this extension, and resource initialization.3839Overview4041This extension specifies the behavior for initialization of42resources such as textures and buffers to default values. This43initialization ensures that access will not be provided by the44GL to previously allocated data not owned by the application.4546New Types4748None4950New Procedures and Functions5152None5354New Tokens5556Accepted by the <value> parameter of GetBooleanv, GetIntegerv,57GetFloatv, GetDoublev, GetInteger64v, and IsEnabled:5859ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x93A76061Accepted by the <pname> parameter of GetTexParameteriv,62GetTexParameterfv, GetTexLevelParameteriv, GetTexLevelParameterfv,63GetRenderbufferParameteriv, GetBufferParameteriv and64GetBufferParameteri64v:6566RESOURCE_INITIALIZED_ANGLE 0x969F676869Additions to Chapter 6 of the OpenGL ES 3.1 Specification (Buffer70Objects)7172Replace the last sentence of the first paragraph of section 6.273"BufferData":7475If <data> is NULL, and robust resource initialization is enabled,76the contents of the buffer object's data store are set to zero.77Otherwise, the contents of the buffer object's data store are78undefined.7980Add to Table 6.2: Buffer object parameters and their values:8182Name Type Initial Value Legal Values83---- ---- ------------- ------------84RESOURCE_INITIALIZED_ANGLE boolean TRUE TRUE, FALSE8586Additions to Chapter 8 of the OpenGL ES 3.1 Specification (Textures and87Samplers)8889Replace the first two sentances of the final paragraph in section908.5.3 "Texture Image Structure":9192If the <data> argument of TexImage2D or TexImage3D is NULL, and the93pixel unpack buffer object is zero, a two- or three-dimensional94texel array is created with the specified <target>, <level>,95<internalformat>, <border>, <width>, <height>, and <depth>. If96robust resource initialization is enabled, the contents of the image97are initialized as though a zero value were provided for each98component of each pixel, and processed and transferred to the GL99as described above. The components comprising this zero-filled data100are determined by <internalformat>. If robust resource101initialization is not enabled, the image contents are undefined, and102no pixel processing is performed. In either case, no pixel values103are accessed in client memory.104105Replace the first sentence of the fifth paragraph in section 8.8106"Multisample Textures":107108Upon success, TexStorage2DMultisample deletes any existing image109for target. If robust resource initialization is enabled, the110contents of each texel are initialized as though a zero value were111written to each channel of each sample; otherwise the contents of112texels are undefined.113114Add to the final paragraph of section 8.17 "Immutable-Format Texture115Images":116117If robust resource initialization is enabled, the contents of each118texel is initialized as though a zero value were provided for each119component of each pixel, and processed and transferred to the GL120as for a call to the appropriate TexSubImage* call for <target>.121Otherwise, the contents of texels are undefined.122123Add to Table 8.20: Texture parameters and their values:124125Name Type Legal Values126---- ---- ------------127RESOURCE_INITIALIZED_ANGLE boolean TRUE, FALSE128129Add to the end of section 8.10.3 "Texture Level Parameter Queries":130131Queries of pname RESOURCE_INITIALIZED_ANGLE return the initialization132state of the image.133134Additions to Chapter 9 of the OpenGL ES 3.1 Specification (Framebuffers135and Framebuffer Objects)136137Replace the sentence in section 9.2.4 "Renderbuffer Objects"138beginning "Upon success, RenderbufferStorageMultisample":139140Upon success, RenderbufferStorageMultisample deletes any existing141data store for the renderbuffer image. If robust resource142initialization is enabled, the contents of each pixel in the data143store are initialized as though a zero value was written to each144channel of each sample; otherwise, the contents of the data store145are undefined.146147Add to the end of section 9.2.6 "Renderbuffer Object Queries":148149If pname is RESOURCE_INITIALIZED_ANGLE then params will contain the150initialization state of the renderbuffer currently bound to target.151152Interactions with EGL_ANGLE_create_context_robust_resource_initialization153154If the EGL window-system binding API is used to create a context,155the EGL_ANGLE_create_context_robust_initialization extension is156supported, and the attribute157EGL_CONTEXT_ROBUST_RESOURCE_INITIALIZATION_ANGLE is set to158EGL_TRUE when eglCreateContext is called, the resulting context159will perform robust resource initialization as described above in160section <section>, and the161CONTEXT_ROBUST_RESOURCE_INITIALIZATION_ANGLE162query will return GL_TRUE as described above in section 2.6.1.1.163Otherwise queries will return GL_FALSE.164165New State166167(add to Table 20.4: Buffer Object State)168169Initial170Get Value Type Get Command Value Description Sec.171---------------------- ---- ------------------- ------ --------------------------- ------172RESOURCE_INITIALIZED_ANGLE B GetBufferParameteriv TRUE Buffer data has been 6.6173initialized174175(add to Table 20.9: Textures (state per texture object))176177Initial178Get Value Type Get Command Value Description Sec.179---------------------- ---- ------------------- ------ --------------------------- ------180RESOURCE_INITIALIZED_ANGLE B GetTexParameteriv TRUE All specified images have 8.10.2181been initialized182183(add to Table 20.10 Textures (state per texture image))184185Initial186Get Value Type Get Command Value Description Sec.187---------------------- ---- ------------------- ------ --------------------------- ------188RESOURCE_INITIALIZED_ANGLE B GetTexLevelParameteriv TRUE Image data has been 8.10.3189initialized190191(add to Table 20.16: Renderbuffer (state per renderbuffer object))192193Initial194Get Value Type Get Command Value Description Sec.195---------------------- ---- ------------------- ------ --------------------------- ------196RESOURCE_INITIALIZED_ANGLE B GetRenderbufferParameteriv TRUE Renderbuffer data has been 9.2.6197initialized198199Issues200201None202203Revision History204205Version 1, 2015/01/07 - first draft.206Version 2, 2017/03/07 - fixed EGL naming and added IsEnabled.207Version 3, 2017/09/19 - name cleanup.208Version 4, 2020/10/12 - Add RESOURCE_INITIALIZED_ANGLE queries.209210211