Chia-I Wu
996fd61442
egl: Remove code blocks that are commented out.
...
They are either unit tests or to demonstrate how functions are supposed
to be used. The unit test is outdated and it should be better to take a
look at any of the working drivers to see how a function is used.
2010-01-31 11:31:58 +08:00
Chia-I Wu
2c3a23a96f
egl: Remove my_strdup.
...
There is already _eglstrdup for the main library's use.
2010-01-30 23:02:45 +08:00
Chia-I Wu
6fc304456e
egl: Remove unused VisibleRefCount.
2010-01-30 22:58:03 +08:00
Chia-I Wu
00e1790f32
egl: Rename Binding to CurrentContext in _EGLSurface.
...
A context can be bound to a surface just like it can be bound to a
thread. CurrentContext is a more consistent name.
2010-01-30 22:57:18 +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
Vinson Lee
fc4939bff9
egl: Remove unnecessary headers.
2010-01-28 15:39:11 -08:00
Chia-I Wu
6baa2c8d02
egl: Migrate drivers to use _eglBindContext.
...
_eglMakeCurrent is a big hammer that is not easy to use. Migrate
drivers to use _eglBindContext and un-export _eglMakeCurrent.
2010-01-28 17:28:48 +08:00
Chia-I Wu
45ba533243
egl: Correctly unbind contexts in eglReleaseThread.
...
MakeCurrent unbinds the current context of the current API. Modify the
current API to make sure all contexts are correctly unbound.
2010-01-28 17:28:48 +08:00
Chia-I Wu
17330479b3
egl: eglMakeCurrent should accept an uninitialized display.
...
When no context or surface are given, the display is allowed to be
uninitialized. Most drivers cannot handle an uninitialized display.
But they are updated to at least throw a fatal message.
2010-01-28 17:28:47 +08:00
Chia-I Wu
959481ad70
egl: Add _eglBindContext.
...
It works similar to _eglMakeCurrent, except that the old context and
surfaces are returned instead of destroyed. _eglMakeCurrent is now
calling the new _eglBindContext.
2010-01-28 17:28:47 +08:00
Chia-I Wu
a933259daa
egl: Use a boolean to indicate whether a display is initialized.
...
The driver pointer of the display was used to decide whether a display
is initialized. Use a boolean for that purpose allows accessing the
driver of an uninitialized display.
2010-01-28 17:28:47 +08:00
Chia-I Wu
092b1ca989
egl: Remove _eglOpenDriver and _eglCloseDriver.
...
_eglCloseDriver is no-op and _eglOpenDriver does nothing but call
_eglMatchDriver. Export _eglMatchDriver directly.
2010-01-26 18:46:06 +08:00
Chia-I Wu
545eaf83b5
egl: Fix a segfault when a display is initialized again.
...
Reset dpy->MaxConfigs so that dpy->Configs is re-allocated.
2010-01-26 18:46:05 +08:00
Chia-I Wu
a1717970e7
egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay.
...
They have little use in drivers since drivers need to work for multiple
current contexts.
2010-01-26 18:46:05 +08:00
Chia-I Wu
11cf3cb2c4
egl: Fix leaks in eglReleaseThread.
...
There may be multiple bound contexts that should be unbound.
2010-01-26 18:46:05 +08:00
Chia-I Wu
7c09296d4c
egl: Refactor _eglMakeCurrent.
...
Refactor _eglMakeCurrent into _eglCheckMakeCurrent,
_eglBindContextToSurface, and _eglBindContextToThread.
2010-01-26 18:46:05 +08:00
Chia-I Wu
6f6f3e4227
egl: Add _eglGetAPIContext.
...
It will return the currently bound context of the given API.
2010-01-26 18:46:05 +08:00
Chia-I Wu
f65ed0a309
egl: Use a boolean to indicate whether a resource is linked.
...
An unlinked resource may still be a current resource such as current
surfaces. There might still be a need to know which display the
unlinked resource belongs to.
2010-01-26 18:46:05 +08:00
Chia-I Wu
d21ee93fdb
egl: Mark _eglCheckResource as PUBLIC.
...
To support extensions such as GL_OES_EGL_image, the drivers need a way
to check if a given EGLImageKHR is valid.
2010-01-26 18:46:05 +08:00
Chia-I Wu
0d2d40451d
egl/xdri: Update with glxclient.h change.
...
__glXFindDisplay is no longer static since
7a9329ba99 .
2010-01-26 10:48:16 +08:00
Chia-I Wu
4aed0944f4
egl: Native types are renamed in EGL 1.3.
...
Rename Native*Type to EGLNative*Type.
2010-01-25 11:59:12 +08:00
Chia-I Wu
dbb866ab33
egl: Make resource void pointer in _eglCheckResource.
...
This emphasizes the fact that the resource to be checked could really be
invalid and have an unknown type.
2010-01-25 11:44:13 +08:00
Chia-I Wu
3f932a4440
egl: Install EGL headers.
...
Install EGL (and KHR) headers along with the library.
2010-01-25 11:34:59 +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
95f8f75ad8
egl: Update headers.
...
Update to the current versions found at
http://www.khronos.org/registry/egl/ . There is one modification in
khrplatform.h for GCC visibility.
2010-01-25 11:28:27 +08:00
Chia-I Wu
21b2c0a6e5
egl: Add and use make_library_path.
...
Add a platform specific function to turn a library name to a library
path. It is used to convert EGL_DRIVER or the default driver to a
library path that can be loaded.
2010-01-24 21:27:52 +08:00
Chia-I Wu
cecc33cd4f
egl: Remove _eglFindAPIs.
...
This function is not used and should have been removed by last commit.
My mistake.
2010-01-24 20:55:17 +08:00
Chia-I Wu
cf7c1ea4f1
egl: Remove unused helper functions.
...
_eglFillInConfigs and _eglFindAPIs have no user in Mesa and are unlikely
to find one soon. It should be fine to remove them.
2010-01-24 20:52:30 +08:00
Chia-I Wu
56b93a25ea
egl: Remove unused casting functions.
...
_eglUIntToPointer and _eglPointerToUInt are no longer used.
2010-01-24 20:38:16 +08:00
Chia-I Wu
ecb3b3102a
egl: Make surfaces and contexts resources.
...
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
2010-01-24 20:38:16 +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
b4d2c97a2d
egl: Move surface functions in egldisplay.[ch] to eglsurface.[ch]
...
Move functions to where they should be. There should be no real change
here.
2010-01-24 20:38:15 +08:00
Chia-I Wu
5e66d18932
egl: Move context functions in egldisplay.[ch] to eglcontext.[ch].
...
Move functions to where they should be. There should be no real change
here.
2010-01-24 20:38:15 +08:00
Chia-I Wu
28c3e57c83
egl: Install drivers to ${libdir}/egl.
...
Install EGL drivers to EGL_DRIVER_INSTALL_DIR, which is default to
${libdir}/egl.
2010-01-23 20:30:11 +08:00
Chia-I Wu
3b0ffd5a36
egl: Remove egl_softpipe.
...
With the addition egl_x11_swrast, egl_softpipe is sort of deprecated.
The new driver serves the same purpose as egl_softpipe does. It is
based on egl_g3d and provides more features.
2010-01-22 16:44:13 +08:00
Chia-I Wu
324fdf7364
egl: Remove the demo driver.
...
The demo driver has outdated. It is suggested to look at any of the
drivers that is functioning.
2010-01-22 15:10:09 +08:00
Chia-I Wu
18b63b55d5
egl_xdri: Add support for DRISW.
...
Try DRISW if both DRI2 and DRI fail. It can also be forced by setting
EGL_SOFTWARE. When DRISW is used, single-buffered modes are ignored.
2010-01-22 15:03:45 +08:00
Chia-I Wu
caa75a7ce0
egl_xdri: Flush commands on context switch and buffer swap.
...
The corresponding DRI functions does not flush for us.
2010-01-22 14:54:41 +08:00
Chia-I Wu
3c9bf648ac
egl_xdri: Report only OpenGL support.
...
It reported OpenGL ES support because some demos did not set
EGL_RENDERABLE_TYPE correctly. The demos are fixed.
2010-01-22 14:54:40 +08:00
Chia-I Wu
fe0e35aba8
egl_xdri: Do not reinitialize in __glXInitialize.
...
__glXInitialize should return the same GLX display for the same X
display. This issue is triggered by
a35f6bb207 .
2010-01-22 14:54:40 +08:00
Chia-I Wu
0e54f9c529
egl_glx: Report only OpenGL support.
...
It reported OpenGL ES support because some demos did not set
EGL_RENDERABLE_TYPE correctly. The demos are fixed.
2010-01-22 14:24:46 +08:00
Chia-I Wu
2279fa3c06
egl: Update driver Makefiles.
...
Update to use the new Makefile.template.
2010-01-22 13:29:23 +08:00
Chia-I Wu
e63272050f
egl: Add Makefile.template for EGL drivers.
2010-01-22 12:02:00 +08:00
Alan Coopersmith
506e27b972
Copy __FUNCTION__ portability #defines from mesa/compiler.h to eglcompiler.h
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-20 23:18:07 +08:00
Chia-I Wu
c5766c4ae3
egl: Add a simple cache for driver probe.
...
In current design, multiple drivers will probe the same display and the
best driver is determined. The cache can be used by the drivers to
store and share the probed data.
2010-01-20 17:44:12 +08:00
Chia-I Wu
cf22fd5e5b
egl: Improve driver matching.
...
Make drv->Probe return a score so that the matching can be done by
finding the driver with the highest score.
2010-01-20 17:44:11 +08:00
Chia-I Wu
925f8113be
egl: Rename _EGL_PLATFORM_X to _EGL_PLATFORM_POSIX.
...
The macro is used to determine if dlfcn.h or dirent.h is available.
POSIX is a better name than X in such case.
2010-01-20 17:44:11 +08:00
Chia-I Wu
f0c2871bf4
egl: Remove unused driver and display functions.
...
Remove _eglPreloadDriver, _eglLookupDriver, and _eglSplitDisplayString.
2010-01-20 17:40:07 +08:00
Chia-I Wu
57929eda3e
egl: Use _eglPreloadDrivers.
...
Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter
supports EGL_DISPLAY which have a better chance to "just work".
2010-01-20 17:40:07 +08:00
Chia-I Wu
b3bcd33f7a
egl: Add _eglPreloadDrivers.
...
It can be used to load the user driver specified by EGL_DRIVER, or a set
of drivers specified by EGL_DISPLAY, or the default driver, and in that
order.
2010-01-20 17:40:00 +08:00