1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from egl.xml and egl_angle_ext.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // libEGL_autogen.cpp: Implements the exported EGL functions.
9
10 #include "anglebase/no_destructor.h"
11 #include "common/system_utils.h"
12
13 #include <memory>
14
15 #if defined(ANGLE_USE_EGL_LOADER)
16 # include "libEGL/egl_loader_autogen.h"
17 #else
18 # include "libGLESv2/entry_points_egl_autogen.h"
19 # include "libGLESv2/entry_points_egl_ext_autogen.h"
20 #endif // defined(ANGLE_USE_EGL_LOADER)
21
22 namespace
23 {
24 #if defined(ANGLE_USE_EGL_LOADER)
25 bool gLoaded = false;
26 void *gEntryPointsLib = nullptr;
27
GlobalLoad(const char * symbol)28 GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol)
29 {
30 return reinterpret_cast<GenericProc>(angle::GetLibrarySymbol(gEntryPointsLib, symbol));
31 }
32
EnsureEGLLoaded()33 void EnsureEGLLoaded()
34 {
35 if (gLoaded)
36 {
37 return;
38 }
39
40 std::string errorOut;
41 gEntryPointsLib = OpenSystemLibraryAndGetError(ANGLE_DISPATCH_LIBRARY,
42 angle::SearchType::ModuleDir, &errorOut);
43 if (gEntryPointsLib)
44 {
45 LoadLibEGL_EGL(GlobalLoad);
46 gLoaded = true;
47 }
48 else
49 {
50 fprintf(stderr, "Error loading EGL entry points: %s\n", errorOut.c_str());
51 }
52 }
53 #else
54 void EnsureEGLLoaded() {}
55 #endif // defined(ANGLE_USE_EGL_LOADER)
56 } // anonymous namespace
57
58 extern "C" {
59
60 // EGL 1.0
eglChooseConfig(EGLDisplay dpy,const EGLint * attrib_list,EGLConfig * configs,EGLint config_size,EGLint * num_config)61 EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy,
62 const EGLint *attrib_list,
63 EGLConfig *configs,
64 EGLint config_size,
65 EGLint *num_config)
66 {
67 EnsureEGLLoaded();
68 return EGL_ChooseConfig(dpy, attrib_list, configs, config_size, num_config);
69 }
70
eglCopyBuffers(EGLDisplay dpy,EGLSurface surface,EGLNativePixmapType target)71 EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy,
72 EGLSurface surface,
73 EGLNativePixmapType target)
74 {
75 EnsureEGLLoaded();
76 return EGL_CopyBuffers(dpy, surface, target);
77 }
78
eglCreateContext(EGLDisplay dpy,EGLConfig config,EGLContext share_context,const EGLint * attrib_list)79 EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy,
80 EGLConfig config,
81 EGLContext share_context,
82 const EGLint *attrib_list)
83 {
84 EnsureEGLLoaded();
85 return EGL_CreateContext(dpy, config, share_context, attrib_list);
86 }
87
eglCreatePbufferSurface(EGLDisplay dpy,EGLConfig config,const EGLint * attrib_list)88 EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy,
89 EGLConfig config,
90 const EGLint *attrib_list)
91 {
92 EnsureEGLLoaded();
93 return EGL_CreatePbufferSurface(dpy, config, attrib_list);
94 }
95
eglCreatePixmapSurface(EGLDisplay dpy,EGLConfig config,EGLNativePixmapType pixmap,const EGLint * attrib_list)96 EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy,
97 EGLConfig config,
98 EGLNativePixmapType pixmap,
99 const EGLint *attrib_list)
100 {
101 EnsureEGLLoaded();
102 return EGL_CreatePixmapSurface(dpy, config, pixmap, attrib_list);
103 }
104
eglCreateWindowSurface(EGLDisplay dpy,EGLConfig config,EGLNativeWindowType win,const EGLint * attrib_list)105 EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy,
106 EGLConfig config,
107 EGLNativeWindowType win,
108 const EGLint *attrib_list)
109 {
110 EnsureEGLLoaded();
111 return EGL_CreateWindowSurface(dpy, config, win, attrib_list);
112 }
113
eglDestroyContext(EGLDisplay dpy,EGLContext ctx)114 EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
115 {
116 EnsureEGLLoaded();
117 return EGL_DestroyContext(dpy, ctx);
118 }
119
eglDestroySurface(EGLDisplay dpy,EGLSurface surface)120 EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
121 {
122 EnsureEGLLoaded();
123 return EGL_DestroySurface(dpy, surface);
124 }
125
eglGetConfigAttrib(EGLDisplay dpy,EGLConfig config,EGLint attribute,EGLint * value)126 EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy,
127 EGLConfig config,
128 EGLint attribute,
129 EGLint *value)
130 {
131 EnsureEGLLoaded();
132 return EGL_GetConfigAttrib(dpy, config, attribute, value);
133 }
134
eglGetConfigs(EGLDisplay dpy,EGLConfig * configs,EGLint config_size,EGLint * num_config)135 EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy,
136 EGLConfig *configs,
137 EGLint config_size,
138 EGLint *num_config)
139 {
140 EnsureEGLLoaded();
141 return EGL_GetConfigs(dpy, configs, config_size, num_config);
142 }
143
eglGetCurrentDisplay()144 EGLDisplay EGLAPIENTRY eglGetCurrentDisplay()
145 {
146 EnsureEGLLoaded();
147 return EGL_GetCurrentDisplay();
148 }
149
eglGetCurrentSurface(EGLint readdraw)150 EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw)
151 {
152 EnsureEGLLoaded();
153 return EGL_GetCurrentSurface(readdraw);
154 }
155
eglGetDisplay(EGLNativeDisplayType display_id)156 EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
157 {
158 EnsureEGLLoaded();
159 return EGL_GetDisplay(display_id);
160 }
161
eglGetError()162 EGLint EGLAPIENTRY eglGetError()
163 {
164 EnsureEGLLoaded();
165 return EGL_GetError();
166 }
167
eglGetProcAddress(const char * procname)168 __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
169 {
170 EnsureEGLLoaded();
171 return EGL_GetProcAddress(procname);
172 }
173
eglInitialize(EGLDisplay dpy,EGLint * major,EGLint * minor)174 EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)
175 {
176 EnsureEGLLoaded();
177 return EGL_Initialize(dpy, major, minor);
178 }
179
eglMakeCurrent(EGLDisplay dpy,EGLSurface draw,EGLSurface read,EGLContext ctx)180 EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy,
181 EGLSurface draw,
182 EGLSurface read,
183 EGLContext ctx)
184 {
185 EnsureEGLLoaded();
186 return EGL_MakeCurrent(dpy, draw, read, ctx);
187 }
188
eglQueryContext(EGLDisplay dpy,EGLContext ctx,EGLint attribute,EGLint * value)189 EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy,
190 EGLContext ctx,
191 EGLint attribute,
192 EGLint *value)
193 {
194 EnsureEGLLoaded();
195 return EGL_QueryContext(dpy, ctx, attribute, value);
196 }
197
eglQueryString(EGLDisplay dpy,EGLint name)198 const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
199 {
200 EnsureEGLLoaded();
201 return EGL_QueryString(dpy, name);
202 }
203
eglQuerySurface(EGLDisplay dpy,EGLSurface surface,EGLint attribute,EGLint * value)204 EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy,
205 EGLSurface surface,
206 EGLint attribute,
207 EGLint *value)
208 {
209 EnsureEGLLoaded();
210 return EGL_QuerySurface(dpy, surface, attribute, value);
211 }
212
eglSwapBuffers(EGLDisplay dpy,EGLSurface surface)213 EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
214 {
215 EnsureEGLLoaded();
216 return EGL_SwapBuffers(dpy, surface);
217 }
218
eglTerminate(EGLDisplay dpy)219 EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
220 {
221 EnsureEGLLoaded();
222 return EGL_Terminate(dpy);
223 }
224
eglWaitGL()225 EGLBoolean EGLAPIENTRY eglWaitGL()
226 {
227 EnsureEGLLoaded();
228 return EGL_WaitGL();
229 }
230
eglWaitNative(EGLint engine)231 EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
232 {
233 EnsureEGLLoaded();
234 return EGL_WaitNative(engine);
235 }
236
237 // EGL 1.1
eglBindTexImage(EGLDisplay dpy,EGLSurface surface,EGLint buffer)238 EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
239 {
240 EnsureEGLLoaded();
241 return EGL_BindTexImage(dpy, surface, buffer);
242 }
243
eglReleaseTexImage(EGLDisplay dpy,EGLSurface surface,EGLint buffer)244 EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)
245 {
246 EnsureEGLLoaded();
247 return EGL_ReleaseTexImage(dpy, surface, buffer);
248 }
249
eglSurfaceAttrib(EGLDisplay dpy,EGLSurface surface,EGLint attribute,EGLint value)250 EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy,
251 EGLSurface surface,
252 EGLint attribute,
253 EGLint value)
254 {
255 EnsureEGLLoaded();
256 return EGL_SurfaceAttrib(dpy, surface, attribute, value);
257 }
258
eglSwapInterval(EGLDisplay dpy,EGLint interval)259 EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
260 {
261 EnsureEGLLoaded();
262 return EGL_SwapInterval(dpy, interval);
263 }
264
265 // EGL 1.2
eglBindAPI(EGLenum api)266 EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
267 {
268 EnsureEGLLoaded();
269 return EGL_BindAPI(api);
270 }
271
eglCreatePbufferFromClientBuffer(EGLDisplay dpy,EGLenum buftype,EGLClientBuffer buffer,EGLConfig config,const EGLint * attrib_list)272 EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy,
273 EGLenum buftype,
274 EGLClientBuffer buffer,
275 EGLConfig config,
276 const EGLint *attrib_list)
277 {
278 EnsureEGLLoaded();
279 return EGL_CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
280 }
281
eglQueryAPI()282 EGLenum EGLAPIENTRY eglQueryAPI()
283 {
284 EnsureEGLLoaded();
285 return EGL_QueryAPI();
286 }
287
eglReleaseThread()288 EGLBoolean EGLAPIENTRY eglReleaseThread()
289 {
290 EnsureEGLLoaded();
291 return EGL_ReleaseThread();
292 }
293
eglWaitClient()294 EGLBoolean EGLAPIENTRY eglWaitClient()
295 {
296 EnsureEGLLoaded();
297 return EGL_WaitClient();
298 }
299
300 // EGL 1.4
eglGetCurrentContext()301 EGLContext EGLAPIENTRY eglGetCurrentContext()
302 {
303 EnsureEGLLoaded();
304 return EGL_GetCurrentContext();
305 }
306
307 // EGL 1.5
eglClientWaitSync(EGLDisplay dpy,EGLSync sync,EGLint flags,EGLTime timeout)308 EGLint EGLAPIENTRY eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)
309 {
310 EnsureEGLLoaded();
311 return EGL_ClientWaitSync(dpy, sync, flags, timeout);
312 }
313
eglCreateImage(EGLDisplay dpy,EGLContext ctx,EGLenum target,EGLClientBuffer buffer,const EGLAttrib * attrib_list)314 EGLImage EGLAPIENTRY eglCreateImage(EGLDisplay dpy,
315 EGLContext ctx,
316 EGLenum target,
317 EGLClientBuffer buffer,
318 const EGLAttrib *attrib_list)
319 {
320 EnsureEGLLoaded();
321 return EGL_CreateImage(dpy, ctx, target, buffer, attrib_list);
322 }
323
eglCreatePlatformPixmapSurface(EGLDisplay dpy,EGLConfig config,void * native_pixmap,const EGLAttrib * attrib_list)324 EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface(EGLDisplay dpy,
325 EGLConfig config,
326 void *native_pixmap,
327 const EGLAttrib *attrib_list)
328 {
329 EnsureEGLLoaded();
330 return EGL_CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list);
331 }
332
eglCreatePlatformWindowSurface(EGLDisplay dpy,EGLConfig config,void * native_window,const EGLAttrib * attrib_list)333 EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface(EGLDisplay dpy,
334 EGLConfig config,
335 void *native_window,
336 const EGLAttrib *attrib_list)
337 {
338 EnsureEGLLoaded();
339 return EGL_CreatePlatformWindowSurface(dpy, config, native_window, attrib_list);
340 }
341
eglCreateSync(EGLDisplay dpy,EGLenum type,const EGLAttrib * attrib_list)342 EGLSync EGLAPIENTRY eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)
343 {
344 EnsureEGLLoaded();
345 return EGL_CreateSync(dpy, type, attrib_list);
346 }
347
eglDestroyImage(EGLDisplay dpy,EGLImage image)348 EGLBoolean EGLAPIENTRY eglDestroyImage(EGLDisplay dpy, EGLImage image)
349 {
350 EnsureEGLLoaded();
351 return EGL_DestroyImage(dpy, image);
352 }
353
eglDestroySync(EGLDisplay dpy,EGLSync sync)354 EGLBoolean EGLAPIENTRY eglDestroySync(EGLDisplay dpy, EGLSync sync)
355 {
356 EnsureEGLLoaded();
357 return EGL_DestroySync(dpy, sync);
358 }
359
eglGetPlatformDisplay(EGLenum platform,void * native_display,const EGLAttrib * attrib_list)360 EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform,
361 void *native_display,
362 const EGLAttrib *attrib_list)
363 {
364 EnsureEGLLoaded();
365 return EGL_GetPlatformDisplay(platform, native_display, attrib_list);
366 }
367
eglGetSyncAttrib(EGLDisplay dpy,EGLSync sync,EGLint attribute,EGLAttrib * value)368 EGLBoolean EGLAPIENTRY eglGetSyncAttrib(EGLDisplay dpy,
369 EGLSync sync,
370 EGLint attribute,
371 EGLAttrib *value)
372 {
373 EnsureEGLLoaded();
374 return EGL_GetSyncAttrib(dpy, sync, attribute, value);
375 }
376
eglWaitSync(EGLDisplay dpy,EGLSync sync,EGLint flags)377 EGLBoolean EGLAPIENTRY eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)
378 {
379 EnsureEGLLoaded();
380 return EGL_WaitSync(dpy, sync, flags);
381 }
382
383 // EGL_ANDROID_blob_cache
eglSetBlobCacheFuncsANDROID(EGLDisplay dpy,EGLSetBlobFuncANDROID set,EGLGetBlobFuncANDROID get)384 void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy,
385 EGLSetBlobFuncANDROID set,
386 EGLGetBlobFuncANDROID get)
387 {
388 EnsureEGLLoaded();
389 return EGL_SetBlobCacheFuncsANDROID(dpy, set, get);
390 }
391
392 // EGL_ANDROID_create_native_client_buffer
eglCreateNativeClientBufferANDROID(const EGLint * attrib_list)393 EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID(const EGLint *attrib_list)
394 {
395 EnsureEGLLoaded();
396 return EGL_CreateNativeClientBufferANDROID(attrib_list);
397 }
398
399 // EGL_ANDROID_get_frame_timestamps
eglGetCompositorTimingSupportedANDROID(EGLDisplay dpy,EGLSurface surface,EGLint name)400 EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID(EGLDisplay dpy,
401 EGLSurface surface,
402 EGLint name)
403 {
404 EnsureEGLLoaded();
405 return EGL_GetCompositorTimingSupportedANDROID(dpy, surface, name);
406 }
407
eglGetCompositorTimingANDROID(EGLDisplay dpy,EGLSurface surface,EGLint numTimestamps,const EGLint * names,EGLnsecsANDROID * values)408 EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID(EGLDisplay dpy,
409 EGLSurface surface,
410 EGLint numTimestamps,
411 const EGLint *names,
412 EGLnsecsANDROID *values)
413 {
414 EnsureEGLLoaded();
415 return EGL_GetCompositorTimingANDROID(dpy, surface, numTimestamps, names, values);
416 }
417
eglGetNextFrameIdANDROID(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR * frameId)418 EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID(EGLDisplay dpy,
419 EGLSurface surface,
420 EGLuint64KHR *frameId)
421 {
422 EnsureEGLLoaded();
423 return EGL_GetNextFrameIdANDROID(dpy, surface, frameId);
424 }
425
eglGetFrameTimestampSupportedANDROID(EGLDisplay dpy,EGLSurface surface,EGLint timestamp)426 EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID(EGLDisplay dpy,
427 EGLSurface surface,
428 EGLint timestamp)
429 {
430 EnsureEGLLoaded();
431 return EGL_GetFrameTimestampSupportedANDROID(dpy, surface, timestamp);
432 }
433
eglGetFrameTimestampsANDROID(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR frameId,EGLint numTimestamps,const EGLint * timestamps,EGLnsecsANDROID * values)434 EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID(EGLDisplay dpy,
435 EGLSurface surface,
436 EGLuint64KHR frameId,
437 EGLint numTimestamps,
438 const EGLint *timestamps,
439 EGLnsecsANDROID *values)
440 {
441 EnsureEGLLoaded();
442 return EGL_GetFrameTimestampsANDROID(dpy, surface, frameId, numTimestamps, timestamps, values);
443 }
444
445 // EGL_ANDROID_get_native_client_buffer
eglGetNativeClientBufferANDROID(const struct AHardwareBuffer * buffer)446 EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID(const struct AHardwareBuffer *buffer)
447 {
448 EnsureEGLLoaded();
449 return EGL_GetNativeClientBufferANDROID(buffer);
450 }
451
452 // EGL_ANDROID_native_fence_sync
eglDupNativeFenceFDANDROID(EGLDisplay dpy,EGLSyncKHR sync)453 EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync)
454 {
455 EnsureEGLLoaded();
456 return EGL_DupNativeFenceFDANDROID(dpy, sync);
457 }
458
459 // EGL_ANDROID_presentation_time
eglPresentationTimeANDROID(EGLDisplay dpy,EGLSurface surface,EGLnsecsANDROID time)460 EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID(EGLDisplay dpy,
461 EGLSurface surface,
462 EGLnsecsANDROID time)
463 {
464 EnsureEGLLoaded();
465 return EGL_PresentationTimeANDROID(dpy, surface, time);
466 }
467
468 // EGL_ANGLE_device_creation
eglCreateDeviceANGLE(EGLint device_type,void * native_device,const EGLAttrib * attrib_list)469 EGLDeviceEXT EGLAPIENTRY eglCreateDeviceANGLE(EGLint device_type,
470 void *native_device,
471 const EGLAttrib *attrib_list)
472 {
473 EnsureEGLLoaded();
474 return EGL_CreateDeviceANGLE(device_type, native_device, attrib_list);
475 }
476
eglReleaseDeviceANGLE(EGLDeviceEXT device)477 EGLBoolean EGLAPIENTRY eglReleaseDeviceANGLE(EGLDeviceEXT device)
478 {
479 EnsureEGLLoaded();
480 return EGL_ReleaseDeviceANGLE(device);
481 }
482
483 // EGL_ANGLE_external_context_and_surface
eglAcquireExternalContextANGLE(EGLDisplay dpy,EGLSurface drawAndRead)484 void EGLAPIENTRY eglAcquireExternalContextANGLE(EGLDisplay dpy, EGLSurface drawAndRead)
485 {
486 EnsureEGLLoaded();
487 return EGL_AcquireExternalContextANGLE(dpy, drawAndRead);
488 }
489
eglReleaseExternalContextANGLE(EGLDisplay dpy)490 void EGLAPIENTRY eglReleaseExternalContextANGLE(EGLDisplay dpy)
491 {
492 EnsureEGLLoaded();
493 return EGL_ReleaseExternalContextANGLE(dpy);
494 }
495
496 // EGL_ANGLE_feature_control
eglQueryStringiANGLE(EGLDisplay dpy,EGLint name,EGLint index)497 const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index)
498 {
499 EnsureEGLLoaded();
500 return EGL_QueryStringiANGLE(dpy, name, index);
501 }
502
eglQueryDisplayAttribANGLE(EGLDisplay dpy,EGLint attribute,EGLAttrib * value)503 EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy,
504 EGLint attribute,
505 EGLAttrib *value)
506 {
507 EnsureEGLLoaded();
508 return EGL_QueryDisplayAttribANGLE(dpy, attribute, value);
509 }
510
511 // EGL_ANGLE_metal_shared_event_sync
eglCopyMetalSharedEventANGLE(EGLDisplay dpy,EGLSyncKHR sync)512 void *EGLAPIENTRY eglCopyMetalSharedEventANGLE(EGLDisplay dpy, EGLSyncKHR sync)
513 {
514 EnsureEGLLoaded();
515 return EGL_CopyMetalSharedEventANGLE(dpy, sync);
516 }
517
518 // EGL_ANGLE_power_preference
eglReleaseHighPowerGPUANGLE(EGLDisplay dpy,EGLContext ctx)519 void EGLAPIENTRY eglReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
520 {
521 EnsureEGLLoaded();
522 return EGL_ReleaseHighPowerGPUANGLE(dpy, ctx);
523 }
524
eglReacquireHighPowerGPUANGLE(EGLDisplay dpy,EGLContext ctx)525 void EGLAPIENTRY eglReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
526 {
527 EnsureEGLLoaded();
528 return EGL_ReacquireHighPowerGPUANGLE(dpy, ctx);
529 }
530
eglHandleGPUSwitchANGLE(EGLDisplay dpy)531 void EGLAPIENTRY eglHandleGPUSwitchANGLE(EGLDisplay dpy)
532 {
533 EnsureEGLLoaded();
534 return EGL_HandleGPUSwitchANGLE(dpy);
535 }
536
eglForceGPUSwitchANGLE(EGLDisplay dpy,EGLint gpuIDHigh,EGLint gpuIDLow)537 void EGLAPIENTRY eglForceGPUSwitchANGLE(EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow)
538 {
539 EnsureEGLLoaded();
540 return EGL_ForceGPUSwitchANGLE(dpy, gpuIDHigh, gpuIDLow);
541 }
542
543 // EGL_ANGLE_prepare_swap_buffers
eglPrepareSwapBuffersANGLE(EGLDisplay dpy,EGLSurface surface)544 EGLBoolean EGLAPIENTRY eglPrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface)
545 {
546 EnsureEGLLoaded();
547 return EGL_PrepareSwapBuffersANGLE(dpy, surface);
548 }
549
550 // EGL_ANGLE_program_cache_control
eglProgramCacheGetAttribANGLE(EGLDisplay dpy,EGLenum attrib)551 EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib)
552 {
553 EnsureEGLLoaded();
554 return EGL_ProgramCacheGetAttribANGLE(dpy, attrib);
555 }
556
eglProgramCacheQueryANGLE(EGLDisplay dpy,EGLint index,void * key,EGLint * keysize,void * binary,EGLint * binarysize)557 void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy,
558 EGLint index,
559 void *key,
560 EGLint *keysize,
561 void *binary,
562 EGLint *binarysize)
563 {
564 EnsureEGLLoaded();
565 return EGL_ProgramCacheQueryANGLE(dpy, index, key, keysize, binary, binarysize);
566 }
567
eglProgramCachePopulateANGLE(EGLDisplay dpy,const void * key,EGLint keysize,const void * binary,EGLint binarysize)568 void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy,
569 const void *key,
570 EGLint keysize,
571 const void *binary,
572 EGLint binarysize)
573 {
574 EnsureEGLLoaded();
575 return EGL_ProgramCachePopulateANGLE(dpy, key, keysize, binary, binarysize);
576 }
577
eglProgramCacheResizeANGLE(EGLDisplay dpy,EGLint limit,EGLint mode)578 EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode)
579 {
580 EnsureEGLLoaded();
581 return EGL_ProgramCacheResizeANGLE(dpy, limit, mode);
582 }
583
584 // EGL_ANGLE_query_surface_pointer
eglQuerySurfacePointerANGLE(EGLDisplay dpy,EGLSurface surface,EGLint attribute,void ** value)585 EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy,
586 EGLSurface surface,
587 EGLint attribute,
588 void **value)
589 {
590 EnsureEGLLoaded();
591 return EGL_QuerySurfacePointerANGLE(dpy, surface, attribute, value);
592 }
593
594 // EGL_ANGLE_stream_producer_d3d_texture
eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,EGLStreamKHR stream,const EGLAttrib * attrib_list)595 EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,
596 EGLStreamKHR stream,
597 const EGLAttrib *attrib_list)
598 {
599 EnsureEGLLoaded();
600 return EGL_CreateStreamProducerD3DTextureANGLE(dpy, stream, attrib_list);
601 }
602
eglStreamPostD3DTextureANGLE(EGLDisplay dpy,EGLStreamKHR stream,void * texture,const EGLAttrib * attrib_list)603 EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy,
604 EGLStreamKHR stream,
605 void *texture,
606 const EGLAttrib *attrib_list)
607 {
608 EnsureEGLLoaded();
609 return EGL_StreamPostD3DTextureANGLE(dpy, stream, texture, attrib_list);
610 }
611
612 // EGL_ANGLE_swap_with_frame_token
eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,EGLSurface surface,EGLFrameTokenANGLE frametoken)613 EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,
614 EGLSurface surface,
615 EGLFrameTokenANGLE frametoken)
616 {
617 EnsureEGLLoaded();
618 return EGL_SwapBuffersWithFrameTokenANGLE(dpy, surface, frametoken);
619 }
620
621 // EGL_ANGLE_sync_control_rate
eglGetMscRateANGLE(EGLDisplay dpy,EGLSurface surface,EGLint * numerator,EGLint * denominator)622 EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy,
623 EGLSurface surface,
624 EGLint *numerator,
625 EGLint *denominator)
626 {
627 EnsureEGLLoaded();
628 return EGL_GetMscRateANGLE(dpy, surface, numerator, denominator);
629 }
630
631 // EGL_ANGLE_vulkan_image
eglExportVkImageANGLE(EGLDisplay dpy,EGLImage image,void * vk_image,void * vk_image_create_info)632 EGLBoolean EGLAPIENTRY eglExportVkImageANGLE(EGLDisplay dpy,
633 EGLImage image,
634 void *vk_image,
635 void *vk_image_create_info)
636 {
637 EnsureEGLLoaded();
638 return EGL_ExportVkImageANGLE(dpy, image, vk_image, vk_image_create_info);
639 }
640
641 // EGL_ANGLE_wait_until_work_scheduled
eglWaitUntilWorkScheduledANGLE(EGLDisplay dpy)642 void EGLAPIENTRY eglWaitUntilWorkScheduledANGLE(EGLDisplay dpy)
643 {
644 EnsureEGLLoaded();
645 return EGL_WaitUntilWorkScheduledANGLE(dpy);
646 }
647
648 // EGL_CHROMIUM_sync_control
eglGetSyncValuesCHROMIUM(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR * ust,EGLuint64KHR * msc,EGLuint64KHR * sbc)649 EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
650 EGLSurface surface,
651 EGLuint64KHR *ust,
652 EGLuint64KHR *msc,
653 EGLuint64KHR *sbc)
654 {
655 EnsureEGLLoaded();
656 return EGL_GetSyncValuesCHROMIUM(dpy, surface, ust, msc, sbc);
657 }
658
659 // EGL_EXT_device_query
eglQueryDeviceAttribEXT(EGLDeviceEXT device,EGLint attribute,EGLAttrib * value)660 EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device,
661 EGLint attribute,
662 EGLAttrib *value)
663 {
664 EnsureEGLLoaded();
665 return EGL_QueryDeviceAttribEXT(device, attribute, value);
666 }
667
eglQueryDeviceStringEXT(EGLDeviceEXT device,EGLint name)668 const char *EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name)
669 {
670 EnsureEGLLoaded();
671 return EGL_QueryDeviceStringEXT(device, name);
672 }
673
eglQueryDisplayAttribEXT(EGLDisplay dpy,EGLint attribute,EGLAttrib * value)674 EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value)
675 {
676 EnsureEGLLoaded();
677 return EGL_QueryDisplayAttribEXT(dpy, attribute, value);
678 }
679
680 // EGL_EXT_image_dma_buf_import_modifiers
eglQueryDmaBufFormatsEXT(EGLDisplay dpy,EGLint max_formats,EGLint * formats,EGLint * num_formats)681 EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT(EGLDisplay dpy,
682 EGLint max_formats,
683 EGLint *formats,
684 EGLint *num_formats)
685 {
686 EnsureEGLLoaded();
687 return EGL_QueryDmaBufFormatsEXT(dpy, max_formats, formats, num_formats);
688 }
689
eglQueryDmaBufModifiersEXT(EGLDisplay dpy,EGLint format,EGLint max_modifiers,EGLuint64KHR * modifiers,EGLBoolean * external_only,EGLint * num_modifiers)690 EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT(EGLDisplay dpy,
691 EGLint format,
692 EGLint max_modifiers,
693 EGLuint64KHR *modifiers,
694 EGLBoolean *external_only,
695 EGLint *num_modifiers)
696 {
697 EnsureEGLLoaded();
698 return EGL_QueryDmaBufModifiersEXT(dpy, format, max_modifiers, modifiers, external_only,
699 num_modifiers);
700 }
701
702 // EGL_EXT_platform_base
eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,EGLConfig config,void * native_pixmap,const EGLint * attrib_list)703 EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
704 EGLConfig config,
705 void *native_pixmap,
706 const EGLint *attrib_list)
707 {
708 EnsureEGLLoaded();
709 return EGL_CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list);
710 }
711
eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,EGLConfig config,void * native_window,const EGLint * attrib_list)712 EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
713 EGLConfig config,
714 void *native_window,
715 const EGLint *attrib_list)
716 {
717 EnsureEGLLoaded();
718 return EGL_CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list);
719 }
720
eglGetPlatformDisplayEXT(EGLenum platform,void * native_display,const EGLint * attrib_list)721 EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform,
722 void *native_display,
723 const EGLint *attrib_list)
724 {
725 EnsureEGLLoaded();
726 return EGL_GetPlatformDisplayEXT(platform, native_display, attrib_list);
727 }
728
729 // EGL_KHR_debug
eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback,const EGLAttrib * attrib_list)730 EGLint EGLAPIENTRY eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list)
731 {
732 EnsureEGLLoaded();
733 return EGL_DebugMessageControlKHR(callback, attrib_list);
734 }
735
eglLabelObjectKHR(EGLDisplay display,EGLenum objectType,EGLObjectKHR object,EGLLabelKHR label)736 EGLint EGLAPIENTRY eglLabelObjectKHR(EGLDisplay display,
737 EGLenum objectType,
738 EGLObjectKHR object,
739 EGLLabelKHR label)
740 {
741 EnsureEGLLoaded();
742 return EGL_LabelObjectKHR(display, objectType, object, label);
743 }
744
eglQueryDebugKHR(EGLint attribute,EGLAttrib * value)745 EGLBoolean EGLAPIENTRY eglQueryDebugKHR(EGLint attribute, EGLAttrib *value)
746 {
747 EnsureEGLLoaded();
748 return EGL_QueryDebugKHR(attribute, value);
749 }
750
751 // EGL_KHR_fence_sync
eglClientWaitSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint flags,EGLTimeKHR timeout)752 EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy,
753 EGLSyncKHR sync,
754 EGLint flags,
755 EGLTimeKHR timeout)
756 {
757 EnsureEGLLoaded();
758 return EGL_ClientWaitSyncKHR(dpy, sync, flags, timeout);
759 }
760
eglCreateSyncKHR(EGLDisplay dpy,EGLenum type,const EGLint * attrib_list)761 EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
762 {
763 EnsureEGLLoaded();
764 return EGL_CreateSyncKHR(dpy, type, attrib_list);
765 }
766
eglDestroySyncKHR(EGLDisplay dpy,EGLSyncKHR sync)767 EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
768 {
769 EnsureEGLLoaded();
770 return EGL_DestroySyncKHR(dpy, sync);
771 }
772
eglGetSyncAttribKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint attribute,EGLint * value)773 EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy,
774 EGLSyncKHR sync,
775 EGLint attribute,
776 EGLint *value)
777 {
778 EnsureEGLLoaded();
779 return EGL_GetSyncAttribKHR(dpy, sync, attribute, value);
780 }
781
782 // EGL_KHR_image
eglCreateImageKHR(EGLDisplay dpy,EGLContext ctx,EGLenum target,EGLClientBuffer buffer,const EGLint * attrib_list)783 EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy,
784 EGLContext ctx,
785 EGLenum target,
786 EGLClientBuffer buffer,
787 const EGLint *attrib_list)
788 {
789 EnsureEGLLoaded();
790 return EGL_CreateImageKHR(dpy, ctx, target, buffer, attrib_list);
791 }
792
eglDestroyImageKHR(EGLDisplay dpy,EGLImageKHR image)793 EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
794 {
795 EnsureEGLLoaded();
796 return EGL_DestroyImageKHR(dpy, image);
797 }
798
799 // EGL_KHR_lock_surface3
eglLockSurfaceKHR(EGLDisplay dpy,EGLSurface surface,const EGLint * attrib_list)800 EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay dpy,
801 EGLSurface surface,
802 const EGLint *attrib_list)
803 {
804 EnsureEGLLoaded();
805 return EGL_LockSurfaceKHR(dpy, surface, attrib_list);
806 }
807
eglQuerySurface64KHR(EGLDisplay dpy,EGLSurface surface,EGLint attribute,EGLAttribKHR * value)808 EGLBoolean EGLAPIENTRY eglQuerySurface64KHR(EGLDisplay dpy,
809 EGLSurface surface,
810 EGLint attribute,
811 EGLAttribKHR *value)
812 {
813 EnsureEGLLoaded();
814 return EGL_QuerySurface64KHR(dpy, surface, attribute, value);
815 }
816
eglUnlockSurfaceKHR(EGLDisplay dpy,EGLSurface surface)817 EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
818 {
819 EnsureEGLLoaded();
820 return EGL_UnlockSurfaceKHR(dpy, surface);
821 }
822
823 // EGL_KHR_partial_update
eglSetDamageRegionKHR(EGLDisplay dpy,EGLSurface surface,EGLint * rects,EGLint n_rects)824 EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR(EGLDisplay dpy,
825 EGLSurface surface,
826 EGLint *rects,
827 EGLint n_rects)
828 {
829 EnsureEGLLoaded();
830 return EGL_SetDamageRegionKHR(dpy, surface, rects, n_rects);
831 }
832
833 // EGL_KHR_reusable_sync
eglSignalSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLenum mode)834 EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
835 {
836 EnsureEGLLoaded();
837 return EGL_SignalSyncKHR(dpy, sync, mode);
838 }
839
840 // EGL_KHR_stream
eglCreateStreamKHR(EGLDisplay dpy,const EGLint * attrib_list)841 EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list)
842 {
843 EnsureEGLLoaded();
844 return EGL_CreateStreamKHR(dpy, attrib_list);
845 }
846
eglDestroyStreamKHR(EGLDisplay dpy,EGLStreamKHR stream)847 EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream)
848 {
849 EnsureEGLLoaded();
850 return EGL_DestroyStreamKHR(dpy, stream);
851 }
852
eglQueryStreamKHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLint * value)853 EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy,
854 EGLStreamKHR stream,
855 EGLenum attribute,
856 EGLint *value)
857 {
858 EnsureEGLLoaded();
859 return EGL_QueryStreamKHR(dpy, stream, attribute, value);
860 }
861
eglQueryStreamu64KHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLuint64KHR * value)862 EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy,
863 EGLStreamKHR stream,
864 EGLenum attribute,
865 EGLuint64KHR *value)
866 {
867 EnsureEGLLoaded();
868 return EGL_QueryStreamu64KHR(dpy, stream, attribute, value);
869 }
870
eglStreamAttribKHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLint value)871 EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy,
872 EGLStreamKHR stream,
873 EGLenum attribute,
874 EGLint value)
875 {
876 EnsureEGLLoaded();
877 return EGL_StreamAttribKHR(dpy, stream, attribute, value);
878 }
879
880 // EGL_KHR_stream_consumer_gltexture
eglStreamConsumerAcquireKHR(EGLDisplay dpy,EGLStreamKHR stream)881 EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream)
882 {
883 EnsureEGLLoaded();
884 return EGL_StreamConsumerAcquireKHR(dpy, stream);
885 }
886
eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy,EGLStreamKHR stream)887 EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream)
888 {
889 EnsureEGLLoaded();
890 return EGL_StreamConsumerGLTextureExternalKHR(dpy, stream);
891 }
892
eglStreamConsumerReleaseKHR(EGLDisplay dpy,EGLStreamKHR stream)893 EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream)
894 {
895 EnsureEGLLoaded();
896 return EGL_StreamConsumerReleaseKHR(dpy, stream);
897 }
898
899 // EGL_KHR_swap_buffers_with_damage
eglSwapBuffersWithDamageKHR(EGLDisplay dpy,EGLSurface surface,const EGLint * rects,EGLint n_rects)900 EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy,
901 EGLSurface surface,
902 const EGLint *rects,
903 EGLint n_rects)
904 {
905 EnsureEGLLoaded();
906 return EGL_SwapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
907 }
908
909 // EGL_KHR_wait_sync
eglWaitSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint flags)910 EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
911 {
912 EnsureEGLLoaded();
913 return EGL_WaitSyncKHR(dpy, sync, flags);
914 }
915
916 // EGL_NV_post_sub_buffer
eglPostSubBufferNV(EGLDisplay dpy,EGLSurface surface,EGLint x,EGLint y,EGLint width,EGLint height)917 EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy,
918 EGLSurface surface,
919 EGLint x,
920 EGLint y,
921 EGLint width,
922 EGLint height)
923 {
924 EnsureEGLLoaded();
925 return EGL_PostSubBufferNV(dpy, surface, x, y, width, height);
926 }
927
928 // EGL_NV_stream_consumer_gltexture_yuv
eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,EGLStreamKHR stream,const EGLAttrib * attrib_list)929 EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
930 EGLStreamKHR stream,
931 const EGLAttrib *attrib_list)
932 {
933 EnsureEGLLoaded();
934 return EGL_StreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list);
935 }
936
937 } // extern "C"
938