Commit Graph

17 Commits

Author SHA1 Message Date
Chia-I Wu 621801abd2 egl: Make display and surface hash tables local.
Move display and surface hash tables to egldisplay.c, and have them
initialized on demand.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-Wu dc516d6e2a egl: Silence warnings on x86-64.
Casting an unsigned int to or from a pointer directly gives warnings on
x86-64.  Add wrappers to silence the warnings.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-31 07:30:13 -06:00
Chia-I Wu 3f7e0d5302 egl: Destroy display's resources upon termination.
eglTerminate should destroy the contexts and surfaces of the display.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17 11:54:06 -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 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
Brian Paul 677151ad71 egl: added null ptr check 2008-06-20 14:28:59 -06:00
Brian Paul 97035cb19a egl: in _eglAddConfig() just save a pointer to the config; don't copy the config
This allows subclassing by drivers.
2008-06-04 11:36:59 -06:00
Brian Paul 9843c6420d egl: bring card->driver lookup code into egldriver.c 2008-05-28 14:51:40 -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 1ed1027e88 assorted changes to compile with new EGL 1.4 headers (untested) 2008-05-27 13:45:41 -06:00
Dave Airlie bc8390fa6c this needs to be calloced 2005-12-23 08:17:44 +00:00
Brian Paul 198d6d05b0 remove eglQueryDisplayMESA() 2005-05-17 13:22:13 +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 adbff7e977 initial EGL code 2005-04-22 21:09:39 +00:00