1 Name 2 3 ANGLE_iosurface_client_buffer 4 5 Name Strings 6 7 EGL_ANGLE_iosurface_client_buffer 8 9 Contributors 10 11 Corentin Wallez 12 Geoff Lang 13 14 Contacts 15 16 Corentin Wallez, Google Inc. (cwallez 'at' google.com) 17 18 Status 19 20 Draft 21 22 Version 23 24 Version 1, Dec 6, 2017 25 26 Number 27 28 EGL Extension #?? 29 30 Dependencies 31 32 This extension is written against the wording of the EGL 1.4 33 Specification. 34 35 Overview 36 37 This extension allows creating EGL surfaces from IOSurface objects. 38 39 New Types 40 41 None 42 43 New Procedures and Functions 44 45 None 46 47 New Tokens 48 49 Accepted in the <buftype> parameter of eglCreatePbufferFromClientBuffer: 50 51 EGL_IOSURFACE_ANGLE 0x3454 52 EGL_IOSURFACE_PLANE_ANGLE 0x345A 53 EGL_TEXTURE_RECTANGLE_ANGLE 0x345B 54 EGL_TEXTURE_TYPE_ANGLE 0x345C 55 EGL_TEXTURE_INTERNAL_FORMAT_ANGLE 0x345D 56 57 Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors) 58 59 Replace the last sentence of paragraph 1 of Section 3.5.3 with the 60 following text. 61 "Currently, the only client API resources which may be bound in this 62 fashion are OpenVG VGImage objects and IOSurface objects." 63 64 Replace the third paragraph of Section 3.5.3 with the following text. 65 "<buftype> specifies the type of buffer to be bound. The only allowed values 66 of <buftype> are EGL_OPENVG_IMAGE and EGL_IOSURFACE_ANGLE". 67 68 Append the following text to the fourth paragraph of Section 3.5.3. 69 "When <buftype> is EGL_IOSURFACE_ANGLE, <buffer> must be a valid IOSurface 70 object case into the type EGLClientBuffer." 71 72 Append to the end of Section 3.5.3. 73 "When <buftype> is EGL_IOSURFACE_ANGLE, <attrib_list> must contain all the 74 following attributes otherwise EGL_BAD_PARAMETER is generated. The 75 attributes must satisfy the following constraints otherwise 76 EGL_BAD_ATTRIBUTE is generated: 77 - EGL_TEXTURE_TYPE_ANGLE, and EGL_TEXTURE_INTERNAL_FORMAT_ANGLE followed 78 by OpenGL enums for texture types, and texture internal format 79 respectively. 80 - EGL_TEXTURE_FORMAT with a value of EGL_TEXTURE_RGBA 81 - EGL_WIDTH with a value between 1 and the width of <buffer>. 82 - EGL_HEIGHT with a value between 1 and the height of <buffer>. 83 - EGL_TEXTURE_TARGET with a value of EGL_TEXTURE_RECTANGLE_ANGLE 84 - EGL_IOSURFACE_PLANE_ANGLE with a value between 0 and the number of 85 planes of <buffer> (exclusive). 86 87 In addition the EGL_TEXTURE_TYPE_ANGLE and 88 EGL_TEXTURE_INTERNAL_FORMAT_ANGLE attributes must be one of the 89 combinations listed in table egl.iosurface.formats or an 90 EGL_BAD_PARAMETER is generated. The combination must also be a valid 91 combinations for glTexImage2D or EGL_BAD_PARAMETER is generated." 92 93 --------------------------------------------------------------------------- 94 Texture Type Texture Internal Format 95 --------------------------------------------------------------------------- 96 GL_UNSIGNED_BYTE GL_RED 97 GL_UNSIGNED_SHORT GL_R16UI 98 GL_UNSIGNED_BYTE GL_RG 99 GL_UNSIGNED_BYTE GL_BGRA_EXT 100 GL_HALF_FLOAT GL_RGBA 101 --------------------------------------------------------------------------- 102 Table egl.iosurface.formats - Valid combinations of format, type and 103 internal format for IOSurface-backed pbuffers. 104 --------------------------------------------------------------------------- 105 106 Append to the end of Section 3.5.3. 107 "When a pbuffer is created with type EGL_IOSURFACE_ANGLE, the contents 108 of the associcated IOSurface object are undefined while the pbuffer is 109 bound to a client texture." 110 111 Append to the list of errors generated by eglMakeCurrent in Section 3.7.3: 112 " - If either draw or read are pbuffers created with 113 eglCreatePbufferFromClientBuffer with <buftype> set to EGL_IOSURFACE_ANGLE, 114 an EGL_BAD_SURFACE is generated." 115 116 Issues 117 118 There are no issues, please move on. 119 120 Revision History 121 122 Version 1, 2017/12/06 - first draft. 123