summaryrefslogtreecommitdiff
path: root/src/egl/main
AgeCommit message (Collapse)Author
2009-10-22egl: Correct conversion of native visual type.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Rework the synchronization primitives.Chia-I Wu
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-15egl: Rework eglSwapInterval.Chia-I Wu
This adds error checking to eglSwapInterval and clamps the swap interval. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Rework error checking in eglSwapBuffers.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Update comments about eglapi.c.Chia-I Wu
Mention that opaque handles are looked up and checked. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Rework error checking in eglGetCurrentSurface.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Include GL header in eglconfigutil.h.Chia-I Wu
This is just a cosmetic change. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Fix GLX_USE_TLS build.Chia-I Wu
Remove an extraneous semicolon. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-15egl: Fix eglCheckConfigHandle.Chia-I Wu
A stupid bug by me made the check void. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13egl: Improve logging facility.Chia-I Wu
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-13egl: Allow binding to any client API.Chia-I Wu
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-13egl: Preload a driver if eglGetProcAddress is called early.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13egl: Remove core functions from eglGetProcAddress.Chia-I Wu
eglGetProcAddress may not be used to query core (non-extension) functions. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13egl: Add support for driver built-in.Chia-I Wu
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-09-29egl: Add support for querying render buffer.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-29egl: Add a function to convert __GLcontextModes to _EGLConfig.Chia-I Wu
_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-29egl: Rework config lookup.Chia-I Wu
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-29egl: Rework configuration management.Chia-I Wu
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-29egl: Introduce config keys.Chia-I Wu
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-08-26egl: Remove Xdpy from EGLDisplay.Chia-I Wu
It is not used anymore. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21egl: Make _eglChooseDriver return the filename of the driver.Chia-I Wu
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-21egl: Remove dependency on libX11.Chia-I Wu
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-21egl: Check for null display in handle checking.Chia-I Wu
The display may be NULL when checking a handle. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Remove eglhash.c and eglhash.h.Chia-I Wu
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Add back handle checking.Chia-I Wu
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-18egl: Make lookup functions static inline.Chia-I Wu
progs/egl/demo3.c is also changed since it uses an internal function. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Remove hash table for displays.Chia-I Wu
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-18egl: Remove hash table for surfaces.Chia-I Wu
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-18egl: _eglCloseDriver should be no-op.Chia-I Wu
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-18egl: Some per-driver data should be per-display.Chia-I Wu
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-18egl: Change the way drivers are loaded.Chia-I Wu
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-18egl: Overhaul driver API.Chia-I Wu
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-11egl: Use _eglAddAtExitCall to free thread infos and displays.Chia-I Wu
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-11egl: Add _eglAddAtExitCall.Chia-I Wu
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-11egl: Make _eglGlobal initialize statically.Chia-I Wu
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-11egl: Implement _eglFiniDisplay.Chia-I Wu
_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-11egl: Make display and surface hash tables local.Chia-I Wu
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-11egl: Initialize current thread management on demand.Chia-I Wu
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-11egl: Destroy eglThreadInfo on thread exit.Chia-I Wu
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-11egl: Add eglmutex.h.Chia-I Wu
The implementation uses pthread mutex when available. Otherwise, it is no-op. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-09egl: Add depend and depend.bak to clean targetPauli Nieminen
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03egl: Correct the default values of surface attributes.Chia-I Wu
EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET should default to EGL_NO_TEXTURE. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-03egl: Make eglMakeCurrent more robust.Chia-I Wu
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-03egl: Replace IsBound by a pointer to the binding.Chia-I Wu
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-07-31egl: Silence warnings on x86-64.Chia-Wu
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-28egl: Comment out unused tables in_eglFillInConfigsChia-I Wu
This silences a compiler warning. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-21Add missing X11_INCLUDES to egl/drivers/demo and egl/main.Peter Hutterer
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-17egl: commit missing eglcurrent.[ch] filesBrian Paul
Not sure how these got left out from earlier commit.
2009-07-17egl: Remove redundant DeletePending flag.Chia-I Wu
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-17egl: Destroy display's resources upon termination.Chia-I Wu
eglTerminate should destroy the contexts and surfaces of the display. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>