summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.c
Commit message (Collapse)AuthorAgeFilesLines
* egl: Replace KHR_surfaceless_* extensions with KHR_surfaceless_contextIan Romanick2012-08-061-6/+2
| | | | | | | | | | | | KHR extension name is reserved for Khronos ratified extensions, and there is no such thing as EGL_KHR_surfaceless_{gles1,gles2,opengl}. Replace these three extensions with EGL_KHR_surfaceless_context since that extension actually exists. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: Add EGL_WAYLAND_PLANE_WL attributeKristian Høgsberg2012-07-111-0/+20
| | | | | | | This lets us specify the plane to create the image for for multiplanar wl_buffers. Signed-off-by: Kristian Høgsberg <[email protected]>
* egl: add EGL_NV_post_sub_bufferFredrik Höglund2011-12-201-0/+21
| | | | | | | | | v2: Handle EGL_POST_SUB_BUFFER_SUPPORTED_NV in _eglParseSurfaceAttribList() Signed-off-by: Fredrik Höglund <[email protected]> [olv: remove #ifdef checks]
* egl: KHR_reusable_sync entrypoints are missing from eglGetProcAddressChia-I Wu2011-12-201-0/+5
|
* egl: remove #ifdef's for official extensionsChia-I Wu2011-12-201-30/+0
| | | | | | | There is no point in having them when we distribute eglext.h. As for unofficial extensions, there is a chance that we might remove some of them evetually. Keeping the #ifdef's for now should make that easier.
* egl: remove EGL_ANDROID_swap_rectangleChia-I Wu2011-12-201-25/+0
| | | | | We never support this unofficial extension, and it has been removed from Android recently. There is no point in keeping it.
* egl: add Android-specific extensionsChia-I Wu2011-08-211-0/+25
| | | | | | | | Add EGL_ANDROID_image_native_buffer and EGL_ANDROID_swap_rectangle. There is no spec for them though. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: Native Display autodetectionBenjamin Franzke2011-08-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | EGL doesnt define howto manage different native platforms. So mesa has a builtime configurable default platform, whith non-standard envvar (EGL_PLATFORM) overwrites. This caused unneeded bugreports, when EGL_PLATFORM was forgotten. Detection is grouped into basic types of NativeDisplays (which itself needs to be detected). The final decision is based on characteristcs of these basic types: File Desciptor based platforms (fbdev): - fstat(2) to check for being a fd that belongs to a character device - check kernel subsystem (todo) Pointer to structuctures (x11, wayland, drm/gbm): - mincore(2) to check whether its valid pointer to some memory. - magic elements (e.g. pointers to exported symbols): o wayland display stores interface type pointer (first elm.) o gbm stores pointer to its constructor (first elm.) o x11 as a fallback (FIXME?) Reviewed-by: Kristian Høgsberg <[email protected]>
* egl: add copyright noticesChia-I Wu2011-07-021-0/+30
| | | | | The list of copyright holders could be incomplete. Please update directly or notify me if your name is missing.
* egl: Fix int <-> ptr casts.José Fonseca2011-05-121-1/+1
| | | | Based on zhigang gong <[email protected]>'s patch.
* egl: Use the right extension name in #ifdefKristian Høgsberg2011-04-251-1/+1
|
* egl: Add EGL_WL_bind_wayland_displayBenjamin Franzke2011-03-011-0/+44
|
* egl: Cleanup _EGLDisplay initialization.Chia-I Wu2011-01-131-6/+3
| | | | | Reorder/rename and document the fields that should be set by the driver during initialization. Drop the major/minor arguments from drv->API.Initialize.
* egl: Use reference counting to replace IsLinked or IsBound.Chia-I Wu2010-10-231-6/+11
| | | | | Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update _eglBindContext and drivers to do reference counting.
* egl: Drop dpy argument from the link functions.Chia-I Wu2010-10-231-9/+9
| | | | | All display resources are already initialized with a display. Linking simply links a resource to its display.
* egl: Check extensions.Chia-I Wu2010-09-301-11/+41
| | | | | Do not call into the driver if the extension for the called function is not enabled.
* egl: Use _EGL_CHECK_DISPLAY in eglCreateContext.Chia-I Wu2010-09-101-1/+1
| | | | | _EGL_CHECK_DISPLAY checks the display and returns from eglCreateContext on error.
* egl: Add EGL_MESA_drm_image extensionKristian Høgsberg2010-08-251-0/+43
| | | | Create EGLImages from DRM buffer handles.
* egl: Allow core functions to be queried.Chia-I Wu2010-08-201-1/+38
| | | | | When _EGL_GET_CORE_ADDRESSES is defined, eglGetProcAddress can be used to query core functions. This is non-standard, but some apps expect it.
* egl: Add support for EGL_KHR_reusable_sync.Chia-I Wu2010-08-171-0/+107
| | | | Individual drivers still need to support and enable the extension.
* egl: EGL_KHR_surfaceless_* extensionsKristian Høgsberg2010-07-281-1/+5
| | | | | | | | | These extensions allow an application to make a context current by passing EGL_NO_SURFACE for the write and read surface in the call to eglMakeCurrent. The motivation is that applications that only want to render to client API targets (such as OpenGL framebuffer objects) should not need to create a throw-away EGL surface just to get a current context.
* egl: Remove unnecessary headers.Vinson Lee2010-07-061-1/+0
|
* egl: Rework driver loading.Chia-I Wu2010-07-061-40/+8
| | | | | | | | | | | | | | | Driver loading is now splitted into two stages. In the first stage, an _EGLModule is created for each driver: user driver, default drivers, and all files in the search directories that start with "egl_". Modules are not loaded at this stage. In the second stage, each module is loaded to initialize a display. The process stops at the first module that can initialize the display. If eglGetProcAddress is called before eglInitialize, the same code path will be taken to find the first module that supports EGL_DEFAULT_DISPLAY. Because we do not want to initialize the display, drv->Probe is used instead in this case.
* egl: Always use EGLAPIENTRY in api function prototypesnobled2010-07-031-15/+15
| | | | Fixes the build on Windows.
* egl: Add support for EGL_MESA_drm_display.Chia-I Wu2010-06-231-0/+14
| | | | | | | 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.
* egl: Introduce platform displays internally.Chia-I Wu2010-06-231-1/+8
| | | | | | | | | | | 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.
* egl: Use SConscript for Windows build.Chia-I Wu2010-05-311-1/+3
| | | | Fix several portability issues and add SConscript for Windows build.
* egl: Silence uninitialized variable warnings.Vinson Lee2010-05-141-1/+1
|
* egl: Implement EGL_NOK_swap_regionKristian Høgsberg2010-05-131-0/+32
| | | | | | | | | 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.
* egl: Allow a prioritized list of default driversKristian Høgsberg2010-05-131-6/+8
| | | | | | | | | | | | | | 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.
* 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: Always lock a display before using it.Chia-I Wu2010-02-171-45/+80
| | | | | | | 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-171-8/+2
| | | | | Merge _eglNewDisplay and _eglLinkDisplay into _eglFindDisplay. Remove unused _eglUnlinkDisplay.
* 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: 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: Clean up header inclusions.Chia-I Wu2010-01-301-0/+1
| | | | Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
* egl: Correctly unbind contexts in eglReleaseThread.Chia-I Wu2010-01-281-0/+4
| | | | | MakeCurrent unbinds the current context of the current API. Modify the current API to make sure all contexts are correctly unbound.
* egl: eglMakeCurrent should accept an uninitialized display.Chia-I Wu2010-01-281-5/+13
| | | | | | 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.
* egl: Use a boolean to indicate whether a display is initialized.Chia-I Wu2010-01-281-16/+19
| | | | | | 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.
* egl: Remove _eglOpenDriver and _eglCloseDriver.Chia-I Wu2010-01-261-5/+2
| | | | | _eglCloseDriver is no-op and _eglOpenDriver does nothing but call _eglMatchDriver. Export _eglMatchDriver directly.
* egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay.Chia-I Wu2010-01-261-2/+2
| | | | | They have little use in drivers since drivers need to work for multiple current contexts.
* egl: Fix leaks in eglReleaseThread.Chia-I Wu2010-01-261-6/+13
| | | | There may be multiple bound contexts that should be unbound.
* egl: Native types are renamed in EGL 1.3.Chia-I Wu2010-01-251-4/+4
| | | | Rename Native*Type to EGLNative*Type.
* egl: Add support for EGL_KHR_image.Chia-I Wu2010-01-251-0/+54
| | | | Individual drivers still need to implement the API hooks.
* egl: Update headers.Chia-I Wu2010-01-251-1/+2
| | | | | | Update to the current versions found at http://www.khronos.org/registry/egl/. There is one modification in khrplatform.h for GCC visibility.
* egl: Make surfaces and contexts resources.Chia-I Wu2010-01-241-3/+3
| | | | | Turn _EGLSurface and _EGLContext into _EGLResource so that they can be managed uniformly.
* egl: Use _eglPreloadDrivers.Chia-I Wu2010-01-201-3/+3
| | | | | Replace the use of _eglPreloadDriver by _eglPreloadDrivers. The latter supports EGL_DISPLAY which have a better chance to "just work".
* egl: Add _EGLDriver as the first argument to GetProcAddress.Chia-I Wu2010-01-121-1/+2
| | | | | The rest of the driver API has it as the first argument. It should be there so that a driver has access to itself.
* egl: Rework the synchronization primitives.Chia-I Wu2009-10-151-24/+42
| | | | | | | This adds error checking to the synchronization primitives. And eglWaitGL is now implemented by eglWaitClient. Signed-off-by: Chia-I Wu <[email protected]>