mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 19:38:10 +02:00
This new 'platform' is added by default with no guards. It is effectively a copy of the surfaceless one, with updated function names and brand new probe function. Due to the reuse, some of the ifdef HAVE_SURFACELESS_PLATFORM guards have been dropped. A worthy mention are the changes in _egFindDisplay, since the original and dup'd fd are required, we make use of the plat_opt argument. Note that no hacks for eglGetDisplay are added - the API works only with the eglGetPlatformDisplay* API. v2: - s/_eglCompareDeviceDisplay/_eglSameDeviceDisplay/ (Eric) - let ^^ return bool (Eric) - fixup meson build, move files() further up (Eric) - copy from plat. surfaceless w/o the visual cleanups - close and free when destroying the dpy - sprinkle a few _eglDeviceSupports - split fd handling into separate function - use directly the render node if no FD is given (Mathias) v3: - s/dpy/disp/g - drop swap_buffers* callbacks - drop loader_set_logger() - drop local define - re-introduce _eglGetDRMDeviceRenderNode() - EGL_WARN on ForceSoftware with HW device - continue using the HW device - bail out for "EGL_MESA_device_software" until it's fixed - wire-up the Android build v4: - use new style _eglFindDisplay() - split hw vs sw code paths - don't close the internal fd (already handled in FiniDisplay()) - make swrast work (bit hacky bit will do for now) - Android for real, drop autotools - Correct HW + LIBGL_ALWAYS_SOFTWARE check - use the dri2_create_drawable() helper v5: - enhance comment around fd checks (Mathias) - rebase for dri2_init_surface() changes Cc: Mathias Fröhlich <Mathias.Froehlich@gmx.net> Acked-by: Marek Olšák <marek.olsak@amd.com> (v4) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com> |
||
|---|---|---|
| .. | ||
| 50_mesa.json | ||
| egl.def | ||
| eglapi.c | ||
| eglapi.h | ||
| eglarray.c | ||
| eglarray.h | ||
| eglconfig.c | ||
| eglconfig.h | ||
| eglcontext.c | ||
| eglcontext.h | ||
| eglcurrent.c | ||
| eglcurrent.h | ||
| egldefines.h | ||
| egldevice.c | ||
| egldevice.h | ||
| egldispatchstubs.c | ||
| egldispatchstubs.h | ||
| egldisplay.c | ||
| egldisplay.h | ||
| egldriver.c | ||
| egldriver.h | ||
| eglentrypoint.h | ||
| eglfallbacks.c | ||
| eglglobals.c | ||
| eglglobals.h | ||
| eglglvnd.c | ||
| eglimage.c | ||
| eglimage.h | ||
| egllog.c | ||
| egllog.h | ||
| eglsurface.c | ||
| eglsurface.h | ||
| eglsync.c | ||
| eglsync.h | ||
| egltypedefs.h | ||
| README.txt | ||
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.