Chia-I Wu
bdb9e202de
egl: Add macros to define typecast functions.
...
There are standard typecast functions that are common to most drivers.
They are used to typecast, for example, an _EGLSurface to a
driver-defined type.
This commits define _EGL_DRIVER_STANDARD_TYPECASTS and
_EGL_DRIVER_TYPECAST that should hopefully save some typings for driver
writers.
2010-02-04 14:36:48 +08:00
Igor Oliveira
88af76ce94
egl: fix wrong argument. Use loader_data instead of loader
2010-02-04 10:09:37 +08:00
Chia-I Wu
0d089cbb48
egl: Rename _eglPreloadForEach callbacks.
...
Rename _eglPreloadFile to _eglLoaderFile, and _eglPreloadFile to
_eglLoaderFile. There are several _eglPreload* functions. The
callbacks do not belong to them and it should be better to give them a
different prefix.
2010-02-03 14:16:16 +08:00
Chia-I Wu
8e6a964411
egl: Fix a potential segfault in driver suffix matching.
...
The driver suffix might be NULL on some platforms. Perform the matching
only when there is a suffix.
2010-02-03 14:16:16 +08:00
Chia-I Wu
2287f4c52a
egl: Remove unnecessary #ifdef's.
...
There were some refactorings with the addition of EGL_DRIVERS_PATH.
They made some platform #ifdef's unnecessary.
2010-02-03 14:16:15 +08:00
Chia-I Wu
6fd8b6a9e2
egl: Ignore certain environment variables when setuid/setgid.
...
Specifically, ignore EGL_DRIVERS_PATH when an application is
setuid/setgid. And ignore EGL_DRIVER when there is a slash in it.
2010-02-03 14:16:15 +08:00
Chia-I Wu
5d8646c41f
egl: Add EGL_DRIVERS_PATH environment variable.
...
EGL_DRIVERS_PATH gives a list of colon-separated directories. The given
directories will be searched when preloading drivers.
This is based on Mike Stroyan's patch, which honors the variable in
_eglPreloadDisplayDrivers. It is extended to honor the variable also in
_eglPreloadUserDriver and _eglPreloadDefaultDriver in this version.
2010-02-03 14:16:15 +08:00
Vinson Lee
19af9ea792
egl: Remove unnecessary headers.
2010-01-31 21:56:53 -08:00
Chia-I Wu
eb961f81d5
egl: Clean up surface attributes.
...
Add missing attributes and use correct types in _EGLSurface. Remove
ifdef tests that serve no purpose. Update _eglQuerySurface and
_eglSurfaceAttrib for missing queries and checks.
2010-01-31 22:21:26 +08:00
Chia-I Wu
0135e5d6c8
egl: Add support for more EGLImage extensions to EGL core.
...
Add support EGL_KHR_vg_parent_image and EGL_KHR_gl_*. This is as simple
as adding some flags that can be enabled. Individual drivers need to
implement the extensions before enbaling the flags.
2010-01-31 22:20:42 +08:00
Chia-I Wu
bbdce27649
egl: Surface type validaction should depend on extensions supported.
...
EGL_SCREEN_BIT_MESA is a valid bit only when EGL_MESA_screen_surface is
supported.
2010-01-31 14:46:15 +08:00
Chia-I Wu
216925ccd1
egl: Initialize display configs with the display.
...
This changes _eglInitConfig to take the display as its argument.
2010-01-31 14:46:14 +08:00
Chia-I Wu
d69242be55
egl: Initialize display resources with their display.
...
Change _eglInitSurface, _eglInitContext, and _eglInitImage to take an
_EGLDisplay instead of an _EGLDriver. This is a more natural form, and
plus, the display encodes information such as the extensions supported
that might be required for attribute list parsing.
2010-01-31 14:46:14 +08:00
Chia-I Wu
e694ccad80
egl: Refactor _eglInitImage.
...
Refactor attribute list parsing code to _eglParseImageAttribList.
2010-01-31 14:46:14 +08:00
Chia-I Wu
caa5c8dfe8
egl: Refactor _eglInitContext.
...
Refactor attribute list parsing code to _eglParseContextAttribList. Add
a check to make sure the config supports the client API.
2010-01-31 14:46:14 +08:00
Chia-I Wu
6f1529293f
egl: Refactor _eglInitSurface.
...
Refactor attribute list parsing code to _eglParseSurfaceAttribList.
2010-01-31 14:46:13 +08:00
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
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
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
Alan Coopersmith
a7aaf052f9
Sun compilers now support some gcc __attribute__ values
...
Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ calls
for aligned, always_inline, noinline, pure, const, and malloc.
This commit includes updates to files that were regenerated by gl_XML.py
after adding the __SUNPRO_C checks to it
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-01-19 10:15:55 -08:00
Chia-I Wu
3e6139d158
egl: Add _EGLDriver as the first argument to GetProcAddress.
...
The rest of the driver API has it as the first argument. It should be
there so that a driver has access to itself.
2010-01-12 17:53:57 +08:00
Chia-I Wu
39790cab13
egl: EGL_SCREEN_BIT_MESA is a valid bit.
...
Update _eglValidateConfig so that it passes the test.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-12 10:55:35 +08:00
Chia-I Wu
d4c1ee0534
egl: Clean up the Makefile rules.
...
This allows libEGL to be built as a static library and removes libX11
from the dependencies.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-11 01:11:05 +08:00
Chia-I Wu
897cb8950a
egl: Fix breakage from -fvisibility=hidden.
...
Mark EGL API and driver functions as PUBLIC.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-05 11:23:52 -05:00
Chia-I Wu
326baecd75
egl: Correct conversion of native visual type.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-22 09:33:27 -06:00
Chia-I Wu
6c21c8862b
egl: Rework the synchronization primitives.
...
This adds error checking to the synchronization primitives. And
eglWaitGL is now implemented by eglWaitClient.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:54:00 -06:00
Chia-I Wu
57da499d7b
egl: Rework eglSwapInterval.
...
This adds error checking to eglSwapInterval and clamps the swap
interval.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:54:00 -06:00
Chia-I Wu
bbfd0e2615
egl: Rework error checking in eglSwapBuffers.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:58 -06:00
Chia-I Wu
aaa1253b09
egl: Update comments about eglapi.c.
...
Mention that opaque handles are looked up and checked.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:57 -06:00
Chia-I Wu
6190663120
egl: Rework error checking in eglGetCurrentSurface.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:57 -06:00
Chia-I Wu
8bb2485ed0
egl: Include GL header in eglconfigutil.h.
...
This is just a cosmetic change.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:56 -06:00
Chia-I Wu
29d115092e
egl: Fix GLX_USE_TLS build.
...
Remove an extraneous semicolon.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:56 -06:00
Chia-I Wu
2fc1614e7a
egl: Fix eglCheckConfigHandle.
...
A stupid bug by me made the check void.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15 12:53:55 -06:00
Chia-I Wu
f1c5cab552
egl: Improve logging facility.
...
Add _eglSetLogger and _eglSetLogLevel to allow drivers to change the
message logger or report level.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13 12:00:37 -06:00
Chia-I Wu
310c76812e
egl: Allow binding to any client API.
...
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 <olvaffe@gmail.com>
2009-10-13 12:00:36 -06:00
Chia-I Wu
e787ffcd02
egl: Preload a driver if eglGetProcAddress is called early.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13 12:00:36 -06:00
Chia-I Wu
9061d733d3
egl: Remove core functions from eglGetProcAddress.
...
eglGetProcAddress may not be used to query core (non-extension)
functions.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13 12:00:36 -06:00
Chia-I Wu
5541988578
egl: Add support for driver built-in.
...
This allows an EGL driver to be compiled together with libEGL.so. It
eliminates the need to specify a driver, or support module loading on
new platforms.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13 12:00:36 -06:00
Chia-I Wu
d845f2754b
egl: Add support for querying render buffer.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29 08:10:48 -06:00
Chia-I Wu
55893b9439
egl: Add a function to convert __GLcontextModes to _EGLConfig.
...
_eglConfigFromContextModesRec is used to convert a __GLcontextModes to a
_EGLConfig. Note that the config is not validated. An invalid mode
is likely to give an invalid config.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29 08:10:47 -06:00
Chia-I Wu
56822b0812
egl: Rework config lookup.
...
Make it similiar to how contexts and surfaces are looked up. It should
be slightly faster, and work better with multiple displays.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29 08:10:47 -06:00
Chia-I Wu
95cdd697e7
egl: Rework configuration management.
...
This mainly implements the algorithms for configuration selection and
sorting, described in the spec. User errors should also be correctly
detected and reported.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29 08:10:47 -06:00
Chia-I Wu
358c5a8fd1
egl: Introduce config keys.
...
Config keys are almost config attributes. A valid config attribute is a
valid config key, but a valid config key may not be a valid config
attribute.
This commit does not distinguish the differences.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29 08:10:47 -06:00
Chia-I Wu
e1d978775f
egl: Remove Xdpy from EGLDisplay.
...
It is not used anymore.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-26 16:40:22 -06:00
Chia-I Wu
b1f156f0ec
egl: Make _eglChooseDriver return the filename of the driver.
...
The real difference is that the driver suffix is now appended. This
also fixes an annoying bug that EGL_DRIVER could not specify the path to
a driver because a suffix was always appended.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
5a459d58fc
egl: Remove dependency on libX11.
...
libX11 is used to determine the screen number, which is in turned used
to determine the DRI driver. However, the sysfs interface for
determining the DRI driver is gone, and no working driver depends on
this mechanism.
Display string parsing is moved to a new function,
_eglSplitDisplayString.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
408db29792
egl: Check for null display in handle checking.
...
The display may be NULL when checking a handle.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21 08:34:34 -06:00
Chia-I Wu
34d8c13bff
egl: Remove eglhash.c and eglhash.h.
...
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:12 -06:00
Chia-I Wu
e484a92928
egl: Add back handle checking.
...
Handle checking was done using hash tables. Now that they are gone, we
have to loop over the lists.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:06 -06:00
Chia-I Wu
e3734e4685
egl: Make lookup functions static inline.
...
progs/egl/demo3.c is also changed since it uses an internal function.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:00 -06:00
Chia-I Wu
38feefdc4e
egl: Remove hash table for displays.
...
The hash table was used to map a display to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:53 -06:00
Chia-I Wu
7a9f528009
egl: Remove hash table for surfaces.
...
The hash table was used to map a surface to a handle. It is simpler to
cast directly.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:34 -06:00
Chia-I Wu
ccc2b0bc65
egl: _eglCloseDriver should be no-op.
...
Move drv->API.Terminate call to eglTerminate. Remove
_eglReleaseDisplayResource as drivers are doing it.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:49:22 -06: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
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
64e7bb3262
egl: Use _eglAddAtExitCall to free thread infos and displays.
...
Thread infos and displays are usually not freed by applications. This
commit add atexit calls to free them.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
435c7ac24d
egl: Add _eglAddAtExitCall.
...
Add a convenient wrapper to register atexit calls. Add mutex to
_eglGlobal along the way.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -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
413969a920
egl: Implement _eglFiniDisplay.
...
_eglFiniDisplay is called at exit time to free allocated displays. It
is, however, not used right now.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
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-I Wu
56d2119280
egl: Initialize current thread management on demand.
...
Current thread management was initialized in _eglInitGlobals, which is
called only in eglGetDisplay. Since EGL does not require eglGetDisplay
to be called first, the initialization is better to be done on demand.
_eglFiniCurrent is removed, as it is not called at all.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
f6c2f5e379
egl: Destroy eglThreadInfo on thread exit.
...
This is done through pthread TSD destructor. It destroys all thread
infos except for main thread's. The thread info of the main thread is
destroyed by _eglFiniCurrent.
TLS case is not supported yet.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Chia-I Wu
e79d21ca1f
egl: Add eglmutex.h.
...
The implementation uses pthread mutex when available. Otherwise, it is
no-op.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-11 22:14:35 -06:00
Pauli Nieminen
11038989c1
egl: Add depend and depend.bak to clean target
...
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-09 08:42:50 -06:00
Chia-I Wu
8a130a65aa
egl: Correct the default values of surface attributes.
...
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to
EGL_NO_TEXTURE.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:35:44 -06:00
Chia-I Wu
8cdc6c66f9
egl: Make eglMakeCurrent more robust.
...
Now that a current surface points back to its binding context, and a
current context points back to its binding thread, make sure there is no
dangling pointers. This commit reworks eglMakeCurrent, adds more checks
to avoid stealing context or surfaces from another thread, and correctly
destroys unlinked context and surfaces.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:35:14 -06:00
Chia-I Wu
07ee01365a
egl: Replace IsBound by a pointer to the binding.
...
IsBound tells if a context or surface is current. What it does not tell
is, to which thread a context is current, or to which context a surface
is current. This commit replaces IsBound by a pointer to the binding
thread or context.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03 11:34:37 -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
a744a496d5
egl: Comment out unused tables in_eglFillInConfigs
...
This silences a compiler warning.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-28 08:55:43 -06:00
Peter Hutterer
5358e54d1a
Add missing X11_INCLUDES to egl/drivers/demo and egl/main.
...
Compiling mesa on a system with no X headers installed in the default
include paths fails due to missing X11 includes. The header includes are
picked up by configure but not applied.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-07-21 11:45:49 +10:00
Brian Paul
40fd101919
egl: commit missing eglcurrent.[ch] files
...
Not sure how these got left out from earlier commit.
2009-07-17 13:36:58 -06:00
Chia-I Wu
15fdbc8361
egl: Remove redundant DeletePending flag.
...
A context or surface that is neither linked to a display nor current to
a thread should be destroyed. Therefore, an unlinked context or surface
implies a pending delete automatically.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17 11:56:00 -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
cca31340b5
egl: Use the link functions to manage resources.
...
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 <olvaffe@gmail.com>
2009-07-17 11:53:03 -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
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
Dan Nicholson
bc302b2a33
Use separate $(MINSTALL) for installing libraries
...
The special feature of bin/minstall to copy symlinks is only ever needed
when installing libraries which may have .so symlinks. All the headers
and directories can use a normal install program.
These two modes are separated as $(INSTALL) and $(MINSTALL) to allow the
user (or autoconf) to override installing normal files as they please.
An autoconf check for the install program has been added and will be
used in preference to minstall when available.
Fixes bug 16053.
2009-06-01 06:32:52 -07:00
Alan Coopersmith
7571d5d3b0
egl/main/Makefile: Add dependency of install target on default build target
...
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-16 20:07:47 -07:00
Brian Paul
66b0b200ee
egl: don't use __FUNCTION__ in error messages
2009-03-25 08:18:28 -06:00
Brian Paul
c34c78b853
egl: use new EGL_LIB_DEPS to pass library dependencies to mklib when building libEGL
...
EGL_LIB_DEPS may need fine-tuning for some platforms. It's only defined
in configs/default ATM.
2009-02-25 08:41:13 -07:00
Benjamin Close
9c0dea10e9
egl: Use -dlopen rather than -dl which is non portable
...
Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
2009-02-25 07:54:02 -07:00
Alan Hourihane
b57c9fd83f
egl: if a surface type isn't defined let's default to EGL_WINDOW_BIT
2009-02-19 13:09:02 +00:00
Johannes Engel
1e81855566
Add install target for egl
...
Signed-off-by: Johannes Engel <jcnengel@googlemail.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
2009-02-11 07:01:40 +01:00
Alan Hourihane
cc6bdf49ca
egl: switch to egl_glx.so as the default EGL driver for X.
2008-09-26 12:18:59 +01:00
Keith Whitwell
9644fa6c48
Merge branch 'master' into gallium-0.2
...
Conflicts:
include/GLES/egl.h
include/GLES/egltypes.h
src/egl/main/eglconfig.c
src/egl/main/eglconfig.h
src/glu/sgi/libnurbs/interface/bezierEval.h
src/glu/sgi/libnurbs/interface/bezierPatch.h
src/glu/sgi/libnurbs/interface/bezierPatchMesh.h
src/glu/sgi/libnurbs/internals/dataTransform.h
src/glu/sgi/libnurbs/internals/displaymode.h
src/glu/sgi/libnurbs/internals/sorter.h
src/glu/sgi/libnurbs/nurbtess/definitions.h
src/glu/sgi/libnurbs/nurbtess/directedLine.h
src/glu/sgi/libnurbs/nurbtess/gridWrap.h
src/glu/sgi/libnurbs/nurbtess/monoChain.h
src/glu/sgi/libnurbs/nurbtess/monoPolyPart.h
src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
src/glu/sgi/libnurbs/nurbtess/partitionX.h
src/glu/sgi/libnurbs/nurbtess/partitionY.h
src/glu/sgi/libnurbs/nurbtess/polyDBG.h
src/glu/sgi/libnurbs/nurbtess/polyUtil.h
src/glu/sgi/libnurbs/nurbtess/primitiveStream.h
src/glu/sgi/libnurbs/nurbtess/quicksort.h
src/glu/sgi/libnurbs/nurbtess/rectBlock.h
src/glu/sgi/libnurbs/nurbtess/sampleComp.h
src/glu/sgi/libnurbs/nurbtess/sampleCompBot.h
src/glu/sgi/libnurbs/nurbtess/sampleCompRight.h
src/glu/sgi/libnurbs/nurbtess/sampleCompTop.h
src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.h
src/glu/sgi/libnurbs/nurbtess/sampledLine.h
src/glu/sgi/libnurbs/nurbtess/searchTree.h
src/glu/sgi/libnurbs/nurbtess/zlassert.h
src/glu/sgi/libutil/error.c
src/glu/sgi/libutil/glue.c
src/glu/sgi/libutil/gluint.h
src/glu/sgi/libutil/project.c
src/glu/sgi/libutil/registry.c
src/glx/x11/Makefile
src/glx/x11/glxclient.h
src/glx/x11/glxext.c
src/mesa/drivers/dri/ffb/ffb_dd.h
src/mesa/drivers/dri/ffb/ffb_points.h
src/mesa/drivers/dri/gamma/gamma_context.h
src/mesa/drivers/dri/gamma/gamma_macros.h
src/mesa/drivers/dri/i810/i810context.h
src/mesa/drivers/dri/r128/r128_dd.h
src/mesa/drivers/dri/r128/r128_tex.h
src/mesa/drivers/dri/tdfx/tdfx_dd.h
src/mesa/drivers/x11/xm_buffer.c
src/mesa/glapi/glapi.c
src/mesa/main/dispatch.c
src/mesa/main/state.c
src/mesa/main/texstate.c
src/mesa/shader/arbprogparse.c
src/mesa/shader/arbprogram.c
src/mesa/shader/nvfragparse.c
src/mesa/shader/nvprogram.c
src/mesa/shader/shader_api.c
src/mesa/sources
src/mesa/swrast/s_aaline.c
src/mesa/swrast/s_aaline.h
src/mesa/swrast/s_aatriangle.h
src/mesa/swrast/s_accum.c
src/mesa/swrast/s_alpha.h
src/mesa/swrast/s_bitmap.c
src/mesa/swrast/s_blend.h
src/mesa/swrast/s_context.c
src/mesa/swrast/s_copypix.c
src/mesa/swrast/s_depth.c
src/mesa/swrast/s_depth.h
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_drawpix.h
src/mesa/swrast/s_feedback.c
src/mesa/swrast/s_feedback.h
src/mesa/swrast/s_fog.h
src/mesa/swrast/s_lines.h
src/mesa/swrast/s_logic.h
src/mesa/swrast/s_masking.h
src/mesa/swrast/s_points.c
src/mesa/swrast/s_points.h
src/mesa/swrast/s_readpix.c
src/mesa/swrast/s_span.c
src/mesa/swrast/s_span.h
src/mesa/swrast/s_stencil.h
src/mesa/swrast/s_texcombine.c
src/mesa/swrast/s_texcombine.h
src/mesa/swrast/s_texfilter.c
src/mesa/swrast/s_texfilter.h
src/mesa/swrast/s_texstore.c
src/mesa/swrast/s_triangle.c
src/mesa/swrast/s_triangle.h
src/mesa/swrast/s_zoom.h
src/mesa/swrast_setup/ss_context.c
src/mesa/swrast_setup/ss_triangle.h
src/mesa/tnl/t_draw.c
src/mesa/tnl/t_vb_light.c
src/mesa/tnl/t_vertex_generic.c
src/mesa/tnl/t_vertex_sse.c
src/mesa/tnl/t_vp_build.h
src/mesa/tnl/tnl.h
src/mesa/x86/common_x86.c
2008-09-21 10:28:06 -07:00
Keith Whitwell
5a46e17671
mesa: standardize on C99's uint*_t instead of u_int*_t
2008-09-21 09:45:00 -07:00
Keith Whitwell
cc7dd4fc1b
Merge commit 'origin/gallium-0.1' into gallium-0.2
...
Conflicts:
Makefile
progs/demos/Makefile
progs/glsl/Makefile
progs/redbook/Makefile
progs/samples/Makefile
progs/tests/Makefile
progs/trivial/Makefile
progs/xdemos/Makefile
src/gallium/Makefile
src/mesa/main/attrib.c
src/mesa/main/bufferobj.c
src/mesa/vbo/vbo_exec_draw.c
2008-09-11 18:32:05 +01:00
Keith Whitwell
0397b2bb41
Merge branch 'gallium-0.1' into gallium-0.2
...
A first attempt at moving gallium onto a branch directly off master...
It will be interesting to see how much work this takes to get running.
Have resolved the conflicts semi-arbitarily, not compiled or tested.
Conflicts:
.gitignore
Makefile
configs/config.mgw
configs/darwin
configs/darwin-x86ppc
configs/default
configs/freebsd-dri
configs/linux-dri
configs/linux-dri-xcb
configs/linux-fbdev
configs/linux-static
configs/linux-x86-64-static
configs/linux-x86-static
doxygen/Makefile
include/GL/gl.h
progs/demos/Makefile
progs/demos/descrip.mms
progs/demos/texenv.c
progs/egl/.gitignore
progs/egl/Makefile
progs/glsl/.gitignore
progs/glsl/Makefile
progs/glsl/convolutions.c
progs/samples/Makefile.mgw
progs/tests/.gitignore
progs/trivial/.gitignore
progs/trivial/point-param.c
progs/trivial/tri.c
progs/xdemos/.gitignore
progs/xdemos/glthreads.c
src/egl/drivers/demo/Makefile
src/egl/drivers/dri/Makefile
src/egl/main/Makefile
src/glu/Makefile
src/glu/sgi/Makefile
src/glu/sgi/Makefile.mgw
src/glut/glx/Makefile.mgw
src/glut/os2/WarpWin.cpp
src/glut/os2/glut_cindex.cpp
src/glut/os2/glut_gamemode.cpp
src/glut/os2/glut_win.cpp
src/glut/os2/glut_winmisc.cpp
src/glut/os2/os2_glx.cpp
src/glut/os2/os2_menu.cpp
src/glut/os2/os2_winproc.cpp
src/glw/Makefile
src/glx/x11/dri_glx.c
src/glx/x11/glxext.c
src/mesa/Makefile
src/mesa/Makefile.mgw
src/mesa/descrip.mms
src/mesa/drivers/beos/Makefile
src/mesa/drivers/common/descrip.mms
src/mesa/drivers/common/driverfuncs.c
src/mesa/drivers/directfb/Makefile
src/mesa/drivers/dri/Makefile.template
src/mesa/drivers/dri/common/dri_bufmgr.c
src/mesa/drivers/dri/common/dri_bufmgr.h
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/extension_helper.h
src/mesa/drivers/dri/common/mmio.h
src/mesa/drivers/dri/common/utils.c
src/mesa/drivers/dri/common/utils.h
src/mesa/drivers/dri/glcore/Makefile
src/mesa/drivers/dri/i810/i810screen.c
src/mesa/drivers/dri/i915/intel_ioctl.c
src/mesa/drivers/dri/i915/intel_ioctl.h
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i915/server/i830_common.h
src/mesa/drivers/dri/i915/server/i830_dri.h
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/server/i830_common.h
src/mesa/drivers/dri/i965/server/i830_dri.h
src/mesa/drivers/dri/mach64/mach64_screen.c
src/mesa/drivers/dri/nouveau/nouveau_context.h
src/mesa/drivers/dri/nouveau/nouveau_fifo.c
src/mesa/drivers/dri/nouveau/nouveau_fifo.h
src/mesa/drivers/dri/nouveau/nouveau_screen.c
src/mesa/drivers/dri/nouveau/nouveau_screen.h
src/mesa/drivers/dri/r128/r128_tex.h
src/mesa/drivers/dri/savage/savageioctl.h
src/mesa/drivers/fbdev/Makefile
src/mesa/drivers/osmesa/Makefile
src/mesa/drivers/osmesa/descrip.mms
src/mesa/drivers/x11/Makefile
src/mesa/drivers/x11/descrip.mms
src/mesa/drivers/x11/xm_dd.c
src/mesa/glapi/glapi.c
src/mesa/glapi/glthread.c
src/mesa/main/api_validate.c
src/mesa/main/attrib.c
src/mesa/main/bufferobj.c
src/mesa/main/bufferobj.h
src/mesa/main/buffers.c
src/mesa/main/config.h
src/mesa/main/context.c
src/mesa/main/descrip.mms
src/mesa/main/drawpix.c
src/mesa/main/enums.c
src/mesa/main/fbobject.c
src/mesa/main/glheader.h
src/mesa/main/imports.c
src/mesa/main/mipmap.c
src/mesa/main/mm.c
src/mesa/main/mm.h
src/mesa/main/mtypes.h
src/mesa/main/points.c
src/mesa/main/sources
src/mesa/main/state.c
src/mesa/main/texcompress_fxt1.c
src/mesa/main/texenvprogram.c
src/mesa/main/texobj.c
src/mesa/main/texstate.c
src/mesa/main/texstore.c
src/mesa/math/descrip.mms
src/mesa/shader/arbprogram.c
src/mesa/shader/descrip.mms
src/mesa/shader/prog_execute.c
src/mesa/shader/prog_statevars.c
src/mesa/shader/prog_statevars.h
src/mesa/shader/prog_uniform.c
src/mesa/shader/program.c
src/mesa/shader/program.h
src/mesa/shader/shader_api.c
src/mesa/shader/slang/descrip.mms
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
src/mesa/sources
src/mesa/swrast/descrip.mms
src/mesa/swrast/s_drawpix.c
src/mesa/swrast/s_fragprog.c
src/mesa/swrast/s_readpix.c
src/mesa/swrast/s_span.c
src/mesa/swrast_setup/descrip.mms
src/mesa/tnl/descrip.mms
src/mesa/tnl/t_context.h
src/mesa/tnl/t_vp_build.c
src/mesa/tnl/tnl.h
src/mesa/vbo/descrip.mms
src/mesa/vbo/vbo_context.c
src/mesa/vbo/vbo_exec_array.c
src/mesa/x86-64/xform4.S
src/mesa/x86/rtasm/x86sse.c
src/mesa/x86/rtasm/x86sse.h
windows/VC6/progs/glut/glut.dsp
windows/VC7/mesa/gdi/gdi.vcproj
windows/VC7/mesa/glu/glu.vcproj
windows/VC7/mesa/mesa.sln
windows/VC7/mesa/mesa/mesa.vcproj
windows/VC7/mesa/osmesa/osmesa.vcproj
windows/VC7/progs/glut/glut.vcproj
windows/VC8/mesa/gdi/gdi.vcproj
windows/VC8/mesa/glu/glu.vcproj
windows/VC8/mesa/mesa.sln
windows/VC8/mesa/mesa/mesa.vcproj
windows/VC8/progs/glut/glut.vcproj
2008-09-11 16:05:15 +01:00
Brian Paul
b36f906573
egl: additional error checking in _eglBind/ReleaseTexImage()
2008-09-01 13:10:53 -06:00
Jonathan White
bd953fdd54
egl: fixes for Windows
2008-08-06 16:37:49 -06:00
Jonathan White
7e2458c7b5
egl: fix version handling
2008-08-06 13:40:03 -06:00
Jonathan White
ab0d13dd60
egl: changes for Windows
2008-08-05 19:22:09 -06:00
Jonathan White
2eb4f86785
egl: don't include stdint.h on Windows
2008-08-05 08:13:50 -06:00
Jonathan White
655ca5afad
egl: fix _eglGlobal initialization for Windows
2008-08-04 16:30:04 -06:00
Dan Nicholson
3b8081603b
Always pass -linker and -ldflags to mklib for shared libraries
...
This just makes the use of mklib more consistent throughout Mesa where
we always want to pass the linker and LDFLAGS when we might be making a
shared library.
2008-07-12 10:25:40 -07:00
Dan Nicholson
db072baaaf
Call mklib with $(SHELL) so the user controls the interpreter
...
Respect the user's choice of shell when running mklib rather than always
using /bin/sh.
2008-07-12 10:25:40 -07:00
Brian Paul
de71e4741d
egl: bump up MAX_ATTRIBS, added assertion
2008-07-07 14:34:30 -06:00
Brian Paul
8f91a83669
egl: fix default value of EGL_SURFACE_TYPE, added some sanity check assertions
2008-06-28 16:03:28 -06:00
Robert Ellison
a1fb565ea7
egl: These changes allow an eglBindAPI(EGL_OPENGL_ES_API) to succeed, and to work correctly with GLES1 and GLES2.
...
- egl_xdri.c just sets the EGL_OPENGL_ES_BIT as well as the
EGL_OPENGL_BIT in ClientAPIsMask
- eglconfig.c allows the renderable type to include EGL_OPENGL_ES2_BIT
as well as EGL_OPENGL_ES_BIT.
- egl_xlib.c sets the EGL_NATIVE_RENDERABLE attribute to EGL_FALSE for
all softpipe configurations. (Otherwise, an eglChooseConfig() that
looks for particular values of EGL_NATIVE_RENDERABLE will fail.)
2008-06-27 07:17:02 -06:00
Jakob Bornecrantz
72edcd1711
egl: Stdint was missing from eglconfigutil.h
2008-06-24 14:32:53 +02:00
José Fonseca
0d94767430
egl: Use standard integer types.
2008-06-24 13:55:38 +09:00
Brian Paul
677151ad71
egl: added null ptr check
2008-06-20 14:28:59 -06:00
Brian Paul
fbd6e86b8f
egl: implment EGL_LARGEST_PBUFFER query
2008-06-20 10:20:25 -06:00
Brian Paul
8a75d10953
egl: added null ptr check
2008-06-20 10:20:06 -06:00
Brian Paul
cae4444fa1
egl: default API should be ES
2008-06-20 10:19:51 -06:00
Brian Paul
9f6a4e2a65
egl: fix assorted context-related bugs
...
Move memset() to proper place.
Added EGL_CONTEXT_CLIENT_VERSION query.
Fix bad return EGL_FALSE -> EGL_TRUE.
2008-06-19 21:19:33 -06:00
Brian Paul
a8533d5493
egl: clean up prototype code, new _eglFindAPIs() function.
2008-06-19 16:26:20 -06:00
Brian Paul
a668b43568
egl: use RTLD_LAZY
2008-06-18 09:22:01 -06:00
Brian Paul
f61923441f
egl: some basic docs for libEGL
2008-06-11 19:35:52 -06:00
Brian Paul
6b389b5c2f
egl: some prototype Windows code (eq for dlopen,dlsym)
2008-06-11 19:35:32 -06:00
Brian Paul
b9c5b0bc4b
egl: some prototype API detection code
2008-06-10 16:14:09 -06:00
Brian Paul
6420a62cf0
egl: s/softpipe_egl.so/egl_softpipe.so/
2008-06-09 12:28:07 -06:00
Brian Paul
50d59c8be1
egl: choose between DRI and softpipe drivers
2008-06-09 12:28:07 -06:00
Brian Paul
47ddcd2a71
egl: make _eglChooseDRMDriver() non-static
2008-06-06 15:52:47 -06:00
Brian Paul
f6e030f531
egl: change default logging level to _EGL_WARNING
2008-06-06 15:52:47 -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
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
d5078b9432
egl: clean-up re-org of the client API state
2008-05-30 13:45:40 -06:00
Brian Paul
834aa8cfbc
egl: check for EGL_DRIVER env var to override normal driver selection process
2008-05-30 11:47:09 -06:00
Brian Paul
274dd381a3
egl: fix width/height tests
2008-05-30 11:47:08 -06:00
Brian Paul
d0de5a2daf
link libEGL with Xlib
2008-05-30 11:47:08 -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
d1a0faffc3
egl: use softpipe_egl driver by default
2008-05-29 17:04:24 -06:00
Brian Paul
f751371028
egl: re-enable LOCAL_CFLAGS
2008-05-28 16:48:35 -06:00
Brian Paul
260ac3c983
egl: remove unused Display field
2008-05-28 16:08:50 -06:00
Brian Paul
11a261ef4f
egl: move a few small functions into new eglmisc.[ch] files
2008-05-28 15:50:58 -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
e084fe54f9
egl: include egldefines.h
2008-05-28 15:22:17 -06:00
Brian Paul
cf3c7d74cc
egl: added egldefines.h
2008-05-28 15:21:52 -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
e94d383b9b
egl: added eglstring.[ch]
2008-05-28 12:54:33 -06:00
Brian Paul
95c917f7dd
x-related EGL code (stub)
2008-05-28 08:42:36 -06:00
Jakob Bornecrantz
b870bf79b5
egl: Temporarily disable eglx.[c|h] building
2008-05-28 10:55:26 +01:00
Brian Paul
a772bbb16e
Move some config-related utility functions into new eglconfigutil.c file.
2008-05-27 16:57:49 -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
209a557574
fix typo: s/Contexts/Surfaces/
2008-05-27 14:17:40 -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
3e4128963d
pipe stderr to /dev/null
2008-05-27 13:45:16 -06:00
Dan Nicholson
a6464b3cb0
Never fail `make clean'
...
Mostly some pedantic changes such that `make clean' always ignores
errors. Also changed the top clean target to do the `touch
configs/current' dance instead of realclean.
2008-05-07 11:35:23 -07:00
Dan Nicholson
2a3e33865d
add support for LDFLAGS env var
2007-09-28 18:42:21 -06:00
Keith Whitwell
90ee7a4144
Gutsy oopses on touch of existing file. Workaround.
2007-08-07 10:18:30 +01:00
Christian Neumair
20e851bb9a
set log level w/ env var
2007-02-20 08:11:11 -07:00
Brian Paul
883f9891cb
LIB_DIR is now just 'lib' or 'lib64'
...
Replaced $(LIB_DIR) with $(TOP)/$(LIB_DIR), use LIB_DIR in install targets.
Patch by Hanno Böck.
2006-07-13 02:50:27 +00:00
Brian Paul
63b852f4f9
fix typo
2006-02-05 16:38:33 +00:00
Brian Paul
b2006a40eb
some initial EGL 1.2 work
2006-01-30 00:10:55 +00:00
Dave Airlie
bc8390fa6c
this needs to be calloced
2005-12-23 08:17:44 +00:00
Brian Paul
c9b4acfeb8
minor code movement
2005-12-17 05:37:15 +00:00
Brian Paul
4882279633
Some initial per-thread support.
...
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
2005-12-10 17:54:00 +00:00
Brian Paul
b04dd5c587
Added EGL_SCREEN_POSITION_GRANULARITY_MESA query.
...
Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
2005-12-10 17:53:07 +00:00
Brian Paul
ad6f8eba00
lots of updates, mode sorting, etc
2005-12-10 17:52:11 +00:00
Brian Paul
6002d2ff4e
implement config sorting for eglChooseConfig()
2005-12-10 17:51:13 +00:00
Brian Paul
58f45fa44d
added _EGLExtensions typedef
2005-11-29 04:44:33 +00:00
Brian Paul
5285c32a17
Put extension flags, string into separate struct.
2005-11-29 04:43:37 +00:00
Brian Paul
d548bf41d3
Redo _eglInitSurface() so it can be used with all surface types.
...
Redo _eglInitContext() to do error checking, attribute list parsing, etc.
2005-11-27 23:57:19 +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
d2c64e0b83
report error token in message printed in _eglError()
2005-11-24 03:53:46 +00:00
Brian Paul
b1abf1ea8e
change error test in _eglParseConfigAttribs()
2005-11-24 03:48:19 +00:00
Brian Paul
ff707ead2b
init attribs to EGL_DONT_CARE in _eglParseConfigAttribs()
2005-11-24 03:41:56 +00:00
Brian Paul
39591da355
update some comments
2005-11-23 01:42:40 +00:00
Brian Paul
b8829facc7
change error message
2005-11-23 01:38:30 +00:00
Brian Paul
b711eb793b
use _eglLog()
2005-11-23 01:38:12 +00:00
Brian Paul
f049ca4e33
New _eglLog() function to replace fprintf/printf calls for debug/info.
2005-11-23 01:37:30 +00:00
Jon Smirl
485528f2ac
More EGL prep. No impact on anything outside of EGL
2005-08-05 03:33:59 +00:00
Brian Paul
198d6d05b0
remove eglQueryDisplayMESA()
2005-05-17 13:22:13 +00:00
Brian Paul
d2ab4eb2c2
remove glmode stuff
2005-05-17 13:21:12 +00:00
Brian Paul
5119056324
update comments
2005-05-17 02:14:44 +00:00
Brian Paul
4c80f8df46
more work on _eglConfigToContextModesRec()
2005-05-17 02:13:00 +00:00
Jon Smirl
e03b5cdf3f
Make EGL_NO_MODE_MESA work.
2005-05-17 02:12:29 +00:00
Brian Paul
167b141e6e
added _eglInitPbufferSurface()
2005-05-17 02:12:26 +00:00
Jon Smirl
d06da50888
Fix several internal problems with generating the list of configs.
2005-05-17 00:59:13 +00:00
Jon Smirl
380991cb65
Implement query of surface type.
2005-05-16 16:50:38 +00:00
Brian Paul
f9bad3dfea
use EGLint instead of unsigned long for eglCopyContextMESA, added comments
2005-05-16 02:21:08 +00:00
Brian Paul
a495ed372f
separate ext strings with a space
2005-05-16 02:17:49 +00:00
Brian Paul
51ac95ba89
added boolean extension flags to _EGLDriver
2005-05-16 02:15:42 +00:00
Brian Paul
6493bd07a7
restore _eglSetConfigAttrib (for now), added prototype _eglConfigToContextModesRec()
2005-05-16 02:14:50 +00:00
Brian Paul
5873faf39b
make _eglSetConfigAtrib() a static function, and rename it
2005-05-16 00:45:03 +00:00
Brian Paul
9b134f641c
minor tweaks
2005-05-16 00:31:29 +00:00
Jon Smirl
45472672a2
A few egl patches needed for glitz, mainly config BITS
2005-05-15 04:00:59 +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
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