blob: 8206eab38942b4cf637e46eae6215d7cd27cb836 [file] [log] [blame]
Alexis Hetuc80eada2018-02-13 15:02:40 -05001Name
2
3 ANGLE_iosurface_client_buffer
4
5Name Strings
6
7 EGL_ANGLE_iosurface_client_buffer
8
9Contributors
10
11 Corentin Wallez
12 Geoff Lang
Geoff Langdbb6f3f2019-08-21 15:09:44 -040013 James Darpinian
Alexis Hetuc80eada2018-02-13 15:02:40 -050014
15Contacts
16
17 Corentin Wallez, Google Inc. (cwallez 'at' google.com)
18
19Status
20
21 Draft
22
23Version
Geoff Langdbb6f3f2019-08-21 15:09:44 -040024 Version 3, Aug 13, 2019
Alexis Hetuc80eada2018-02-13 15:02:40 -050025
26Number
27
28 EGL Extension #??
29
30Dependencies
31
32 This extension is written against the wording of the EGL 1.4
33 Specification.
34
35Overview
36
37 This extension allows creating EGL surfaces from IOSurface objects.
38
39New Types
40
41 None
42
43New Procedures and Functions
44
45 None
46
47New 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
57Additions 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
Geoff Langdbb6f3f2019-08-21 15:09:44 -040099 GL_UNSIGNED_BYTE GL_RGB
Alexis Hetuc80eada2018-02-13 15:02:40 -0500100 GL_UNSIGNED_BYTE GL_BGRA_EXT
101 GL_HALF_FLOAT GL_RGBA
102 ---------------------------------------------------------------------------
103 Table egl.iosurface.formats - Valid combinations of format, type and
104 internal format for IOSurface-backed pbuffers.
105 ---------------------------------------------------------------------------
106
107 Append to the end of Section 3.5.3.
108 "When a pbuffer is created with type EGL_IOSURFACE_ANGLE, the contents
109 of the associcated IOSurface object are undefined while the pbuffer is
110 bound to a client texture."
111
Alexis Hetuc80eada2018-02-13 15:02:40 -0500112Issues
113
Geoff Langdbb6f3f2019-08-21 15:09:44 -0400114 1. Can RGB formats be supported?
115
116 RESOLVED: Support for RGB internal formats is added in version 3. Surfaces
117 with an RGB format will ensure that the alpha channel of the IOSurface is
118 reset to 1.0 when it is used.
Alexis Hetuc80eada2018-02-13 15:02:40 -0500119
120Revision History
121
122 Version 1, 2017/12/06 - first draft.
Geoff Langdbb6f3f2019-08-21 15:09:44 -0400123 Version 2, 2019/04/01 - Allow MakeCurrent.
124 Version 3, 2019/08/13 - Allow RGB internal formats