xref: /aosp_15_r20/external/angle/extensions/EGL_ANGLE_platform_angle.txt (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1Name
2
3    ANGLE_platform_angle
4
5Name Strings
6
7    EGL_ANGLE_platform_angle
8
9Contributors
10
11    Scott Graham, Google
12    Shannon Woods, Google
13    Geoff Lang, Google
14
15Contacts
16
17    Scott Graham, Google (scottmg 'at' google 'dot' com)
18
19Status
20
21    Draft
22
23Version
24
25    Version 5, 2017-12-28
26
27Number
28
29    EGL Extension XXX
30
31Extension Type
32
33    EGL client extension
34
35Dependencies
36
37    Requires EGL_EXT_client_extensions to query its existence without
38    a display.
39
40    Requires EGL_EXT_platform_base.
41
42    This extension is written against the wording of version 9 of the
43    EGL_EXT_platform_base specification.
44
45    ANGLE_platform_angle_d3d affects the definition of this extension.
46    ANGLE_platform_angle_opengl affects the definition of this extension.
47
48Overview
49
50    This extension defines how to create EGL resources from native resources
51    using the functions defined by EGL_EXT_platform_base.
52
53New Types
54
55    None
56
57New Procedures and Functions
58
59    None
60
61New Tokens
62
63    Accepted as the <platform> argument of eglGetPlatformDisplayEXT:
64
65        EGL_PLATFORM_ANGLE_ANGLE                           0x3202
66
67    Accepted as an attribute name in the <attrib_list> argument of
68    eglGetPlatformDisplayEXT:
69
70        EGL_PLATFORM_ANGLE_TYPE_ANGLE                      0x3203
71        EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE         0x3204
72        EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE         0x3205
73        EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED            0x3451
74        EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE      0x348F
75
76    Accepted as values for the EGL_PLATFORM_ANGLE_TYPE_ANGLE attribute:
77
78        EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE              0x3206
79
80    Accepted as values for the EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE attribute:
81
82        EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE      0x320A
83        EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE          0x345E
84
85    Accepted as values for the EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE
86    attribute:
87
88        EGL_PLATFORM_X11_EXT                               0x31D5
89        EGL_PLATFORM_DEVICE_EXT                            0x313F
90        EGL_PLATFORM_SURFACELESS_MESA                      0x31DD
91
92Additions to the EGL Specification
93
94    None.
95
96New Behavior
97
98    To determine if the EGL implementation supports this extension, clients
99    should query the EGL_EXTENSIONS string of EGL_NO_DISPLAY.
100
101    To obtain an EGLDisplay backed by a ANGLE display, call
102    eglGetPlatformDisplayEXT with <platform> set to EGL_PLATFORM_ANGLE_ANGLE.
103
104    The <native_display> parameter is of type EGLNativeDisplayType. If
105    <native_display> is EGL_DEFAULT_DISPLAY a default display is returned.
106    Multiple calls with the same parameters will return the same EGLDisplay
107    handle. If <platform> is set to EGL_PLATFORM_ANGLE_ANGLE and the returned
108    display is in an uninitialized state, its attributes are overwritten by
109    those provided in the <attrib_list>, if any.
110
111    If no <attrib_list> is specified, the value of
112    EGL_PLATFORM_ANGLE_TYPE_ANGLE is implicitly set to
113    EGL_PLATFORM_ANGLE_TYPE_DEFAULT_ANGLE.
114
115    If no <attrib_list> is specified, the values of
116    EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE and
117    EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE are implicitly set to
118    EGL_DONT_CARE.
119
120    If no <attrib_list> is specified, the value of
121    EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED is implicitly set to
122    EGL_DONT_CARE.
123
124    If no <attrib_list> is specified to eglGetPlatformDisplayEXT, the value of
125    EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE is implicitly set to
126    EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE. Otherwise, the value of
127    EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE should be:
128      - EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE to request a hardware
129        accelerated device.
130      - EGL_PLATFORM_ANGLE_DEVICE_TYPE_NULL_ANGLE to request a no-op driver
131        for testing. If unavailable, the implementation will fall back to
132        EGL_PLATFORM_ANGLE_DEVICE_TYPE_HARDWARE_ANGLE.
133
134    If EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE is set to EGL_DONT_CARE and
135    EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE is not set to EGL_DONT_CARE,
136    an EGL_BAD_ATTRIBUTE error is generated and EGL_NO_DISPLAY is returned.
137
138    If no display matching the requested <native_display> or of the type
139    requested by the value of EGL_PLATFORM_ANGLE_TYPE_ANGLE is available,
140    EGL_NO_DISPLAY is returned. No error condition is raised in this case.
141
142    If EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED is specified, it
143    controls enabling back-end validation layers. EGL_TRUE enables
144    validation and EGL_FALSE disables it. If it is set to EGL_DONT_CARE, the
145    default setting depends on the implementation. Any value other than these
146    will result in an error.
147
148    EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE is an additional optional
149    attribute that helps ANGLE to identify what native underlaying platform
150    it should use. If no display matching the requested type of native platform
151    found, EGL_NO_DISPLAY should be returned. if no <attrib_list> is specified
152    to eglGetPlatformDisplayEXT, ANGLE is free to make the choice.
153
154Issues
155
156    1) Should the validation layers default to on, off, or no guarantee?
157
158       Defaulting to off offers some consistency. However, it's customary for
159       some applications like ANGLE to turn on debugging features by default
160       in Debug builds.
161
162       RESOLVED: default to implementation-dependent behaviour.
163
164Revision History
165
166    Version 1, 2014-02-04 (Scott Graham)
167      - Initial draft
168    Version 2, 2014-06-05 (Geoff Lang)
169      - Rename extension from ANGLE_platform_angle_d3d to ANGLE_platform_angle.
170      - Add sub-extensions for specific platforms.
171    Version 3, 2014-10-20 (Geoff Lang)
172      - Add attributes to request specific feature level and context versions.
173      - Moved descriptions of platforms to child extension specs.
174    Version 4, 2017-07-19 (Jamie Madill)
175      - Add a debug layers enabled attribute to control runtime validation.
176    Version 5, 2017-12-28 (Jamie Madill)
177      - Expose device type selection.
178    Version 6, 2020-05-28 (Maksim Sisov)
179      - Add EGL_PLATFORM_ANGLE_NATIVE_PLATFORM_TYPE_ANGLE attribute.
180