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