summaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* egl_dri2: Enable KHR_gl_texture_2D_imageKristian Høgsberg2010-04-141-0/+1
| | | | Forgot to set the enabled bit when I implemented the extension.
* egl_dri2: Flush before context switch and swap buffers.Chia-I Wu2010-04-061-0/+18
| | | | | DRI does not define any callback to flush the current context. GLX loader simply calls glFlush. Follow the GLX loader here.
* egl: Unbind the old context in _eglBindContext.Chia-I Wu2010-04-061-10/+9
| | | | The last commit incorrectly moved the code under an "else".
* egl: Fix eglMakeCurrent with different surfaces.Chia-I Wu2010-04-061-30/+45
| | | | | | 0a82fadcdd0b6ebbc345c7c302da0e0efce40a98 seems to trigger a bug in _eglBindContext. Rework the logics yet again. It is simpler, and hopefully correct this time.
* egl: Make _eglBindContextToSurfaces more readable.Chia-I Wu2010-03-281-11/+25
| | | | | | 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.
* egl: Always return the previously bound context.Chia-I Wu2010-03-281-9/+8
| | | | | | 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.
* Remove support for GCC older than 3.3.0Ian Romanick2010-03-031-3/+2
| | | | Signed-off-by: Ian Romanick <[email protected]>
* egl_dri2: Factor out DRI2 protocol bits from initialize.Kristian Høgsberg2010-03-031-86/+155
|
* egl_dri2: Implement EGL_KHR_gl_renderbuffer_imageKristian Høgsberg2010-02-261-63/+103
|
* egl_dri2: Implement EGL_KHR_image and EGL_KHR_image_pixmapKristian Høgsberg2010-02-241-4/+149
|
* egl: Remove unused _EGL_SKIP_HANDLE_CHECK.Chia-I Wu2010-02-234-53/+0
| | | | | | 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.
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-1/+1
|
* egl: Silence warnings when compiled with -pedantic.Chia-I Wu2010-02-194-4/+10
| | | | Just follow gcc's advices here.
* egl: Silence warnings in check/return macros.Chia-I Wu2010-02-191-139/+147
| | | | | | 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.
* egl: Revisit global data locking.Chia-I Wu2010-02-174-8/+23
| | | | | Lock the global mutex in _eglPreloadDrivers and _eglAllocScreenHandle. Add comments to why certain pathes do not need locking.
* egl: Always lock a display before using it.Chia-I Wu2010-02-172-45/+81
| | | | | | | 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.
* egl: Make eglGetDisplay atomic.Chia-I Wu2010-02-173-103/+22
| | | | | Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove unused _eglUnlinkDisplay.
* egl: Add a mutex to _EGLDisplay.Chia-I Wu2010-02-172-0/+4
| | | | | A display may be shared by multiple threads. Add a mutex for access control.
* egl: eglGetError should return the status of the last call.Chia-I Wu2010-02-171-123/+226
| | | | | | 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.
* egl: Always record error code.Chia-I Wu2010-02-171-4/+5
| | | | | The error code denotes the success or failure of the most recent function call. A call to _eglError should always update the error code.
* egl: Use new error checking macros.Chia-I Wu2010-02-171-115/+110
| | | | Replace all uses of _EGL_DECLARE_* and _eglCheck* by _EGL_CHECK_*.
* egl: Add new error checking macros.Chia-I Wu2010-02-171-94/+134
| | | | | | 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.
* egl_dri2: Only allocate config if we're going to keep itKristian Høgsberg2010-02-091-36/+31
| | | | Small optimization.
* egl_dri2: Initialize config attributes with visual id and class from XKristian Høgsberg2010-02-091-16/+58
|
* egl_dri2: Allow pbuffer and pixmap surfaces for all configsKristian Høgsberg2010-02-091-8/+7
|
* egl_dri2: Implement eglBindTexImage()Kristian Høgsberg2010-02-091-9/+76
|
* egl_dri2: Use a helper function for looking up and binding extensionsKristian Høgsberg2010-02-091-27/+52
|
* egl_dri2: Fix initialization with EGL_DEFAULT_DISPLAYKristian Høgsberg2010-02-091-6/+6
|
* egl_dri2: Use pkg-config cflags and libs from configure outputKristian Høgsberg2010-02-051-3/+2
| | | | | Running pkg-config in Makefiles is bad form, since it doesn't respect the PKG_CONFIG_PATH value set at ./configure time.
* egl_dri2: Log both driver and core extensionsKristian Høgsberg2010-02-051-1/+4
|
* egl_dri2: Audit and fix errors pathsKristian Høgsberg2010-02-051-49/+72
|
* egl_dri2: Just cast the pointer difference to an intKristian Høgsberg2010-02-051-4/+1
|
* egl: Add debug messages to config validation and matching.Chia-I Wu2010-02-051-2/+23
| | | | It might be desirable find out which attribute went wrong.
* egl: Clean up eglconfig.h.Chia-I Wu2010-02-051-14/+7
| | | | | Update the comments to macros/functions. Remove unused _eglSetConfigAttrib.
* egl: Remove egl_xdri.Chia-I Wu2010-02-056-1440/+0
| | | | | | | egl_xdri steals code from src/glx/x11/. This makes it broken from time to time when there is a bigger change to the GLX code. As egl_dri2 has been merged, which also functions as a DRI2 driver loader, remove egl_xdri for good.
* egl: Update the comments to typecast macros.Chia-I Wu2010-02-051-0/+6
| | | | | Put a note that the macros define functions and should not be ended with a semicolon when used.
* egl_dri2: Use _EGL_DRIVER_STANDARD_TYPECASTS.Chia-I Wu2010-02-051-29/+2
| | | | It saves the driver from defining the boring typecasts itself.
* egl: Clarify IsLinked and IsBound.Chia-I Wu2010-02-052-0/+12
| | | | | | 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.
* egl_dri2: Do not destroy linked resources.Chia-I Wu2010-02-051-3/+3
| | | | A linked resource is stil owned by the display.
* egl_dri2: Fix a snprintf warning.Chia-I Wu2010-02-051-1/+4
| | | | | The subtraction between two pointers has type unsigned int (only on x86-64?), while the format string expects an int.
* egl_dri2: Add a debug print for DRI2 extensions.Chia-I Wu2010-02-051-0/+1
|
* egl: Implement eglCopyBuffers for DRI2, make pixmap and pbuffers actually workKristian Høgsberg2010-02-041-22/+65
|
* egl: Add driver for EGL on X with DRI2Kristian Høgsberg2010-02-042-0/+950
|
* egl: Convert drivers to use typecast macros.Chia-I Wu2010-02-042-61/+10
| | | | | Use macros to define the standard typecasts. This saves lots of typings.
* egl: Add macros to define typecast functions.Chia-I Wu2010-02-041-0/+21
| | | | | | | | | | 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.
* egl: fix wrong argument. Use loader_data instead of loaderIgor Oliveira2010-02-041-1/+1
|
* egl: Rename _eglPreloadForEach callbacks.Chia-I Wu2010-02-031-12/+12
| | | | | | | 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.
* egl: Fix a potential segfault in driver suffix matching.Chia-I Wu2010-02-031-3/+5
| | | | | The driver suffix might be NULL on some platforms. Perform the matching only when there is a suffix.
* egl: Remove unnecessary #ifdef's.Chia-I Wu2010-02-031-8/+0
| | | | | There were some refactorings with the addition of EGL_DRIVERS_PATH. They made some platform #ifdef's unnecessary.
* egl: Ignore certain environment variables when setuid/setgid.Chia-I Wu2010-02-031-2/+16
| | | | | Specifically, ignore EGL_DRIVERS_PATH when an application is setuid/setgid. And ignore EGL_DRIVER when there is a slash in it.