Commit Graph

227 Commits

Author SHA1 Message Date
Chia-I Wu 0eaa02c836 egl: Change the way drivers are loaded.
Driver is chosen and preloaded when eglGetDisplay is called.  Later when
eglInitialize is called, the same driver is matched to initialize the
display.  Also, add new, but unused, hooks to EGLDriver to allow a
driver to probe a display or unload itself.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:44:44 -06:00
Chia-I Wu 2f2cf461c5 egl: Overhaul driver API.
The motivation is so that drivers do not need to look up and check for
bad display, context, and etc.  It also becomes unnecessary for drivers
to call the link functions.

This commit makes eglapi.[ch] do the lookup and check.  As a result, the
driver API is overhauled, and almost all sources and drivers need
update.  The updates are mainly find and replace with human brains.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:44:34 -06:00
Chia-I Wu 0e3687e33d egl: Make _eglGlobal initialize statically.
Now that display and surface hash tables are moved out, _eglGlobal can
be initialized statically.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu be9d1ab171 egl: Return the same EGL Display for the same native display.
The latest revision of the spec explicitly requires the same handle to
be returned for the same native display.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17 11:53:39 -06:00
Chia-I Wu 18457cb263 egl: Add funtions to link contexts and surfaces to displays.
EGL contexts and surfaces are resources of displays.  They should be
managed by displays.  This commit adds a bunch of functions to
egldisplay.c to help establish the links between contexts/surfaces and
displays.  How links are established is considered opaque outside
display.  Functions like _eglGetSurfaceHandle or _eglLookupSurface are
therefore moved to egldisplay.c, with some small modifications.

The idea is also extended to display.  That is, displays need to link to
themselves to be looked up.

This commit only adds the functions.  A commit to use them should
follow.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17 11:48:27 -06:00
Chia-I Wu 21b635ffa8 egl: Extend per-thread info for multiple current contexts.
EGL allows multiple current contexts, as long as they are bound to
different client APIs.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17 11:42:04 -06:00
Chia-I Wu 75da80b295 egl: Support per-thread info.
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 <olvaffe@gmail.com>
2009-07-17 11:41:02 -06:00
Jonathan White 7e2458c7b5 egl: fix version handling 2008-08-06 13:40:03 -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 d5078b9432 egl: clean-up re-org of the client API state 2008-05-30 13:45:40 -06:00
Brian Paul 1c73b4ba86 egl: added Name field to _EGLDriver so a driver name string can propogate up through EGL_VERSION string 2008-05-29 17:04:24 -06:00
Brian Paul c56e15b093 egl: make sure EGL_VERSION_STRING query returns same version as eglInitialize() 2008-05-28 15:43:41 -06:00
Brian Paul 0c8908c411 egl: added args string to _eglMain() 2008-05-28 12:56:36 -06:00
Brian Paul 6052af172f minor overhaul/re-org of driver selection/loading code 2008-05-27 16:48:23 -06:00
Brian Paul 721ba15bf4 added _eglGet*Handle() functions
These are the inverse of the _eglLookup*() functions.
Returns the public handle for a private surface/config/display/etc.
Removes glapi.c's direct access of private fields.
2008-05-27 14:33:54 -06:00
Brian Paul 5f8a4f3e5e added EGL_OPENGL_API case 2008-05-27 14:23:56 -06:00
Brian Paul 5e7dba5412 eliminate the context hash table
In EGL 1.4 the opaque EGLContext type is a pointer so we can just cast
between public EGLContext handles and private _EGLContext pointers.
2008-05-27 14:21:25 -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 b2006a40eb some initial EGL 1.2 work 2006-01-30 00:10:55 +00:00
Brian Paul 4882279633 Some initial per-thread support.
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
2005-12-10 17:54:00 +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
Brian Paul 198d6d05b0 remove eglQueryDisplayMESA() 2005-05-17 13:22:13 +00:00
Brian Paul f9bad3dfea use EGLint instead of unsigned long for eglCopyContextMESA, added comments 2005-05-16 02:21:08 +00:00
Jon Smirl 1c606a9aa1 Add empty placeholder for eglCopyContextMESA 2005-05-14 14:54:38 +00:00
Jon Smirl 7012d01d88 First attempt at getting egl support up on dumb framebuffer.
Seems to be mostly working. Not all of egl API is implemented.
2005-05-13 18:31:35 +00:00
Brian Paul c22990c29a sync with latest EGL_MESA_screen_surface spec (EGLScreenMESA handles) 2005-05-04 03:33:21 +00:00
Brian Paul adbff7e977 initial EGL code 2005-04-22 21:09:39 +00:00