We do not want them to be all over the places.
eglcurrent.c \
egldisplay.c \
egldriver.c \
+ eglfallbacks.c \
eglglobals.c \
eglimage.c \
egllog.c \
'eglcurrent.c',
'egldisplay.c',
'egldriver.c',
+ 'eglfallbacks.c',
'eglglobals.c',
'eglimage.c',
'egllog.c',
}
-/**
- * Just a placeholder/demo function. Real driver will never use this!
- */
-_EGLContext *
-_eglCreateContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
- _EGLContext *share_list, const EGLint *attrib_list)
-{
- return NULL;
-}
-
-
-/**
- * Default fallback routine - drivers should usually override this.
- */
-EGLBoolean
-_eglDestroyContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
-{
- if (!_eglIsContextBound(ctx))
- free(ctx);
- return EGL_TRUE;
-}
-
-
#ifdef EGL_VERSION_1_2
static EGLint
_eglQueryContextRenderBuffer(_EGLContext *ctx)
return EGL_TRUE;
}
-
-
-/**
- * Just a placeholder/demo function. Drivers should override this.
- */
-EGLBoolean
-_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw,
- _EGLSurface *read, _EGLContext *ctx)
-{
- return EGL_FALSE;
-}
-
-
-/**
- * This is defined by the EGL_MESA_copy_context extension.
- */
-EGLBoolean
-_eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source,
- EGLContext dest, EGLint mask)
-{
- /* This function will always have to be overridden/implemented in the
- * device driver. If the driver is based on Mesa, use _mesa_copy_context().
- */
- return EGL_FALSE;
-}
_EGLConfig *config, const EGLint *attrib_list);
-extern _EGLContext *
-_eglCreateContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, _EGLContext *share_list, const EGLint *attrib_list);
-
-
-extern EGLBoolean
-_eglDestroyContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
-
-
extern EGLBoolean
_eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint attribute, EGLint *value);
_eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read);
-extern EGLBoolean
-_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx);
-
-
-extern EGLBoolean
-_eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask);
-
-
/**
* Return true if the context is bound to a thread.
*
#include <stdlib.h>
#include "eglstring.h"
-#include "eglconfig.h"
-#include "eglcontext.h"
#include "egldefines.h"
#include "egldisplay.h"
#include "egldriver.h"
#include "egllog.h"
-#include "eglmisc.h"
-#include "eglmode.h"
-#include "eglscreen.h"
-#include "eglsurface.h"
-#include "eglimage.h"
-#include "eglsync.h"
#include "eglmutex.h"
#if defined(_EGL_OS_UNIX)
}
-/**
- * Plug all the available fallback routines into the given driver's
- * dispatch table.
- */
-void
-_eglInitDriverFallbacks(_EGLDriver *drv)
-{
- /* If a pointer is set to NULL, then the device driver _really_ has
- * to implement it.
- */
- drv->API.Initialize = NULL;
- drv->API.Terminate = NULL;
-
- drv->API.GetConfigs = _eglGetConfigs;
- drv->API.ChooseConfig = _eglChooseConfig;
- drv->API.GetConfigAttrib = _eglGetConfigAttrib;
-
- drv->API.CreateContext = _eglCreateContext;
- drv->API.DestroyContext = _eglDestroyContext;
- drv->API.MakeCurrent = _eglMakeCurrent;
- drv->API.QueryContext = _eglQueryContext;
-
- drv->API.CreateWindowSurface = _eglCreateWindowSurface;
- drv->API.CreatePixmapSurface = _eglCreatePixmapSurface;
- drv->API.CreatePbufferSurface = _eglCreatePbufferSurface;
- drv->API.DestroySurface = _eglDestroySurface;
- drv->API.QuerySurface = _eglQuerySurface;
- drv->API.SurfaceAttrib = _eglSurfaceAttrib;
- drv->API.BindTexImage = _eglBindTexImage;
- drv->API.ReleaseTexImage = _eglReleaseTexImage;
- drv->API.SwapInterval = _eglSwapInterval;
- drv->API.SwapBuffers = _eglSwapBuffers;
- drv->API.CopyBuffers = _eglCopyBuffers;
-
- drv->API.QueryString = _eglQueryString;
- drv->API.WaitClient = _eglWaitClient;
- drv->API.WaitNative = _eglWaitNative;
-
-#ifdef EGL_MESA_screen_surface
- drv->API.ChooseModeMESA = _eglChooseModeMESA;
- drv->API.GetModesMESA = _eglGetModesMESA;
- drv->API.GetModeAttribMESA = _eglGetModeAttribMESA;
- drv->API.GetScreensMESA = _eglGetScreensMESA;
- drv->API.CreateScreenSurfaceMESA = _eglCreateScreenSurfaceMESA;
- drv->API.ShowScreenSurfaceMESA = _eglShowScreenSurfaceMESA;
- drv->API.ScreenPositionMESA = _eglScreenPositionMESA;
- drv->API.QueryScreenMESA = _eglQueryScreenMESA;
- drv->API.QueryScreenSurfaceMESA = _eglQueryScreenSurfaceMESA;
- drv->API.QueryScreenModeMESA = _eglQueryScreenModeMESA;
- drv->API.QueryModeStringMESA = _eglQueryModeStringMESA;
-#endif /* EGL_MESA_screen_surface */
-
-#ifdef EGL_VERSION_1_2
- drv->API.CreatePbufferFromClientBuffer = _eglCreatePbufferFromClientBuffer;
-#endif /* EGL_VERSION_1_2 */
-
-#ifdef EGL_KHR_image_base
- drv->API.CreateImageKHR = _eglCreateImageKHR;
- drv->API.DestroyImageKHR = _eglDestroyImageKHR;
-#endif /* EGL_KHR_image_base */
-
-#ifdef EGL_KHR_reusable_sync
- drv->API.CreateSyncKHR = _eglCreateSyncKHR;
- drv->API.DestroySyncKHR = _eglDestroySyncKHR;
- drv->API.ClientWaitSyncKHR = _eglClientWaitSyncKHR;
- drv->API.SignalSyncKHR = _eglSignalSyncKHR;
- drv->API.GetSyncAttribKHR = _eglGetSyncAttribKHR;
-#endif /* EGL_KHR_reusable_sync */
-}
-
-
/**
* Invoke a callback function on each EGL search path.
*
_eglUnloadDrivers(void);
+/* defined in eglfallbacks.c */
PUBLIC void
_eglInitDriverFallbacks(_EGLDriver *drv);
--- /dev/null
+#include <string.h>
+#include "egltypedefs.h"
+#include "egldriver.h"
+#include "eglconfig.h"
+#include "eglcontext.h"
+#include "eglsurface.h"
+#include "eglmisc.h"
+#include "eglscreen.h"
+#include "eglmode.h"
+#include "eglsync.h"
+
+
+static EGLBoolean
+_eglReturnFalse(void)
+{
+ return EGL_FALSE;
+}
+
+
+/**
+ * Plug all the available fallback routines into the given driver's
+ * dispatch table.
+ */
+void
+_eglInitDriverFallbacks(_EGLDriver *drv)
+{
+ memset(&drv->API, 0, sizeof(drv->API));
+
+ /* the driver has to implement these */
+ drv->API.Initialize = NULL;
+ drv->API.Terminate = NULL;
+
+ drv->API.GetConfigs = _eglGetConfigs;
+ drv->API.ChooseConfig = _eglChooseConfig;
+ drv->API.GetConfigAttrib = _eglGetConfigAttrib;
+
+ drv->API.CreateContext = (CreateContext_t) _eglReturnFalse;
+ drv->API.DestroyContext = (DestroyContext_t) _eglReturnFalse;
+ drv->API.MakeCurrent = (MakeCurrent_t) _eglReturnFalse;
+ drv->API.QueryContext = _eglQueryContext;
+
+ drv->API.CreateWindowSurface = (CreateWindowSurface_t) _eglReturnFalse;
+ drv->API.CreatePixmapSurface = (CreatePixmapSurface_t) _eglReturnFalse;
+ drv->API.CreatePbufferSurface = (CreatePbufferSurface_t) _eglReturnFalse;
+ drv->API.CreatePbufferFromClientBuffer =
+ (CreatePbufferFromClientBuffer_t) _eglReturnFalse;
+ drv->API.DestroySurface = (DestroySurface_t) _eglReturnFalse;
+ drv->API.QuerySurface = _eglQuerySurface;
+ drv->API.SurfaceAttrib = _eglSurfaceAttrib;
+
+ drv->API.BindTexImage = (BindTexImage_t) _eglReturnFalse;
+ drv->API.ReleaseTexImage = (ReleaseTexImage_t) _eglReturnFalse;
+ drv->API.CopyBuffers = (CopyBuffers_t) _eglReturnFalse;
+ drv->API.SwapBuffers = (SwapBuffers_t) _eglReturnFalse;
+ drv->API.SwapInterval = _eglSwapInterval;
+
+ drv->API.WaitClient = (WaitClient_t) _eglReturnFalse;
+ drv->API.WaitNative = (WaitNative_t) _eglReturnFalse;
+ drv->API.GetProcAddress = (GetProcAddress_t) _eglReturnFalse;
+ drv->API.QueryString = _eglQueryString;
+
+#ifdef EGL_MESA_screen_surface
+ drv->API.CopyContextMESA = (CopyContextMESA_t) _eglReturnFalse;
+ drv->API.CreateScreenSurfaceMESA =
+ (CreateScreenSurfaceMESA_t) _eglReturnFalse;
+ drv->API.ShowScreenSurfaceMESA = (ShowScreenSurfaceMESA_t) _eglReturnFalse;
+ drv->API.ChooseModeMESA = _eglChooseModeMESA;
+ drv->API.GetModesMESA = _eglGetModesMESA;
+ drv->API.GetModeAttribMESA = _eglGetModeAttribMESA;
+ drv->API.GetScreensMESA = _eglGetScreensMESA;
+ drv->API.ScreenPositionMESA = _eglScreenPositionMESA;
+ drv->API.QueryScreenMESA = _eglQueryScreenMESA;
+ drv->API.QueryScreenSurfaceMESA = _eglQueryScreenSurfaceMESA;
+ drv->API.QueryScreenModeMESA = _eglQueryScreenModeMESA;
+ drv->API.QueryModeStringMESA = _eglQueryModeStringMESA;
+#endif /* EGL_MESA_screen_surface */
+
+#ifdef EGL_KHR_image_base
+ drv->API.CreateImageKHR = NULL;
+ drv->API.DestroyImageKHR = NULL;
+#endif /* EGL_KHR_image_base */
+
+#ifdef EGL_KHR_reusable_sync
+ drv->API.CreateSyncKHR = NULL;
+ drv->API.DestroySyncKHR = NULL;
+ drv->API.ClientWaitSyncKHR = NULL;
+ drv->API.SignalSyncKHR = NULL;
+ drv->API.GetSyncAttribKHR = _eglGetSyncAttribKHR;
+#endif /* EGL_KHR_reusable_sync */
+
+#ifdef EGL_MESA_drm_image
+ drv->API.CreateDRMImageMESA = NULL;
+ drv->API.ExportDRMImageMESA = NULL;
+#endif
+
+#ifdef EGL_NOK_swap_region
+ drv->API.SwapBuffersRegionNOK = NULL;
+#endif
+}
}
-_EGLImage *
-_eglCreateImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx,
- EGLenum target, EGLClientBuffer buffer,
- const EGLint *attr_list)
-{
- /* driver should override this function */
- return NULL;
-}
-
-
-EGLBoolean
-_eglDestroyImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image)
-{
- /* driver should override this function */
- return EGL_FALSE;
-}
-
-
#endif /* EGL_KHR_image_base */
_eglInitImage(_EGLImage *img, _EGLDisplay *dpy);
-extern _EGLImage *
-_eglCreateImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx,
- EGLenum target, EGLClientBuffer buffer, const EGLint *attr_list);
-
-
-extern EGLBoolean
-_eglDestroyImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image);
-
-
/**
* Link an image to a display and return the handle of the link.
* The handle can be passed to client directly.
return NULL;
}
}
-
-
-EGLBoolean
-_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx)
-{
- /* just a placeholder */
- (void) drv;
- (void) dpy;
- (void) ctx;
- return EGL_TRUE;
-}
-
-
-EGLBoolean
-_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine)
-{
- /* just a placeholder */
- (void) drv;
- (void) dpy;
- switch (engine) {
- case EGL_CORE_NATIVE_ENGINE:
- break;
- default:
- _eglError(EGL_BAD_PARAMETER, "eglWaitNative(engine)");
- return EGL_FALSE;
- }
-
- return EGL_TRUE;
-}
_eglQueryString(_EGLDriver *drv, _EGLDisplay *dpy, EGLint name);
-extern EGLBoolean
-_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx);
-
-
-extern EGLBoolean
-_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine);
-
-
#endif /* EGLMISC_INCLUDED */
}
-/**
- * Drivers should do a proper implementation.
- */
-_EGLSurface *
-_eglCreateScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
- const EGLint *attrib_list)
-{
- return NULL;
-}
-
-
-/**
- * Show the given surface on the named screen.
- * If surface is EGL_NO_SURFACE, disable the screen's output.
- *
- * This is just a placeholder function; drivers will always override
- * this with code that _really_ shows the surface.
- */
-EGLBoolean
-_eglShowScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy,
- _EGLScreen *scrn, _EGLSurface *surf,
- _EGLMode *mode)
-{
- if (!surf) {
- scrn->CurrentSurface = NULL;
- }
- else {
- if (surf->Type != EGL_SCREEN_BIT_MESA) {
- _eglError(EGL_BAD_SURFACE, "eglShowSurfaceMESA");
- return EGL_FALSE;
- }
- if (surf->Width < mode->Width || surf->Height < mode->Height) {
- _eglError(EGL_BAD_SURFACE,
- "eglShowSurfaceMESA(surface smaller than screen size)");
- return EGL_FALSE;
- }
-
- scrn->CurrentSurface = surf;
- scrn->CurrentMode = mode;
- }
- return EGL_TRUE;
-}
-
-
/**
* Set a screen's current display mode.
* Note: mode = EGL_NO_MODE is valid (turns off the screen)
_eglGetScreensMESA(_EGLDriver *drv, _EGLDisplay *dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens);
-extern _EGLSurface *
-_eglCreateScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, const EGLint *attrib_list);
-
-
-extern EGLBoolean
-_eglShowScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, _EGLSurface *surf, _EGLMode *m);
-
-
extern EGLBoolean
_eglScreenModeMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, _EGLMode *m);
}
-EGLBoolean
-_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
-{
- /* Drivers have to do the actual buffer swap. */
- return EGL_TRUE;
-}
-
-
-EGLBoolean
-_eglCopyBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
- EGLNativePixmapType target)
-{
- /* copy surface to native pixmap */
- /* All implementation burdon for this is in the device driver */
- return EGL_FALSE;
-}
-
-
EGLBoolean
_eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
EGLint attribute, EGLint *value)
}
-/**
- * Drivers should do a proper implementation.
- */
-_EGLSurface *
-_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
- EGLNativeWindowType window, const EGLint *attrib_list)
-{
- return NULL;
-}
-
-
-/**
- * Drivers should do a proper implementation.
- */
-_EGLSurface *
-_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
- EGLNativePixmapType pixmap, const EGLint *attrib_list)
-{
- return NULL;
-}
-
-
-/**
- * Drivers should do a proper implementation.
- */
-_EGLSurface *
-_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf,
- const EGLint *attrib_list)
-{
- return NULL;
-}
-
-
-/**
- * Default fallback routine - drivers should usually override this.
- */
-EGLBoolean
-_eglDestroySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
-{
- if (!_eglIsSurfaceBound(surf))
- free(surf);
- return EGL_TRUE;
-}
-
-
/**
* Default fallback routine - drivers might override this.
*/
}
-EGLBoolean
-_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface,
- EGLint buffer)
-{
- /* Just do basic error checking and return success/fail.
- * Drivers must implement the real stuff.
- */
-
- if (surface->Type != EGL_PBUFFER_BIT) {
- _eglError(EGL_BAD_SURFACE, "eglBindTexImage");
- return EGL_FALSE;
- }
-
- if (surface->TextureFormat == EGL_NO_TEXTURE) {
- _eglError(EGL_BAD_MATCH, "eglBindTexImage");
- return EGL_FALSE;
- }
-
- if (buffer != EGL_BACK_BUFFER) {
- _eglError(EGL_BAD_PARAMETER, "eglReleaseTexImage");
- return EGL_FALSE;
- }
-
- if (!surface->BoundToTexture) {
- _eglError(EGL_BAD_SURFACE, "eglReleaseTexImage");
- return EGL_FALSE;
- }
-
- surface->BoundToTexture = EGL_FALSE;
-
- return EGL_TRUE;
-}
-
-
EGLBoolean
_eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
EGLint interval)
_eglClampSwapInterval(surf, interval);
return EGL_TRUE;
}
-
-
-#ifdef EGL_VERSION_1_2
-
-/**
- * Example function - drivers should do a proper implementation.
- */
-_EGLSurface *
-_eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLenum buftype, EGLClientBuffer buffer,
- _EGLConfig *conf, const EGLint *attrib_list)
-{
- if (buftype != EGL_OPENVG_IMAGE) {
- _eglError(EGL_BAD_PARAMETER, "eglCreatePbufferFromClientBuffer");
- return NULL;
- }
-
- return NULL;
-}
-
-#endif /* EGL_VERSION_1_2 */
_EGLConfig *config, const EGLint *attrib_list);
-extern EGLBoolean
-_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf);
-
-
-extern EGLBoolean
-_eglCopyBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLNativePixmapType target);
-
-
extern EGLBoolean
_eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint attribute, EGLint *value);
-extern _EGLSurface *
-_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, EGLNativeWindowType window, const EGLint *attrib_list);
-
-
-extern _EGLSurface *
-_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, EGLNativePixmapType pixmap, const EGLint *attrib_list);
-
-
-extern _EGLSurface *
-_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, const EGLint *attrib_list);
-
-
-extern EGLBoolean
-_eglDestroySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf);
-
-
extern EGLBoolean
_eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint attribute, EGLint value);
_eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint buffer);
-extern EGLBoolean
-_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint buffer);
-
-
extern EGLBoolean
_eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval);
-#ifdef EGL_VERSION_1_2
-
-extern _EGLSurface *
-_eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLenum buftype, EGLClientBuffer buffer,
- _EGLConfig *conf, const EGLint *attrib_list);
-
-#endif /* EGL_VERSION_1_2 */
-
-
/**
* Return true if there is a context bound to the surface.
*
}
-_EGLSync *
-_eglCreateSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLenum type, const EGLint *attrib_list)
-{
- return NULL;
-}
-
-
-EGLBoolean
-_eglDestroySyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync)
-{
- return EGL_TRUE;
-}
-
-
-EGLint
-_eglClientWaitSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- EGLint flags, EGLTimeKHR timeout)
-{
- return EGL_FALSE;
-}
-
-
-EGLBoolean
-_eglSignalSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- EGLenum mode)
-{
- return EGL_FALSE;
-}
-
-
EGLBoolean
_eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
EGLint attribute, EGLint *value)
const EGLint *attrib_list);
-extern _EGLSync *
-_eglCreateSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy,
- EGLenum type, const EGLint *attrib_list);
-
-
-extern EGLBoolean
-_eglDestroySyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync);
-
-
-extern EGLint
-_eglClientWaitSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- EGLint flags, EGLTimeKHR timeout);
-
-
-extern EGLBoolean
-_eglSignalSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
- EGLenum mode);
-
-
extern EGLBoolean
_eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
EGLint attribute, EGLint *value);