1*8975f5c5SAndroid Build Coastguard WorkerName 2*8975f5c5SAndroid Build Coastguard Worker 3*8975f5c5SAndroid Build Coastguard Worker ANGLE_robust_resource_initialization 4*8975f5c5SAndroid Build Coastguard Worker 5*8975f5c5SAndroid Build Coastguard WorkerName Strings 6*8975f5c5SAndroid Build Coastguard Worker 7*8975f5c5SAndroid Build Coastguard Worker GL_ANGLE_robust_resource_initialization 8*8975f5c5SAndroid Build Coastguard Worker 9*8975f5c5SAndroid Build Coastguard WorkerContributors 10*8975f5c5SAndroid Build Coastguard Worker 11*8975f5c5SAndroid Build Coastguard Worker Geoff Lang, Google 12*8975f5c5SAndroid Build Coastguard Worker Ken Russell, Google 13*8975f5c5SAndroid Build Coastguard Worker 14*8975f5c5SAndroid Build Coastguard WorkerContacts 15*8975f5c5SAndroid Build Coastguard Worker 16*8975f5c5SAndroid Build Coastguard Worker Shannon Woods, Google (shannonwoods 'at' google.com) 17*8975f5c5SAndroid Build Coastguard Worker 18*8975f5c5SAndroid Build Coastguard WorkerStatus 19*8975f5c5SAndroid Build Coastguard Worker 20*8975f5c5SAndroid Build Coastguard Worker Draft 21*8975f5c5SAndroid Build Coastguard Worker 22*8975f5c5SAndroid Build Coastguard WorkerVersion 23*8975f5c5SAndroid Build Coastguard Worker 24*8975f5c5SAndroid Build Coastguard Worker Version 5, September 30, 2021 25*8975f5c5SAndroid Build Coastguard Worker 26*8975f5c5SAndroid Build Coastguard WorkerNumber 27*8975f5c5SAndroid Build Coastguard Worker 28*8975f5c5SAndroid Build Coastguard Worker OpenGL ES Extension TBD 29*8975f5c5SAndroid Build Coastguard Worker 30*8975f5c5SAndroid Build Coastguard WorkerDependencies 31*8975f5c5SAndroid Build Coastguard Worker 32*8975f5c5SAndroid Build Coastguard Worker OpenGL ES 2.0 is required. 33*8975f5c5SAndroid Build Coastguard Worker 34*8975f5c5SAndroid Build Coastguard Worker This extension is written against the wording of the OpenGL ES 35*8975f5c5SAndroid Build Coastguard Worker 3.1 specification. 36*8975f5c5SAndroid Build Coastguard Worker 37*8975f5c5SAndroid Build Coastguard Worker EGL_ANGLE_robust_initialization is required to request a 38*8975f5c5SAndroid Build Coastguard Worker context that supports this extension, and resource initialization. 39*8975f5c5SAndroid Build Coastguard Worker 40*8975f5c5SAndroid Build Coastguard WorkerOverview 41*8975f5c5SAndroid Build Coastguard Worker 42*8975f5c5SAndroid Build Coastguard Worker This extension specifies the behavior for initialization of 43*8975f5c5SAndroid Build Coastguard Worker resources such as textures and buffers to default values. This 44*8975f5c5SAndroid Build Coastguard Worker initialization ensures that access will not be provided by the 45*8975f5c5SAndroid Build Coastguard Worker GL to previously allocated data not owned by the application. 46*8975f5c5SAndroid Build Coastguard Worker 47*8975f5c5SAndroid Build Coastguard WorkerNew Types 48*8975f5c5SAndroid Build Coastguard Worker 49*8975f5c5SAndroid Build Coastguard Worker None 50*8975f5c5SAndroid Build Coastguard Worker 51*8975f5c5SAndroid Build Coastguard WorkerNew Procedures and Functions 52*8975f5c5SAndroid Build Coastguard Worker 53*8975f5c5SAndroid Build Coastguard Worker None 54*8975f5c5SAndroid Build Coastguard Worker 55*8975f5c5SAndroid Build Coastguard WorkerNew Tokens 56*8975f5c5SAndroid Build Coastguard Worker 57*8975f5c5SAndroid Build Coastguard Worker Accepted by the <value> parameter of GetBooleanv, GetIntegerv, 58*8975f5c5SAndroid Build Coastguard Worker GetFloatv, GetDoublev, GetInteger64v, and IsEnabled: 59*8975f5c5SAndroid Build Coastguard Worker 60*8975f5c5SAndroid Build Coastguard Worker ROBUST_RESOURCE_INITIALIZATION_ANGLE 0x93A7 61*8975f5c5SAndroid Build Coastguard Worker 62*8975f5c5SAndroid Build Coastguard Worker Accepted by the <pname> parameter of GetTexParameteriv, 63*8975f5c5SAndroid Build Coastguard Worker GetTexParameterfv, GetTexLevelParameteriv, GetTexLevelParameterfv, 64*8975f5c5SAndroid Build Coastguard Worker GetRenderbufferParameteriv, GetBufferParameteriv and 65*8975f5c5SAndroid Build Coastguard Worker GetBufferParameteri64v: 66*8975f5c5SAndroid Build Coastguard Worker 67*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE 0x969F 68*8975f5c5SAndroid Build Coastguard Worker 69*8975f5c5SAndroid Build Coastguard Worker 70*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 6 of the OpenGL ES 3.1 Specification (Buffer 71*8975f5c5SAndroid Build Coastguard WorkerObjects) 72*8975f5c5SAndroid Build Coastguard Worker 73*8975f5c5SAndroid Build Coastguard Worker Replace the last sentence of the first paragraph of section 6.2 74*8975f5c5SAndroid Build Coastguard Worker "BufferData": 75*8975f5c5SAndroid Build Coastguard Worker 76*8975f5c5SAndroid Build Coastguard Worker If <data> is NULL, and robust resource initialization is enabled, 77*8975f5c5SAndroid Build Coastguard Worker the contents of the buffer object's data store are set to zero. 78*8975f5c5SAndroid Build Coastguard Worker Otherwise, the contents of the buffer object's data store are 79*8975f5c5SAndroid Build Coastguard Worker undefined. 80*8975f5c5SAndroid Build Coastguard Worker 81*8975f5c5SAndroid Build Coastguard Worker Add to Table 6.2: Buffer object parameters and their values: 82*8975f5c5SAndroid Build Coastguard Worker 83*8975f5c5SAndroid Build Coastguard Worker Name Type Initial Value Legal Values 84*8975f5c5SAndroid Build Coastguard Worker ---- ---- ------------- ------------ 85*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE boolean TRUE TRUE, FALSE 86*8975f5c5SAndroid Build Coastguard Worker 87*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 8 of the OpenGL ES 3.1 Specification (Textures and 88*8975f5c5SAndroid Build Coastguard WorkerSamplers) 89*8975f5c5SAndroid Build Coastguard Worker 90*8975f5c5SAndroid Build Coastguard Worker Replace the first two sentences of the final paragraph in section 91*8975f5c5SAndroid Build Coastguard Worker 8.5.3 "Texture Image Structure": 92*8975f5c5SAndroid Build Coastguard Worker 93*8975f5c5SAndroid Build Coastguard Worker If the <data> argument of TexImage2D or TexImage3D is NULL, and the 94*8975f5c5SAndroid Build Coastguard Worker pixel unpack buffer object is zero, a two- or three-dimensional 95*8975f5c5SAndroid Build Coastguard Worker texel array is created with the specified <target>, <level>, 96*8975f5c5SAndroid Build Coastguard Worker <internalformat>, <border>, <width>, <height>, and <depth>. If 97*8975f5c5SAndroid Build Coastguard Worker robust resource initialization is enabled, the contents of the image 98*8975f5c5SAndroid Build Coastguard Worker are initialized as though a clear value were provided for each 99*8975f5c5SAndroid Build Coastguard Worker component of each pixel, and processed and transferred to the GL 100*8975f5c5SAndroid Build Coastguard Worker as described above. The components comprising this clear-value-filled data 101*8975f5c5SAndroid Build Coastguard Worker are determined by <internalformat>. If robust resource 102*8975f5c5SAndroid Build Coastguard Worker initialization is not enabled, the image contents are undefined, and 103*8975f5c5SAndroid Build Coastguard Worker no pixel processing is performed. In either case, no pixel values 104*8975f5c5SAndroid Build Coastguard Worker are accessed in client memory. For depth components the clear value is the 105*8975f5c5SAndroid Build Coastguard Worker value that is interpreted as 1.0. For all other components the clear value 106*8975f5c5SAndroid Build Coastguard Worker is zero. 107*8975f5c5SAndroid Build Coastguard Worker 108*8975f5c5SAndroid Build Coastguard Worker Replace the first sentence of the fifth paragraph in section 8.8 109*8975f5c5SAndroid Build Coastguard Worker "Multisample Textures": 110*8975f5c5SAndroid Build Coastguard Worker 111*8975f5c5SAndroid Build Coastguard Worker Upon success, TexStorage2DMultisample deletes any existing image 112*8975f5c5SAndroid Build Coastguard Worker for target. If robust resource initialization is enabled, the 113*8975f5c5SAndroid Build Coastguard Worker contents of each texel are initialized as though a zero value were 114*8975f5c5SAndroid Build Coastguard Worker written to each channel of each sample; otherwise the contents of 115*8975f5c5SAndroid Build Coastguard Worker texels are undefined. 116*8975f5c5SAndroid Build Coastguard Worker 117*8975f5c5SAndroid Build Coastguard Worker Add to the final paragraph of section 8.17 "Immutable-Format Texture 118*8975f5c5SAndroid Build Coastguard Worker Images": 119*8975f5c5SAndroid Build Coastguard Worker 120*8975f5c5SAndroid Build Coastguard Worker If robust resource initialization is enabled, the contents of each 121*8975f5c5SAndroid Build Coastguard Worker texel is initialized as though a zero value were provided for each 122*8975f5c5SAndroid Build Coastguard Worker component of each pixel, and processed and transferred to the GL 123*8975f5c5SAndroid Build Coastguard Worker as for a call to the appropriate TexSubImage* call for <target>. 124*8975f5c5SAndroid Build Coastguard Worker Otherwise, the contents of texels are undefined. 125*8975f5c5SAndroid Build Coastguard Worker 126*8975f5c5SAndroid Build Coastguard Worker Add to Table 8.20: Texture parameters and their values: 127*8975f5c5SAndroid Build Coastguard Worker 128*8975f5c5SAndroid Build Coastguard Worker Name Type Legal Values 129*8975f5c5SAndroid Build Coastguard Worker ---- ---- ------------ 130*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE boolean TRUE, FALSE 131*8975f5c5SAndroid Build Coastguard Worker 132*8975f5c5SAndroid Build Coastguard Worker Add to the end of section 8.10.3 "Texture Level Parameter Queries": 133*8975f5c5SAndroid Build Coastguard Worker 134*8975f5c5SAndroid Build Coastguard Worker Queries of pname RESOURCE_INITIALIZED_ANGLE return the initialization 135*8975f5c5SAndroid Build Coastguard Worker state of the image. 136*8975f5c5SAndroid Build Coastguard Worker 137*8975f5c5SAndroid Build Coastguard WorkerAdditions to Chapter 9 of the OpenGL ES 3.1 Specification (Framebuffers 138*8975f5c5SAndroid Build Coastguard Workerand Framebuffer Objects) 139*8975f5c5SAndroid Build Coastguard Worker 140*8975f5c5SAndroid Build Coastguard Worker Replace the sentence in section 9.2.4 "Renderbuffer Objects" 141*8975f5c5SAndroid Build Coastguard Worker beginning "Upon success, RenderbufferStorageMultisample": 142*8975f5c5SAndroid Build Coastguard Worker 143*8975f5c5SAndroid Build Coastguard Worker Upon success, RenderbufferStorageMultisample deletes any existing 144*8975f5c5SAndroid Build Coastguard Worker data store for the renderbuffer image. If robust resource 145*8975f5c5SAndroid Build Coastguard Worker initialization is enabled, the contents of each pixel in the data 146*8975f5c5SAndroid Build Coastguard Worker store are initialized as though a clear value was written to each 147*8975f5c5SAndroid Build Coastguard Worker channel of each sample; otherwise, the contents of the data store 148*8975f5c5SAndroid Build Coastguard Worker are undefined. For depth components the clear value is the 149*8975f5c5SAndroid Build Coastguard Worker value that is interpreted 1.0. For all other components the clear 150*8975f5c5SAndroid Build Coastguard Worker value is zero. 151*8975f5c5SAndroid Build Coastguard Worker 152*8975f5c5SAndroid Build Coastguard Worker Add to the end of section 9.2.6 "Renderbuffer Object Queries": 153*8975f5c5SAndroid Build Coastguard Worker 154*8975f5c5SAndroid Build Coastguard Worker If pname is RESOURCE_INITIALIZED_ANGLE then params will contain the 155*8975f5c5SAndroid Build Coastguard Worker initialization state of the renderbuffer currently bound to target. 156*8975f5c5SAndroid Build Coastguard Worker 157*8975f5c5SAndroid Build Coastguard WorkerInteractions with EGL_ANGLE_create_context_robust_resource_initialization 158*8975f5c5SAndroid Build Coastguard Worker 159*8975f5c5SAndroid Build Coastguard Worker If the EGL window-system binding API is used to create a context, 160*8975f5c5SAndroid Build Coastguard Worker the EGL_ANGLE_create_context_robust_initialization extension is 161*8975f5c5SAndroid Build Coastguard Worker supported, and the attribute 162*8975f5c5SAndroid Build Coastguard Worker EGL_CONTEXT_ROBUST_RESOURCE_INITIALIZATION_ANGLE is set to 163*8975f5c5SAndroid Build Coastguard Worker EGL_TRUE when eglCreateContext is called, the resulting context 164*8975f5c5SAndroid Build Coastguard Worker will perform robust resource initialization as described above in 165*8975f5c5SAndroid Build Coastguard Worker section <section>, and the 166*8975f5c5SAndroid Build Coastguard Worker CONTEXT_ROBUST_RESOURCE_INITIALIZATION_ANGLE 167*8975f5c5SAndroid Build Coastguard Worker query will return GL_TRUE as described above in section 2.6.1.1. 168*8975f5c5SAndroid Build Coastguard Worker Otherwise queries will return GL_FALSE. 169*8975f5c5SAndroid Build Coastguard Worker 170*8975f5c5SAndroid Build Coastguard WorkerNew State 171*8975f5c5SAndroid Build Coastguard Worker 172*8975f5c5SAndroid Build Coastguard Worker (add to Table 20.4: Buffer Object State) 173*8975f5c5SAndroid Build Coastguard Worker 174*8975f5c5SAndroid Build Coastguard Worker Initial 175*8975f5c5SAndroid Build Coastguard Worker Get Value Type Get Command Value Description Sec. 176*8975f5c5SAndroid Build Coastguard Worker ---------------------- ---- ------------------- ------ --------------------------- ------ 177*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE B GetBufferParameteriv TRUE Buffer data has been 6.6 178*8975f5c5SAndroid Build Coastguard Worker initialized 179*8975f5c5SAndroid Build Coastguard Worker 180*8975f5c5SAndroid Build Coastguard Worker (add to Table 20.9: Textures (state per texture object)) 181*8975f5c5SAndroid Build Coastguard Worker 182*8975f5c5SAndroid Build Coastguard Worker Initial 183*8975f5c5SAndroid Build Coastguard Worker Get Value Type Get Command Value Description Sec. 184*8975f5c5SAndroid Build Coastguard Worker ---------------------- ---- ------------------- ------ --------------------------- ------ 185*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE B GetTexParameteriv TRUE All specified images have 8.10.2 186*8975f5c5SAndroid Build Coastguard Worker been initialized 187*8975f5c5SAndroid Build Coastguard Worker 188*8975f5c5SAndroid Build Coastguard Worker (add to Table 20.10 Textures (state per texture image)) 189*8975f5c5SAndroid Build Coastguard Worker 190*8975f5c5SAndroid Build Coastguard Worker Initial 191*8975f5c5SAndroid Build Coastguard Worker Get Value Type Get Command Value Description Sec. 192*8975f5c5SAndroid Build Coastguard Worker ---------------------- ---- ------------------- ------ --------------------------- ------ 193*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE B GetTexLevelParameteriv TRUE Image data has been 8.10.3 194*8975f5c5SAndroid Build Coastguard Worker initialized 195*8975f5c5SAndroid Build Coastguard Worker 196*8975f5c5SAndroid Build Coastguard Worker (add to Table 20.16: Renderbuffer (state per renderbuffer object)) 197*8975f5c5SAndroid Build Coastguard Worker 198*8975f5c5SAndroid Build Coastguard Worker Initial 199*8975f5c5SAndroid Build Coastguard Worker Get Value Type Get Command Value Description Sec. 200*8975f5c5SAndroid Build Coastguard Worker ---------------------- ---- ------------------- ------ --------------------------- ------ 201*8975f5c5SAndroid Build Coastguard Worker RESOURCE_INITIALIZED_ANGLE B GetRenderbufferParameteriv TRUE Renderbuffer data has been 9.2.6 202*8975f5c5SAndroid Build Coastguard Worker initialized 203*8975f5c5SAndroid Build Coastguard Worker 204*8975f5c5SAndroid Build Coastguard WorkerIssues 205*8975f5c5SAndroid Build Coastguard Worker 206*8975f5c5SAndroid Build Coastguard Worker None 207*8975f5c5SAndroid Build Coastguard Worker 208*8975f5c5SAndroid Build Coastguard WorkerRevision History 209*8975f5c5SAndroid Build Coastguard Worker 210*8975f5c5SAndroid Build Coastguard Worker Version 1, 2015/01/07 - first draft. 211*8975f5c5SAndroid Build Coastguard Worker Version 2, 2017/03/07 - fixed EGL naming and added IsEnabled. 212*8975f5c5SAndroid Build Coastguard Worker Version 3, 2017/09/19 - name cleanup. 213*8975f5c5SAndroid Build Coastguard Worker Version 4, 2020/10/12 - Add RESOURCE_INITIALIZED_ANGLE queries. 214*8975f5c5SAndroid Build Coastguard Worker Version 5, 2021/09/30 - Specify that depth components are cleared to 1.0. 215