aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglglobals.h
Commit message (Collapse)AuthorAgeFilesLines
* egl: simplify client/platform extension handlingEmil Velikov2020-04-211-7/+6
| | | | | | | | | | | | | | | | For GLVND reasons the client/platform extensions strings should be split. While in the non GLVND case they're one big string. Currently we handle this distinction at run-time for not obvious reason. Adding additional code and complexity. Swap those with a few well placed #if USE_LIBGLVND guards. As a side result this removes a minor memory leak due to the concatenation in the non GLVND case. Signed-off-by: Emil Velikov <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4491>
* egl: add base EGL_EXT_device_base implementationEmil Velikov2018-11-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Introduce the API for device query and enumeration. Those at the moment produce nothing useful since zero devices are actually available. That contradicts with the spec, so the extension isn't advertised just yet. With later commits we'll add support for software (always) and hardware devices. Each one exposing the respective extension string. v2: - fold API boilerplate into this patch - move _eglAddDevice, _eglDeviceSupports, _eglRefreshDeviceList to this patch (Eric, Mathias) - make _eglFiniDevice the one called last v3: - comment on the dummy _egl_device_extension enum entry (Eric) - annotate dev as MAYBE_UNUSED (Mathias) Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* egl: Move _eglPointerIsDereferencable() to eglglobals.[ch]Miguel A. Vico2017-07-241-0/+6
| | | | | | | | | | Move _eglPointerIsDereferencable() to eglglobals.[ch] and make it a non-static function so it can be used out of egldisplay.c Signed-off-by: Miguel A. Vico <[email protected]> Reviewed-by: James Jones <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* EGL: Implement the libglvnd interface for EGL (v3)Kyle Brenneman2017-04-171-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | The new interface mostly just sits on top of the existing library. The only change to the existing EGL code is to split the client extension string into platform extensions and everything else. On non-glvnd builds, eglQueryString will just concatenate the two strings. The EGL dispatch stubs are all generated. The script is based on the one used to generate entrypoints in libglvnd itself. v2: [Kyle] - Rebased against master. - Reworked the EGL makefile to use separate libraries - Made the EGL code generation scripts work with Python 2 and 3. - Change gen_egl_dispatch.py to use argparse for the command line arguments. - Assorted formatting and style cleanup in the Python scripts. v3: [Emil Velikov] - Rebase - Remove separate glvnd glx/egl configure toggles Signed-off-by: Emil Velikov <[email protected]>
* egl: Track EGL_KHR_debug state when going through EGL API calls (v3)Kyle Brenneman2016-10-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | This decorates every EGL entrypoint with _EGL_FUNC_START, which records the function name and primary dispatch object label in the current thread state. It also adds debug report functions and calls them when appropriate. This would be useful enough for debugging on its own, if the user set a breakpoint when the report function was called. We will also need this state tracked in order to expose EGL_KHR_debug. v2: - Clear the object label in more cases in _eglSetFuncName - Pass draw surface (if any) to _EGL_FUNC_START in eglSwapInterval v3: - Set dummy thread's CurrentAPI to EGL_OPENGL_ES_API not zero - Less ?: in _eglSetFuncName Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Add storage for EGL_KHR_debug's state to EGL objectsKyle Brenneman2016-09-141-0/+10
| | | | | Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: remove unused _egl_global::ClientExtensionsMarek Olšák2015-06-051-9/+0
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/main: use c11/threads' mutex directlyEmil Velikov2015-03-111-2/+2
| | | | | | | Remove the inline wrappers/abstraction layer. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "egl/main: use c11/threads' mutex directly"Emil Velikov2015-03-061-2/+2
| | | | | | This reverts commit 6cee785c69a5c8d2d32b6807f9c502117f5a74b0. Not meant to go in yet. Lacking review.
* egl/main: use c11/threads' mutex directlyEmil Velikov2015-03-061-2/+2
| | | | | | Remove the inline wrappers/abstraction layer. Signed-off-by: Emil Velikov <[email protected]>
* egl: Expose EGL_KHR_get_all_proc_addresses and its client extensionChad Versace2014-12-071-0/+1
| | | | | | | | | Mesa already implements the behavior of EGL_KHR_get_all_proc_addresses and EGL_KHR_client_get_all_proc_addresses. This patch just exposes the extension strings. See: https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_get_all_proc_addresses.txt Signed-off-by: Chad Versace <[email protected]>
* egl/main: Enable Linux platform extensionsChad Versace2014-03-171-0/+4
| | | | | | | | | | | | | | | | Enable EGL_EXT_platform_base and the Linux platform extensions layered atop it: EGL_EXT_platform_x11, EGL_EXT_platform_wayland, and EGL_MESA_platform_gbm. Tested with Piglit's EGL_EXT_platform_base tests under an X11 session. To enable running the Wayland and GBM tests, windowed Weston was running and the kernel had render nodes enabled. I regression tested my EGL_EXT_platform_base patch set with Piglit on Ivybridge under X11/EGL, standalone Weston, and GBM with rendernodes. No regressions found. Signed-off-by: Chad Versace <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* egl: Enable EGL_EXT_client_extensionsChad Versace2013-11-261-0/+7
| | | | | | | | | | | | | | Insert two fields into _egl_global to hold the client extensions and statically initialize them: ClientExtensions // a struct of bools ClientExtensionString Post-patch, Mesa supports exactly one client extension, EGL_EXT_client_extensions. Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* egl: add copyright noticesChia-I Wu2011-07-021-0/+30
| | | | | The list of copyright holders could be incomplete. Please update directly or notify me if your name is missing.
* egl: Add checks for EGL_MESA_screen_surface.Chia-I Wu2010-07-311-2/+0
| | | | | This allows Mesa EGL to be compiled with eglext.h that does not define EGL_MESA_screen_surface.
* egl: Rework driver loading.Chia-I Wu2010-07-061-4/+0
| | | | | | | | | | | | | | | Driver loading is now splitted into two stages. In the first stage, an _EGLModule is created for each driver: user driver, default drivers, and all files in the search directories that start with "egl_". Modules are not loaded at this stage. In the second stage, each module is loaded to initialize a display. The process stops at the first module that can initialize the display. If eglGetProcAddress is called before eglInitialize, the same code path will be taken to find the first module that supports EGL_DEFAULT_DISPLAY. Because we do not want to initialize the display, drv->Probe is used instead in this case.
* egl: Revisit global data locking.Chia-I Wu2010-02-171-0/+1
| | | | | Lock the global mutex in _eglPreloadDrivers and _eglAllocScreenHandle. Add comments to why certain pathes do not need locking.
* egl: Clean up header inclusions.Chia-I Wu2010-01-301-2/+1
| | | | Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
* egl: Allow binding to any client API.Chia-I Wu2009-10-131-3/+0
| | | | | | | As a result, EGL_NONE is no longer a valid client API. And it is possible that no config supports the current bound API. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Remove hash table for displays.Chia-I Wu2009-08-181-1/+5
| | | | | | | The hash table was used to map a display to a handle. It is simpler to cast directly. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Some per-driver data should be per-display.Chia-I Wu2009-08-181-2/+0
| | | | | | | Move some fields of _EGLDriver to _EGLDisplay. It also becomes unnecessary to pass _EGLDisplay to drivers when _eglMain is called. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Add _eglAddAtExitCall.Chia-I Wu2009-08-111-0/+9
| | | | | | | Add a convenient wrapper to register atexit calls. Add mutex to _eglGlobal along the way. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Make _eglGlobal initialize statically.Chia-I Wu2009-08-111-10/+0
| | | | | | | Now that display and surface hash tables are moved out, _eglGlobal can be initialized statically. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Make display and surface hash tables local.Chia-I Wu2009-08-111-4/+0
| | | | | | | Move display and surface hash tables to egldisplay.c, and have them initialized on demand. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Use the link functions to manage resources.Chia-I Wu2009-07-171-0/+1
| | | | | | | | This commit uses the newly introduced link functions to manage EGL contexts and surfaces. As a result of this, the API for drivers are changed. All drivers are updated for the change. Signed-off-by: Chia-I Wu <[email protected]>
* egl: Support per-thread info.Chia-I Wu2009-07-171-30/+1
| | | | | | | | | This commit introduces a "current" system to manage per-thread info. It uses TLS, if GLX_USE_TLS is defined, or pthread, if PTHREADS is defined. If none of them are defined, it uses a dummy implementation that is just like before. Signed-off-by: Chia-I Wu <[email protected]>
* egl: new eglGetProcAddress() codeBrian Paul2008-05-301-0/+3
| | | | | The idea is to pass the call down to the device driver where an API-specific query can be made. Untested.
* egl: clean-up re-org of the client API stateBrian Paul2008-05-301-4/+4
|
* added EGL_OPENGL_API caseBrian Paul2008-05-271-0/+1
|
* eliminate the context hash tableBrian Paul2008-05-271-1/+0
| | | | | In EGL 1.4 the opaque EGLContext type is a pointer so we can just cast between public EGLContext handles and private _EGLContext pointers.
* some initial EGL 1.2 workBrian Paul2006-01-301-2/+15
|
* minor code movementBrian Paul2005-12-171-4/+0
|
* Some initial per-thread support.Brian Paul2005-12-101-4/+19
| | | | Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
* sync with latest EGL_MESA_screen_surface spec (EGLScreenMESA handles)Brian Paul2005-05-041-0/+6
|
* initial EGL codeBrian Paul2005-04-221-0/+38