mesa/src/egl/main
Dylan Baker a857bc66dc Revert "egl: move #include of local headers out of Khronos headers"
This reverts commit 87efb9f3a4.

This is breaking the QT build, so it needs to go until these symbols can
make their way to upstream khronos
2019-12-12 09:24:42 -08:00
..
50_mesa.json EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
egl.def egl: Add egl.def for win32 build. 2010-08-20 19:22:50 +08:00
eglapi.c Revert "egl: implement new functions from EGL_EXT_image_flush_external" 2019-11-14 08:43:21 -08:00
eglapi.h Revert "egl: implement new functions from EGL_EXT_image_flush_external" 2019-11-14 08:43:21 -08:00
eglarray.c egl: _eglFilterArray's filter is always non-null 2017-02-16 15:27:20 +00:00
eglarray.h egl: Add needed extern "C" for C++ access 2015-05-14 14:08:37 -04:00
eglconfig.c Revert "egl: Fixes transparency with EGL and X11." 2019-10-18 18:41:51 +00:00
eglconfig.h Revert "egl: Fixes transparency with EGL and X11." 2019-10-18 18:41:51 +00:00
eglcontext.c egl: Allow EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY in ES and GL 2019-05-17 15:13:15 -07:00
eglcontext.h egl: use coherent variable names 2019-02-06 11:53:24 +00:00
eglcurrent.c mesa: Rename GLX_USE_TLS to USE_ELF_TLS. 2019-08-03 20:18:17 +02:00
eglcurrent.h egl: simplify _eglDebugReport* API 2017-09-19 19:07:16 +01:00
egldefines.h egl: remove unused include 2019-01-11 14:37:47 +00:00
egldevice.c tree-wide: replace MAYBE_UNUSED with ASSERTED 2019-07-31 09:41:05 +01:00
egldevice.h egl: add EGL_platform_device support 2019-06-05 13:35:21 -04:00
egldispatchstubs.c egl/glvnd: correctly report errors when vendor cannot be found 2018-11-05 20:53:05 +00:00
egldispatchstubs.h EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
egldisplay.c egl: fix _EGL_NATIVE_PLATFORM fallback 2019-11-11 11:44:26 -08:00
egldisplay.h Revert "egl: implement new functions from EGL_EXT_image_flush_external" 2019-11-14 08:43:21 -08:00
egldriver.c egl: fix deadlock in malloc error path 2019-09-04 00:10:18 +01:00
egldriver.h egl: drop empty eglfallbacks.c 2019-06-25 06:36:54 +00:00
eglentrypoint.h Revert "egl: implement new functions from EGL_EXT_image_flush_external" 2019-11-14 08:43:21 -08:00
eglglobals.c Revert "egl: Fixes transparency with EGL and X11." 2019-10-18 18:41:51 +00:00
eglglobals.h egl: add base EGL_EXT_device_base implementation 2018-11-01 00:05:43 +00:00
eglglvnd.c EGL: Implement the libglvnd interface for EGL (v3) 2017-04-17 13:03:58 +01:00
eglimage.c Revert "egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT" 2019-11-14 08:43:25 -08:00
eglimage.h Revert "egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT" 2019-11-14 08:43:25 -08:00
egllog.c win32: unify strcasecmp definitions 2019-08-15 20:23:44 +02:00
egllog.h egl: remove no longer needed logger infra 2017-05-08 15:33:54 +01:00
eglsurface.c egl: store the native surface pointer in struct _egl_surface 2019-05-14 12:41:14 +00:00
eglsurface.h egl: store the native surface pointer in struct _egl_surface 2019-05-14 12:41:14 +00:00
eglsync.c egl: use coherent variable names 2019-02-06 11:53:24 +00:00
eglsync.h egl: use coherent variable names 2019-02-06 11:53:24 +00:00
egltypedefs.h Revert "egl: move #include of local headers out of Khronos headers" 2019-12-12 09:24:42 -08:00
README.txt egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku} 2018-10-31 11:01:54 +00:00


Notes about the EGL library:


The EGL code here basically consists of two things:

1. An EGL API dispatcher.  This directly routes all the eglFooBar() API
   calls into driver-specific functions.

2. Fallbacks for EGL API functions.  A driver _could_ implement all the
   EGL API calls from scratch.  But in many cases, the fallbacks provided
   in libEGL (such as eglChooseConfig()) will do the job.



Bootstrapping:

When the apps calls eglInitialize() a device driver is selected and loaded
(look for _eglAddDrivers() and _eglLoadModule() in egldriver.c).

The built-in driver's entry point function is then called and given
a freshly allocated and initialised _EGLDriver, with default fallback
entrypoints set.

As part of initialization, the dispatch table in _EGLDriver->API must be
populated with all the EGL entrypoints. Some functions like
driver->API.Initialize and driver->API.Terminate _must_ be implemented
with driver-specific code (no default/fallback function is possible).


Shortly after, the driver->API.Initialize() function is executed.  Any additional
driver initialization that wasn't done in the driver entry point should be
done at this point.  Typically, this will involve setting up visual configs, etc.



Special Functions:

Certain EGL functions _must_ be implemented by the driver.  This includes:

eglCreateContext
eglCreateWindowSurface
eglCreatePixmapSurface
eglCreatePBufferSurface
eglMakeCurrent
eglSwapBuffers

Most of the EGLConfig-related functions can be implemented with the
defaults/fallbacks.  Same thing for the eglGet/Query functions.




Teardown:

When eglTerminate() is called, the driver->API.Terminate() function is
called.  The driver should clean up after itself.  eglTerminate() will
then close/unload the driver (shared library).




Subclassing:

The internal libEGL data structures such as _EGLDisplay, _EGLContext,
_EGLSurface, etc should be considered base classes from which drivers
will derive subclasses.