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 angle::GenericProc KHRONOS_APIENTRY GlobalLoad(const char *symbol)
29 {
30 return reinterpret_cast<angle::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_GLESV2_LIBRARY_NAME,
42 angle::SearchType::ModuleDir, &errorOut);
43 if (gEntryPointsLib)
44 {
45 angle::LoadEGL_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_feature_control
eglQueryStringiANGLE(EGLDisplay dpy,EGLint name,EGLint index)484 const char *EGLAPIENTRY eglQueryStringiANGLE(EGLDisplay dpy, EGLint name, EGLint index)
485 {
486 EnsureEGLLoaded();
487 return EGL_QueryStringiANGLE(dpy, name, index);
488 }
489
eglQueryDisplayAttribANGLE(EGLDisplay dpy,EGLint attribute,EGLAttrib * value)490 EGLBoolean EGLAPIENTRY eglQueryDisplayAttribANGLE(EGLDisplay dpy,
491 EGLint attribute,
492 EGLAttrib *value)
493 {
494 EnsureEGLLoaded();
495 return EGL_QueryDisplayAttribANGLE(dpy, attribute, value);
496 }
497
498 // EGL_ANGLE_power_preference
eglReleaseHighPowerGPUANGLE(EGLDisplay dpy,EGLContext ctx)499 void EGLAPIENTRY eglReleaseHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
500 {
501 EnsureEGLLoaded();
502 return EGL_ReleaseHighPowerGPUANGLE(dpy, ctx);
503 }
504
eglReacquireHighPowerGPUANGLE(EGLDisplay dpy,EGLContext ctx)505 void EGLAPIENTRY eglReacquireHighPowerGPUANGLE(EGLDisplay dpy, EGLContext ctx)
506 {
507 EnsureEGLLoaded();
508 return EGL_ReacquireHighPowerGPUANGLE(dpy, ctx);
509 }
510
eglHandleGPUSwitchANGLE(EGLDisplay dpy)511 void EGLAPIENTRY eglHandleGPUSwitchANGLE(EGLDisplay dpy)
512 {
513 EnsureEGLLoaded();
514 return EGL_HandleGPUSwitchANGLE(dpy);
515 }
516
eglForceGPUSwitchANGLE(EGLDisplay dpy,EGLint gpuIDHigh,EGLint gpuIDLow)517 void EGLAPIENTRY eglForceGPUSwitchANGLE(EGLDisplay dpy, EGLint gpuIDHigh, EGLint gpuIDLow)
518 {
519 EnsureEGLLoaded();
520 return EGL_ForceGPUSwitchANGLE(dpy, gpuIDHigh, gpuIDLow);
521 }
522
523 // EGL_ANGLE_prepare_swap_buffers
eglPrepareSwapBuffersANGLE(EGLDisplay dpy,EGLSurface surface)524 EGLBoolean EGLAPIENTRY eglPrepareSwapBuffersANGLE(EGLDisplay dpy, EGLSurface surface)
525 {
526 EnsureEGLLoaded();
527 return EGL_PrepareSwapBuffersANGLE(dpy, surface);
528 }
529
530 // EGL_ANGLE_program_cache_control
eglProgramCacheGetAttribANGLE(EGLDisplay dpy,EGLenum attrib)531 EGLint EGLAPIENTRY eglProgramCacheGetAttribANGLE(EGLDisplay dpy, EGLenum attrib)
532 {
533 EnsureEGLLoaded();
534 return EGL_ProgramCacheGetAttribANGLE(dpy, attrib);
535 }
536
eglProgramCacheQueryANGLE(EGLDisplay dpy,EGLint index,void * key,EGLint * keysize,void * binary,EGLint * binarysize)537 void EGLAPIENTRY eglProgramCacheQueryANGLE(EGLDisplay dpy,
538 EGLint index,
539 void *key,
540 EGLint *keysize,
541 void *binary,
542 EGLint *binarysize)
543 {
544 EnsureEGLLoaded();
545 return EGL_ProgramCacheQueryANGLE(dpy, index, key, keysize, binary, binarysize);
546 }
547
eglProgramCachePopulateANGLE(EGLDisplay dpy,const void * key,EGLint keysize,const void * binary,EGLint binarysize)548 void EGLAPIENTRY eglProgramCachePopulateANGLE(EGLDisplay dpy,
549 const void *key,
550 EGLint keysize,
551 const void *binary,
552 EGLint binarysize)
553 {
554 EnsureEGLLoaded();
555 return EGL_ProgramCachePopulateANGLE(dpy, key, keysize, binary, binarysize);
556 }
557
eglProgramCacheResizeANGLE(EGLDisplay dpy,EGLint limit,EGLint mode)558 EGLint EGLAPIENTRY eglProgramCacheResizeANGLE(EGLDisplay dpy, EGLint limit, EGLint mode)
559 {
560 EnsureEGLLoaded();
561 return EGL_ProgramCacheResizeANGLE(dpy, limit, mode);
562 }
563
564 // EGL_ANGLE_query_surface_pointer
eglQuerySurfacePointerANGLE(EGLDisplay dpy,EGLSurface surface,EGLint attribute,void ** value)565 EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE(EGLDisplay dpy,
566 EGLSurface surface,
567 EGLint attribute,
568 void **value)
569 {
570 EnsureEGLLoaded();
571 return EGL_QuerySurfacePointerANGLE(dpy, surface, attribute, value);
572 }
573
574 // EGL_ANGLE_stream_producer_d3d_texture
eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,EGLStreamKHR stream,const EGLAttrib * attrib_list)575 EGLBoolean EGLAPIENTRY eglCreateStreamProducerD3DTextureANGLE(EGLDisplay dpy,
576 EGLStreamKHR stream,
577 const EGLAttrib *attrib_list)
578 {
579 EnsureEGLLoaded();
580 return EGL_CreateStreamProducerD3DTextureANGLE(dpy, stream, attrib_list);
581 }
582
eglStreamPostD3DTextureANGLE(EGLDisplay dpy,EGLStreamKHR stream,void * texture,const EGLAttrib * attrib_list)583 EGLBoolean EGLAPIENTRY eglStreamPostD3DTextureANGLE(EGLDisplay dpy,
584 EGLStreamKHR stream,
585 void *texture,
586 const EGLAttrib *attrib_list)
587 {
588 EnsureEGLLoaded();
589 return EGL_StreamPostD3DTextureANGLE(dpy, stream, texture, attrib_list);
590 }
591
592 // EGL_ANGLE_swap_with_frame_token
eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,EGLSurface surface,EGLFrameTokenANGLE frametoken)593 EGLBoolean EGLAPIENTRY eglSwapBuffersWithFrameTokenANGLE(EGLDisplay dpy,
594 EGLSurface surface,
595 EGLFrameTokenANGLE frametoken)
596 {
597 EnsureEGLLoaded();
598 return EGL_SwapBuffersWithFrameTokenANGLE(dpy, surface, frametoken);
599 }
600
601 // EGL_ANGLE_sync_control_rate
eglGetMscRateANGLE(EGLDisplay dpy,EGLSurface surface,EGLint * numerator,EGLint * denominator)602 EGLBoolean EGLAPIENTRY eglGetMscRateANGLE(EGLDisplay dpy,
603 EGLSurface surface,
604 EGLint *numerator,
605 EGLint *denominator)
606 {
607 EnsureEGLLoaded();
608 return EGL_GetMscRateANGLE(dpy, surface, numerator, denominator);
609 }
610
611 // EGL_ANGLE_vulkan_image
eglExportVkImageANGLE(EGLDisplay dpy,EGLImage image,void * vk_image,void * vk_image_create_info)612 EGLBoolean EGLAPIENTRY eglExportVkImageANGLE(EGLDisplay dpy,
613 EGLImage image,
614 void *vk_image,
615 void *vk_image_create_info)
616 {
617 EnsureEGLLoaded();
618 return EGL_ExportVkImageANGLE(dpy, image, vk_image, vk_image_create_info);
619 }
620
621 // EGL_CHROMIUM_sync_control
eglGetSyncValuesCHROMIUM(EGLDisplay dpy,EGLSurface surface,EGLuint64KHR * ust,EGLuint64KHR * msc,EGLuint64KHR * sbc)622 EGLBoolean EGLAPIENTRY eglGetSyncValuesCHROMIUM(EGLDisplay dpy,
623 EGLSurface surface,
624 EGLuint64KHR *ust,
625 EGLuint64KHR *msc,
626 EGLuint64KHR *sbc)
627 {
628 EnsureEGLLoaded();
629 return EGL_GetSyncValuesCHROMIUM(dpy, surface, ust, msc, sbc);
630 }
631
632 // EGL_EXT_device_query
eglQueryDeviceAttribEXT(EGLDeviceEXT device,EGLint attribute,EGLAttrib * value)633 EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT(EGLDeviceEXT device,
634 EGLint attribute,
635 EGLAttrib *value)
636 {
637 EnsureEGLLoaded();
638 return EGL_QueryDeviceAttribEXT(device, attribute, value);
639 }
640
eglQueryDeviceStringEXT(EGLDeviceEXT device,EGLint name)641 const char *EGLAPIENTRY eglQueryDeviceStringEXT(EGLDeviceEXT device, EGLint name)
642 {
643 EnsureEGLLoaded();
644 return EGL_QueryDeviceStringEXT(device, name);
645 }
646
eglQueryDisplayAttribEXT(EGLDisplay dpy,EGLint attribute,EGLAttrib * value)647 EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT(EGLDisplay dpy, EGLint attribute, EGLAttrib *value)
648 {
649 EnsureEGLLoaded();
650 return EGL_QueryDisplayAttribEXT(dpy, attribute, value);
651 }
652
653 // EGL_EXT_image_dma_buf_import_modifiers
eglQueryDmaBufFormatsEXT(EGLDisplay dpy,EGLint max_formats,EGLint * formats,EGLint * num_formats)654 EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT(EGLDisplay dpy,
655 EGLint max_formats,
656 EGLint *formats,
657 EGLint *num_formats)
658 {
659 EnsureEGLLoaded();
660 return EGL_QueryDmaBufFormatsEXT(dpy, max_formats, formats, num_formats);
661 }
662
eglQueryDmaBufModifiersEXT(EGLDisplay dpy,EGLint format,EGLint max_modifiers,EGLuint64KHR * modifiers,EGLBoolean * external_only,EGLint * num_modifiers)663 EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT(EGLDisplay dpy,
664 EGLint format,
665 EGLint max_modifiers,
666 EGLuint64KHR *modifiers,
667 EGLBoolean *external_only,
668 EGLint *num_modifiers)
669 {
670 EnsureEGLLoaded();
671 return EGL_QueryDmaBufModifiersEXT(dpy, format, max_modifiers, modifiers, external_only,
672 num_modifiers);
673 }
674
675 // EGL_EXT_platform_base
eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,EGLConfig config,void * native_pixmap,const EGLint * attrib_list)676 EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT(EGLDisplay dpy,
677 EGLConfig config,
678 void *native_pixmap,
679 const EGLint *attrib_list)
680 {
681 EnsureEGLLoaded();
682 return EGL_CreatePlatformPixmapSurfaceEXT(dpy, config, native_pixmap, attrib_list);
683 }
684
eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,EGLConfig config,void * native_window,const EGLint * attrib_list)685 EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT(EGLDisplay dpy,
686 EGLConfig config,
687 void *native_window,
688 const EGLint *attrib_list)
689 {
690 EnsureEGLLoaded();
691 return EGL_CreatePlatformWindowSurfaceEXT(dpy, config, native_window, attrib_list);
692 }
693
eglGetPlatformDisplayEXT(EGLenum platform,void * native_display,const EGLint * attrib_list)694 EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT(EGLenum platform,
695 void *native_display,
696 const EGLint *attrib_list)
697 {
698 EnsureEGLLoaded();
699 return EGL_GetPlatformDisplayEXT(platform, native_display, attrib_list);
700 }
701
702 // EGL_KHR_debug
eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback,const EGLAttrib * attrib_list)703 EGLint EGLAPIENTRY eglDebugMessageControlKHR(EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list)
704 {
705 EnsureEGLLoaded();
706 return EGL_DebugMessageControlKHR(callback, attrib_list);
707 }
708
eglLabelObjectKHR(EGLDisplay display,EGLenum objectType,EGLObjectKHR object,EGLLabelKHR label)709 EGLint EGLAPIENTRY eglLabelObjectKHR(EGLDisplay display,
710 EGLenum objectType,
711 EGLObjectKHR object,
712 EGLLabelKHR label)
713 {
714 EnsureEGLLoaded();
715 return EGL_LabelObjectKHR(display, objectType, object, label);
716 }
717
eglQueryDebugKHR(EGLint attribute,EGLAttrib * value)718 EGLBoolean EGLAPIENTRY eglQueryDebugKHR(EGLint attribute, EGLAttrib *value)
719 {
720 EnsureEGLLoaded();
721 return EGL_QueryDebugKHR(attribute, value);
722 }
723
724 // EGL_KHR_fence_sync
eglClientWaitSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint flags,EGLTimeKHR timeout)725 EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy,
726 EGLSyncKHR sync,
727 EGLint flags,
728 EGLTimeKHR timeout)
729 {
730 EnsureEGLLoaded();
731 return EGL_ClientWaitSyncKHR(dpy, sync, flags, timeout);
732 }
733
eglCreateSyncKHR(EGLDisplay dpy,EGLenum type,const EGLint * attrib_list)734 EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
735 {
736 EnsureEGLLoaded();
737 return EGL_CreateSyncKHR(dpy, type, attrib_list);
738 }
739
eglDestroySyncKHR(EGLDisplay dpy,EGLSyncKHR sync)740 EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
741 {
742 EnsureEGLLoaded();
743 return EGL_DestroySyncKHR(dpy, sync);
744 }
745
eglGetSyncAttribKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint attribute,EGLint * value)746 EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy,
747 EGLSyncKHR sync,
748 EGLint attribute,
749 EGLint *value)
750 {
751 EnsureEGLLoaded();
752 return EGL_GetSyncAttribKHR(dpy, sync, attribute, value);
753 }
754
755 // EGL_KHR_image
eglCreateImageKHR(EGLDisplay dpy,EGLContext ctx,EGLenum target,EGLClientBuffer buffer,const EGLint * attrib_list)756 EGLImageKHR EGLAPIENTRY eglCreateImageKHR(EGLDisplay dpy,
757 EGLContext ctx,
758 EGLenum target,
759 EGLClientBuffer buffer,
760 const EGLint *attrib_list)
761 {
762 EnsureEGLLoaded();
763 return EGL_CreateImageKHR(dpy, ctx, target, buffer, attrib_list);
764 }
765
eglDestroyImageKHR(EGLDisplay dpy,EGLImageKHR image)766 EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
767 {
768 EnsureEGLLoaded();
769 return EGL_DestroyImageKHR(dpy, image);
770 }
771
772 // EGL_KHR_lock_surface3
eglLockSurfaceKHR(EGLDisplay dpy,EGLSurface surface,const EGLint * attrib_list)773 EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay dpy,
774 EGLSurface surface,
775 const EGLint *attrib_list)
776 {
777 EnsureEGLLoaded();
778 return EGL_LockSurfaceKHR(dpy, surface, attrib_list);
779 }
780
eglQuerySurface64KHR(EGLDisplay dpy,EGLSurface surface,EGLint attribute,EGLAttribKHR * value)781 EGLBoolean EGLAPIENTRY eglQuerySurface64KHR(EGLDisplay dpy,
782 EGLSurface surface,
783 EGLint attribute,
784 EGLAttribKHR *value)
785 {
786 EnsureEGLLoaded();
787 return EGL_QuerySurface64KHR(dpy, surface, attribute, value);
788 }
789
eglUnlockSurfaceKHR(EGLDisplay dpy,EGLSurface surface)790 EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
791 {
792 EnsureEGLLoaded();
793 return EGL_UnlockSurfaceKHR(dpy, surface);
794 }
795
796 // EGL_KHR_partial_update
eglSetDamageRegionKHR(EGLDisplay dpy,EGLSurface surface,EGLint * rects,EGLint n_rects)797 EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR(EGLDisplay dpy,
798 EGLSurface surface,
799 EGLint *rects,
800 EGLint n_rects)
801 {
802 EnsureEGLLoaded();
803 return EGL_SetDamageRegionKHR(dpy, surface, rects, n_rects);
804 }
805
806 // EGL_KHR_reusable_sync
eglSignalSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLenum mode)807 EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
808 {
809 EnsureEGLLoaded();
810 return EGL_SignalSyncKHR(dpy, sync, mode);
811 }
812
813 // EGL_KHR_stream
eglCreateStreamKHR(EGLDisplay dpy,const EGLint * attrib_list)814 EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list)
815 {
816 EnsureEGLLoaded();
817 return EGL_CreateStreamKHR(dpy, attrib_list);
818 }
819
eglDestroyStreamKHR(EGLDisplay dpy,EGLStreamKHR stream)820 EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream)
821 {
822 EnsureEGLLoaded();
823 return EGL_DestroyStreamKHR(dpy, stream);
824 }
825
eglQueryStreamKHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLint * value)826 EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy,
827 EGLStreamKHR stream,
828 EGLenum attribute,
829 EGLint *value)
830 {
831 EnsureEGLLoaded();
832 return EGL_QueryStreamKHR(dpy, stream, attribute, value);
833 }
834
eglQueryStreamu64KHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLuint64KHR * value)835 EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy,
836 EGLStreamKHR stream,
837 EGLenum attribute,
838 EGLuint64KHR *value)
839 {
840 EnsureEGLLoaded();
841 return EGL_QueryStreamu64KHR(dpy, stream, attribute, value);
842 }
843
eglStreamAttribKHR(EGLDisplay dpy,EGLStreamKHR stream,EGLenum attribute,EGLint value)844 EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy,
845 EGLStreamKHR stream,
846 EGLenum attribute,
847 EGLint value)
848 {
849 EnsureEGLLoaded();
850 return EGL_StreamAttribKHR(dpy, stream, attribute, value);
851 }
852
853 // EGL_KHR_stream_consumer_gltexture
eglStreamConsumerAcquireKHR(EGLDisplay dpy,EGLStreamKHR stream)854 EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream)
855 {
856 EnsureEGLLoaded();
857 return EGL_StreamConsumerAcquireKHR(dpy, stream);
858 }
859
eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy,EGLStreamKHR stream)860 EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream)
861 {
862 EnsureEGLLoaded();
863 return EGL_StreamConsumerGLTextureExternalKHR(dpy, stream);
864 }
865
eglStreamConsumerReleaseKHR(EGLDisplay dpy,EGLStreamKHR stream)866 EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream)
867 {
868 EnsureEGLLoaded();
869 return EGL_StreamConsumerReleaseKHR(dpy, stream);
870 }
871
872 // EGL_KHR_swap_buffers_with_damage
eglSwapBuffersWithDamageKHR(EGLDisplay dpy,EGLSurface surface,const EGLint * rects,EGLint n_rects)873 EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR(EGLDisplay dpy,
874 EGLSurface surface,
875 const EGLint *rects,
876 EGLint n_rects)
877 {
878 EnsureEGLLoaded();
879 return EGL_SwapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
880 }
881
882 // EGL_KHR_wait_sync
eglWaitSyncKHR(EGLDisplay dpy,EGLSyncKHR sync,EGLint flags)883 EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
884 {
885 EnsureEGLLoaded();
886 return EGL_WaitSyncKHR(dpy, sync, flags);
887 }
888
889 // EGL_NV_post_sub_buffer
eglPostSubBufferNV(EGLDisplay dpy,EGLSurface surface,EGLint x,EGLint y,EGLint width,EGLint height)890 EGLBoolean EGLAPIENTRY eglPostSubBufferNV(EGLDisplay dpy,
891 EGLSurface surface,
892 EGLint x,
893 EGLint y,
894 EGLint width,
895 EGLint height)
896 {
897 EnsureEGLLoaded();
898 return EGL_PostSubBufferNV(dpy, surface, x, y, width, height);
899 }
900
901 // EGL_NV_stream_consumer_gltexture_yuv
eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,EGLStreamKHR stream,const EGLAttrib * attrib_list)902 EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV(EGLDisplay dpy,
903 EGLStreamKHR stream,
904 const EGLAttrib *attrib_list)
905 {
906 EnsureEGLLoaded();
907 return EGL_StreamConsumerGLTextureExternalAttribsNV(dpy, stream, attrib_list);
908 }
909
910 } // extern "C"
911