xref: /aosp_15_r20/external/angle/extensions/EGL_ANGLE_external_context_and_surface.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_external_context_and_surface
4
5Name Strings
6
7    EGL_ANGLE_external_context_and_surface
8
9Contributors
10
11    Peng Huang
12    Shahbaz Youssefi
13
14Contacts
15
16    Shahbaz Youssefi, Google (syoussefi 'at' google.com)
17
18Status
19
20    Draft
21
22Version
23
24    Version 2, July 24, 2023
25
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 plugging an external OpenGL context and surface to
38    the OpenGL backend of ANGLE.
39
40New Types
41
42    None
43
44New Procedures and Functions
45
46    void eglAcquireExternalContextANGLE(
47        EGLDisplay dpy);
48    void eglReleaseExternalContextANGLE(
49        EGLDisplay dpy);
50
51New Tokens
52
53    Accepted as an attribute name in the <*attrib_list> argument to
54    eglCreateContext:
55
56        EGL_EXTERNAL_CONTEXT_ANGLE 0x348E
57
58    Accepted in the <buftype> parameter of eglCreatePbufferFromClientBuffer:
59
60        EGL_EXTERNAL_SURFACE_ANGLE 0x348F
61
62Additions to the EGL 1.4 Specification
63
64    Add the following to section 3.7.1 "Creating Rendering Contexts":
65
66    EGL_EXTERNAL_CONTEXT_ANGLE indicates whether the context is externally
67    managed, and that no internal context is created.
68    In this case, the context must be made current by the application before
69    calling other EGL or GL functions that may access the context.
70
71    Add the following to section 3.5.3 "Binding Off-Screen Rendering Surfaces
72    To Client Buffers":
73
74    EGL_EXTERNAL_SURFACE_ANGLE indicates whether the surface is externally
75    managed, and that no internal surface is created.
76    In this case, the surface must be made current by the application before
77    calling other EGL or GL functions that may access the surface.
78
79    Add the following to section 3.7.3 "Binding Contexts and Drawables":
80
81    Before making a call that uses a context created with
82    EGL_EXTERNAL_CONTEXT_ANGLE, the context must be synchronized from external.
83    eglAcquireExternalContextANGLE can be called to perform this
84    synchronization, ensuring that the implementation is up-to-date with
85    respect to changes that external has made to the context.
86
87    Before the application (external) can continue using the context after the
88    implementation has modified it, the context must be synchronized to
89    external, restoring the state from when the external context was
90    "acquired".
91    eglReleaseExternalContextANGLE can be called to perform this
92    synchronization, ensuring that the context is restored to its original
93    state from before the eglAcquireExternalContextANGLE call.
94
95Issues
96
97    None yet.
98
99Revision History
100
101    Rev.    Date         Author     Changes
102    ----  -------------  ---------  ----------------------------------------
103      1   Jan 7, 2021    penghuang  Initial version
104      2   July 24, 2023  syoussefi  Add eglAcquireExternalContextANGLE, and
105                                      eglReleaseExternalContextANGLE
106      3   July 27, 2023  syoussefi  Remove EGL_EXTERNAL_CONTEXT_SAVE_STATE_ANGLE
107