summaryrefslogtreecommitdiff
path: root/src/egl/main
AgeCommit message (Collapse)Author
2010-06-29st/egl: Build a single EGL driver.Chia-I Wu
This change makes st/egl build a single egl_gallium.so and multiple st_<API>.so and pipe_<HW>.so. When a display is initialized, the corresponding pipe driver will be loaded. When a context is created, the corresponding state tracker will be loaded. Unlike DRI drivers, no ABI compatibility is maintained. egl_gallium, pipe drivers and state trackers should always be distributed as a single package. As such, there is only a single src/gallium/targets/egl/ that builds everything for the package.
2010-06-29st/egl: One driver per hardware.Chia-I Wu
Merge multiple egl_<platform>_<pipe>.so into a single egl_gallium_<pipe>.so. The environment variable EGL_PLATFORM is now used to modify the return value of _eglGetNativePlatform.
2010-06-23egl: Add support for EGL_MESA_drm_display.Chia-I Wu
The extension defines eglGetDRMDisplay that creates an EGLDisplay from a DRM fd. Calling eglCreateWindowSurace or eglCreatePixmapSurface with such displays will generate EGL_BAD_NATIVE_WINDOW or EGL_BAD_NATIVE_PIXMAP.
2010-06-23egl: Introduce platform displays internally.Chia-I Wu
This commit introduces type-safe platform displays internally. A platform display consists of a generic pointer and an enum that specifies the platform. An EGLDisplay is created from a platform display. Native displays become platform displays whose platform is determined by _eglGetNativePlatform(). Platform windows and pixmaps may also be introduced if needed.
2010-06-17egl: s/EGL_DISPLAY/EGL_PLATFORM/.Chia-I Wu
A platform is already used to mean a window system in EGL. No need to use a different term.
2010-06-17egl: s/_EGL_PLATFORM/_EGL_OS/ and s/POSIX/UNIX/.Chia-I Wu
A platform means a native window system in EGL. Use OS that follows Gallium instead.
2010-05-31egl: Use SConscript for Windows build.Chia-I Wu
Fix several portability issues and add SConscript for Windows build.
2010-05-31Define PUBLIC to dllexport on MSVC.Chia-I Wu
Define PUBLIC to __declspec(dllexport) when _MVC_VER is defined.
2010-05-31Always define int32_t in compiler headers.Chia-I Wu
eglplatform.h no longer defines int32_t.
2010-05-27egl: Return NULL if we fail to load a default driverKristian Høgsberg
2010-05-14egl: Implement EGL_NOK_texture_from_pixmapKristian Høgsberg
This extension allows a color buffer to be used for both rendering and texturing. EGL allows the use of color buffers of pbuffer drawables for texturing, this extension extends this to allow the use of color buffers of pixmaps too.
2010-05-14egl: Only allow valid config attributes in _eglParseConfigAttribList()Kristian Høgsberg
Passing 0x3030, 0 in the chooser list didn't get caught.
2010-05-14egl: Silence uninitialized variable warnings.Vinson Lee
2010-05-13egl: Implement EGL_NOK_swap_regionKristian Høgsberg
This extension adds a new function which provides an alternative to eglSwapBuffers. eglSwapBuffersRegionNOK accepts two new parameters in addition to those in eglSwapBuffers. The new parameters consist of a pointer to a list of 4-integer blocks defining rectangles (x, y, width, height) and an integer specifying the number of rectangles in the list.
2010-05-13egl: Allow a prioritized list of default driversKristian Høgsberg
When there is no user driver or any matching display drivers we fall back to the default driver. This patch lets us have a list of default drivers instead of just one. The drivers are loaded in turn and we attempt to initialize the display. If it fails we unload the driver and move on to the next one. Compared to the display driver mechanism, this avoids loading a number of drivers and then only using one. Also, we call Initialize to see if the driver will work instead of relying on Probe. To know for sure that a driver will work, Probe really have to do a full Initialize, so we will just use Initialize directly.
2010-05-13egl: Drop broken _EGL_PLATFORM_NO_OS codeKristian Høgsberg
It would do strlen(library_suffix()) in _eglLoaderFile(), with library_suffix() returning NULL. So obviuosly not used or tested.
2010-05-13egl: Don't try to load driver basename if the platform needs a suffixKristian Høgsberg
That is, don't dlopen(egl_glx) when we know we need to append .so.
2010-05-08egl: Add _eglSearchPathForEach.Chia-I Wu
The function can be used by a driver to check each search path of EGL.
2010-05-04Add egl.pc fileKristian Høgsberg
2010-04-19Merge branch '7.8'Dan Nicholson
Conflicts: progs/egl/Makefile progs/egl/Makefile is gone on master with the egl demos split into subdirectories. Will require an additional commit.
2010-04-19egl: Pass flags to locate Xlib headers and librariesDan Nicholson
eglplatform.h pulls in Xlib.h on X11 platforms. Likewise, the egl glx driver and egl programs needs to link to libX11. Make sure we use the locations the user told us about. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-04-06egl: Unbind the old context in _eglBindContext.Chia-I Wu
The last commit incorrectly moved the code under an "else".
2010-04-06egl: Fix eglMakeCurrent with different surfaces.Chia-I Wu
0a82fadcdd0b6ebbc345c7c302da0e0efce40a98 seems to trigger a bug in _eglBindContext. Rework the logics yet again. It is simpler, and hopefully correct this time.
2010-03-28egl: Make _eglBindContextToSurfaces more readable.Chia-I Wu
There is no effective changes given how the function is called. It is still not trivial, but it should be more readable and resemble _eglBindContextToThread a lot.
2010-03-28egl: Always return the previously bound context.Chia-I Wu
When a newly bound context is the same as the previously bound one, _eglBindContextToThread should still return the context instead of NULL. This gives the driver a chance to flush the context.
2010-03-03Remove support for GCC older than 3.3.0Ian Romanick
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-02-23egl: Remove unused _EGL_SKIP_HANDLE_CHECK.Chia-I Wu
It was added to skip checking EGLDisplay, EGLSurface, and etc. It is never defined and the spec does not allow the checks to be skipped. Remove it for good.
2010-02-19egl: Silence warnings when compiled with -pedantic.Chia-I Wu
Just follow gcc's advices here.
2010-02-19egl: Silence warnings in check/return macros.Chia-I Wu
The macros give warnings when compiled with -pedantic. This commit is based on a patch by Brian Paul, with minor changes to add do {} while(0) and rename the check macros.
2010-02-17egl: Revisit global data locking.Chia-I Wu
Lock the global mutex in _eglPreloadDrivers and _eglAllocScreenHandle. Add comments to why certain pathes do not need locking.
2010-02-17egl: Always lock a display before using it.Chia-I Wu
This gives a simple access control to the display. It is potentially slow, but a finer grained mutex can always be used in the future. The benefit of this simple approach is that drivers need not to worry about thread-safety.
2010-02-17egl: Make eglGetDisplay atomic.Chia-I Wu
Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove unused _eglUnlinkDisplay.
2010-02-17egl: Add a mutex to _EGLDisplay.Chia-I Wu
A display may be shared by multiple threads. Add a mutex for access control.
2010-02-17egl: eglGetError should return the status of the last call.Chia-I Wu
Use macros to record the status of the function call before returning. This is the only way that eglGetError can return the status of the most recent function call.
2010-02-17egl: Always record error code.Chia-I Wu
The error code denotes the success or failure of the most recent function call. A call to _eglError should always update the error code.
2010-02-17egl: Use new error checking macros.Chia-I Wu
Replace all uses of _EGL_DECLARE_* and _eglCheck* by _EGL_CHECK_*.
2010-02-17egl: Add new error checking macros.Chia-I Wu
Add _EGL_CHECK_* which will replace _EGL_DECLARE_* for error checking. Move _eglCheck* earlier in the file so that the macros and the functions are grouped together.
2010-02-05egl: Add debug messages to config validation and matching.Chia-I Wu
It might be desirable find out which attribute went wrong.
2010-02-05egl: Clean up eglconfig.h.Chia-I Wu
Update the comments to macros/functions. Remove unused _eglSetConfigAttrib.
2010-02-05egl: Update the comments to typecast macros.Chia-I Wu
Put a note that the macros define functions and should not be ended with a semicolon when used.
2010-02-05egl: Clarify IsLinked and IsBound.Chia-I Wu
Both a link and a binding creates a reference to the resource. Drivers should not destroy the resource when there is a reference. The difference is better described in doc/egl.html.
2010-02-04egl: Add macros to define typecast functions.Chia-I Wu
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-04egl: fix wrong argument. Use loader_data instead of loaderIgor Oliveira
2010-02-03egl: Rename _eglPreloadForEach callbacks.Chia-I Wu
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-03egl: Fix a potential segfault in driver suffix matching.Chia-I Wu
The driver suffix might be NULL on some platforms. Perform the matching only when there is a suffix.
2010-02-03egl: Remove unnecessary #ifdef's.Chia-I Wu
There were some refactorings with the addition of EGL_DRIVERS_PATH. They made some platform #ifdef's unnecessary.
2010-02-03egl: Ignore certain environment variables when setuid/setgid.Chia-I Wu
Specifically, ignore EGL_DRIVERS_PATH when an application is setuid/setgid. And ignore EGL_DRIVER when there is a slash in it.
2010-02-03egl: Add EGL_DRIVERS_PATH environment variable.Chia-I Wu
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-01-31egl: Remove unnecessary headers.Vinson Lee
2010-01-31egl: Clean up surface attributes.Chia-I Wu
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.