Commit Graph

26 Commits

Author SHA1 Message Date
Eric Engestrom cc03448008 egl: inline _EGLAPI into _EGLDriver
_EGLDriver was an empty wrapper around _EGLAPI, so let's only keep one
of them. "driver" represents better what's being accessed, so that's the
one we're keeping.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5987>
2020-07-21 00:59:43 +00:00
Eric Engestrom eaf4396602 egl: move #include of local headers out of Khronos headers
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2019-11-11 17:20:16 +00:00
Emil Velikov 7552fcb7b9 egl: add base EGL_EXT_device_base implementation
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 <emil.velikov@collabora.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2018-11-01 00:05:43 +00:00
Emil Velikov 239e7ee91b egl: remove suprous header eglcompiler.h
The header is used only to provide STATIC_ASSERT. The latter is already
available in utils/macros.h so use that instead and kill of the header.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Chad Versace <chadversary@chromium.org>
2017-05-08 15:33:59 +01:00
Emil Velikov e3cc5ad49d egl/main: expose only core EGL functions statically
The EGL 1.3, 1.4 and 1.5 spec (as quoted below) explicitly mentions that
providing static symbols for functions provided by EGL extensions is not
portable. Considering that relatively recently we've seen a non-mesa
desktop EGL implementation, the fact that we opt for such behaviour has
gone unnoticed.

From the EGL 1.5 specification:
    For functions that are queryable with eglGetProcAddress,
    implementations may choose to also export those functions
    statically from the object libraries implementing those
    functions. However, portable clients cannot rely on this
    behavior.

To encourage devs against writing such non-portable code, let's hide the
symbols similar to the official binary driver from NVIDIA.

v2: Quote the EGL 1.5 spec, as suggested by Chad.

Cc: Brian Paul <brianp@vmware.com>
Cc: Chad Versace <chad.versace@intel.com>
Cc: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-05-14 21:00:05 +00:00
Alexander von Gluck IV 8362068c1b egl: Add needed extern "C" for C++ access
* Haiku's egl driver is C++ due to the interface natively being C++

Reviewed-⁠by: Brian Paul <brianp@vmware.com>
2015-05-14 14:08:37 -04:00
José Fonseca 8771285054 s/Tungsten Graphics/VMware/
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/alanh@tungstengraphics.com/alanh@vmware.com/
    s/jens@tungstengraphics.com/jowen@vmware.com/g
    s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
    s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
    s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
    s/michel@tungstengraphics.com/daenzer@vmware.com/g
    s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
    s/zack@tungstengraphics.com/zackr@vmware.com/

    # 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 <brianp@vmware.com>
2014-01-17 20:00:32 +00:00
Chia-I Wu f2001df508 egl: add copyright notices
The list of copyright holders could be incomplete.  Please update
directly or notify me if your name is missing.
2011-07-02 18:21:31 +09:00
Chia-I Wu 713c8734f4 egl: Move attributes in _EGLImage to _EGLImageAttribs.
The opaque nature of EGLImage implies that extensions almost always
define their own attributes.  Move attributes in _EGLImage to
_EGLImageAttribs and add a helper function to parse attribute lists.
2010-10-22 17:15:45 +08:00
Chia-I Wu 4eebea74a8 egl: Add support for EGL_KHR_reusable_sync.
Individual drivers still need to support and enable the extension.
2010-08-17 00:06:19 +08:00
Chia-I Wu 106466783f egl: Add dynamic array.
Dynamic arrays will be used to store configs and screens of a display.
2010-06-30 18:32:48 +08:00
Chia-I Wu 496724b869 egl: Silence warnings when compiled with -pedantic.
Just follow gcc's advices here.
2010-02-19 12:40:01 +08:00
Chia-I Wu 94cb321b5d egl: Clean up header inclusions.
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
2010-01-30 22:55:49 +08:00
Chia-I Wu a1c4a8a3c8 egl: Add support for EGL_KHR_image.
Individual drivers still need to implement the API hooks.
2010-01-25 11:28:27 +08:00
Chia-I Wu 7abf42626f egl: Add _EGLResource and _EGLResourceType.
Resources are objects managed by a display.  They can be linked to or
unlinked from a display.  It is also possible to check if a resource is
valid.
2010-01-24 20:38:15 +08:00
Chia-I Wu 5a2c9372a0 egl: Some per-driver data should be per-display.
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 <olvaffe@gmail.com>
2009-08-18 08:49:09 -06:00
Chia-I Wu 8e92ec9fdd egl: Add eglcompiler.h for compiler features.
Only INLINE (from mesa/main/compiler.h) is defined now.  It may be used
to deal with symbol visibility and int/pointer conversion in the future.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-07-17 11:36:45 -06:00
Brian Paul 19ca6ce573 egl: updated include paths (s/GLES/EGL/) 2008-06-04 10:09:49 -06:00
Brian Paul e3805cad0d egl: new eglGetProcAddress() code
The idea is to pass the call down to the device driver where an API-specific
query can be made.  Untested.
2008-05-30 14:50:33 -06:00
Brian Paul 0c8908c411 egl: added args string to _eglMain() 2008-05-28 12:56:36 -06:00
Brian Paul 1ed1027e88 assorted changes to compile with new EGL 1.4 headers (untested) 2008-05-27 13:45:41 -06:00
Brian Paul 4882279633 Some initial per-thread support.
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
2005-12-10 17:54:00 +00:00
Brian Paul 58f45fa44d added _EGLExtensions typedef 2005-11-29 04:44:33 +00:00
Brian Paul daf585d0f0 Move all the EGL API function pointers into a new _egl_api struct. 2005-11-24 04:02:16 +00:00
Jon Smirl 28d0a9c9dd Fix include path to make build work 2005-04-29 22:25:21 +00:00
Brian Paul adbff7e977 initial EGL code 2005-04-22 21:09:39 +00:00