summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglapi.h
Commit message (Collapse)AuthorAgeFilesLines
* egl: Unify the EGLint/EGLAttrib paths in eglCreateSync* (v3)Chad Versace2016-10-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pre-patch, there were two code paths for parsing EGLSync attribute lists: one path for old-style EGLint lists, used by eglCreateSyncKHR, and another for new-style EGLAttrib lists, used by eglCreateSync (1.5) and eglCreateSync64 (EGL_KHR_cl_event2). There were two attrib_list parsing functions, _eglParseSyncAttribList(_EGLSync *sync, const EGLint *attrib_list) _eglParseSyncAttribList64(_EGLSync *sync, const EGLattrib *attrib_list) This patch unifies the two attrib_list parsing functions into one, _eglParseSyncAttribList(_EGLSync *sync, const EGLattrib *attrib_list) Many internal EGLSync function signatures had *two* attrib_list parameters to accomodate both code paths: one parameter was an EGLint list and other an EGLAttrib list. At most one of the parameters was allowed to be non-null. This patch removes the `EGLint *attrib_list` parameter, leaving only the `EGLAttrib *attrib_list` parameter, for all internal EGLSync functions. v2: - Consistently use condition (sizeof(int_list[0]) == sizeof(attrib_list[0])). [for emil] v3: - Don't double-unlock the display in eglCreateSyncKHR. Reviewed-by: Emil Velikov <emil.velikov@collabora.com> (v2)
* egl: Add _eglConvertIntsToAttribs()Chad Versace2016-10-041-0/+2
| | | | | | | This function converts an attribute list from EGLint[] to EGLAttrib[]. Will be used in following patches to cleanup EGLSync attribute parsing. Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* mesa_glinterop: remove mesa_glinterop typedefsEmil Velikov2016-05-301-6/+6
| | | | | | | | | | | | | | | | As is there are two places that do the typedefs - dri_interface.h and this header. As we cannot include the former in here, just drop the typedefs and use the struct directly (as needed). This is required because typedef redefinition is C11 feature which is not supported on all the versions of GCC used to build mesa. v2: Kill the typedef alltogether, as per Marek. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96236 Cc: Vinson Lee <vlee@freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* mesa_glinterop: make GL interop version field bidirectionalEmil Velikov2016-05-241-1/+1
| | | | | | | | | | | | | | This allows clear and easy communication between the two. Caller: Requesting information (struct vN) Callee: I know how to deal with older version (vN-1) only. Here is your data and the version I support. Caller: Older version ? Sure I'll cap all access to the fields provided by the older version (vN-1) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* egl: implement EGL part of interop interface (v2)Marek Olšák2016-04-201-0/+9
| | | | v2: - use const
* egl: clean up typedef madness in the backend APIMarek Olšák2016-03-101-140/+140
| | | | | | let's use the dd.h format Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* egl: remove ifdef $(egl_extension) compile guardsEmil Velikov2015-08-011-24/+0
| | | | | | All of these are already defined in the headers provided. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* egl: add eglGetSyncAttrib (v2)Marek Olšák2015-06-051-2/+2
| | | | | | | | | v2: - don't modify "value" in eglGetSyncAttribKHR after an error - rename _egl_api::GetSyncAttribKHR -> GetSyncAttrib - rename GetSyncAttribKHR_t -> GetSyncAttrib_t - rename _eglGetSyncAttribKHR to _eglGetSyncAttrib Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: use EGL 1.5 types without suffixesMarek Olšák2015-06-051-2/+2
| | | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: Add needed extern "C" for C++ accessAlexander von Gluck IV2015-05-141-0/+10
| | | | | | * Haiku's egl driver is C++ due to the interface natively being C++ Reviewed-⁠by: Brian Paul <brianp@vmware.com>
* egl: Remove skeleton implementation of EGL_MESA_screen_surfaceAdam Jackson2015-05-111-31/+0
| | | | | | | | No backend wires this up to anything, and the extension spec has been marked obsolete for 4+ years. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
* egl: image_dma_buf_export - use KHR 64-bit typeDave Airlie2015-05-051-1/+1
| | | | | | | | After talking to Jon Leech he suggested this should be fine. update spec to the version in the registry. Signed-off-by: Dave Airlie <airlied@redhat.com>
* egl/dri2: implement EGL_KHR_cl_event2 (v2)Marek Olšák2015-04-301-1/+1
| | | | v2: fix the SYNC_CONDITION query
* egl/dri2: implement EGL_KHR_wait_syncMarek Olšák2015-04-301-0/+2
|
* egl: misc fixes for EGL_MESA_image_dma_buf_exportMarc-André Lureau2015-04-291-1/+1
| | | | | | | Fix define and a function argument name introduced in commit 8f7338f284cdb1fef64c85e3293d2200d0cc6387 Signed-off-by: Dave Airlie <airlied@redhat.com>
* egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie2015-04-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | At the moment to get an EGL image to a dma-buf file descriptor, you have to use EGL_MESA_drm_image, and then use libdrm to convert this to a file descriptor. This extension just provides an API modelled on EGL_MESA_drm_image, to return a dma-buf file descriptor. v2: update spec for new API proposal add internal queries to get the fourcc back from intel driver. v2.1: add gallium pieces. v2.2: add offsets to spec and API, rename fd->fds, stride->strides in API. rewrite spec a bit more, add some q/a v2.3: add modifiers to query interface and 64-bit type for that (Daniel Stone) specifiy what happens to num fds vs num planes differences. (Chad Versace) v2.4: fix grammar (Daniel Stone) Signed-off-by: Dave Airlie <airlied@redhat.com>
* egl: Remove eglQueryString virtual dispatch.Matt Turner2015-03-171-2/+0
| | | | Reviewed-by: Chad Versace <chad.versace@intel.com>
* egl: Add EGL_CHROMIUM_sync_control extension.Sarah Sharp2014-05-201-0/+3
| | | | | | | | | | | | | | | | | | | | | Chromium defined a new GL extension (that isn't registered with Khronos). We need to add an EGL extension for it, so we can migrate ChromeOS on Intel systems to use EGL instead of GLX. http://git.chromium.org/gitweb/?p=chromium/src/third_party/khronos.git;a=commitdiff;h=27cbfdab35c601f70aa150581ad1448d0401f447 The EGL_CHROMIUM_sync_control extension is similar to the GLX extension OML_sync_control, but only defines one function, eglGetSyncValuesCHROMIUM, which is equivalent to glXGetSyncValuesOML. http://www.opengl.org/registry/specs/OML/glx_sync_control.txt Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Cc: Jamey Sharp <jamey@minilop.net> Cc: Ian Romanick <idr@freedesktop.org> Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
* egl/main: Stop using EGLNative types internallyChad Versace2014-03-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internally, much of the EGL code uses EGLNativeDisplayType, EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type often does not match the variable's actual type. The concept of EGLNative types are a bad match for Linux, as explained below. And the EGL platform extensions don't use EGLNative types at all. Those extensions attempt to solve cross-platform issues by moving the EGL API away from the EGLNative types. The core of the problem is that eglplatform.h can define each EGLNative type once only, but Linux supports multiple EGL platforms. To work around the problem, Mesa's eglplatform.h contains multiple definitions of each EGLNative type, selected by feature macros. Mesa expects EGL clients to set the feature macro approrpiately. But the feature macros don't work when a single codebase must be built with support for multiple EGL platforms, *such as Mesa itself*. When building libEGL, autotools chooses the EGLNative typedefs based on the first element of '--with-egl-platforms'. For example, '--with-egl-platforms=x11,drm,wayland' defines the following: typedef Display* EGLNativeDisplayType; typedef Window EGLNativeWindowType; typedef Pixmap EGLNativePixmapType; Clearly, this doesn't work well for Wayland and GBM. Mesa works around the problem by casting the EGLNative types to different things in different files. For sanity's sake, and to prepare for the EGL platform extensions, this patch removes from egl/main and egl/dri2 all internal use of the EGLNative types. It replaces them with 'void*' and checks each explicit cast with a static assertion. Also, the patch touches egl_gallium the minimal amount to keep it compatible with eglapi.h. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
* wayland: Add an extension to create wl_buffers from EGLImagesNeil Roberts2013-12-041-0/+8
| | | | | | | | | | | | | | | | | | This adds an extension called EGL_WL_create_wayland_buffer_from_image which adds the following single function: struct wl_buffer * eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image); The function creates a wl_buffer which shares its contents with the given EGLImage. The expected use case for this is in a nested Wayland compositor which is using subsurfaces to present buffers from its clients. Using this extension it can attach the client buffers directly to the subsurface without having to blit the contents into an intermediate buffer. The compositing can then be done in the parent compositor. The extension is only implemented in the Wayland EGL platform because of course it wouldn't make sense anywhere else.
* egl: Update to Wayland 1.2 server APIAnder Conselvan de Oliveira2013-08-071-1/+1
| | | | | | | | | | Since Wayland 1.2, struct wl_buffer and a few functions are deprecated. References to wl_buffer are replaced with wl_resource and some getter functions and calls to deprecated functions are replaced with the proper new API. The latter changes are related to resource versioning. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
* egl: Add extension infrastructure for EGL_EXT_swap_buffers_with_damageRobert Bragg2013-05-071-0/+7
| | | | | Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* egl: Add extension infrastructure for EGL_EXT_buffer_ageKristian Høgsberg2013-01-041-0/+6
|
* egl: Add EGL_WAYLAND_PLANE_WL attributeKristian Høgsberg2012-07-111-0/+2
| | | | | | | This lets us specify the plane to create the image for for multiplanar wl_buffers. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
* egl: add EGL_NV_post_sub_bufferFredrik Höglund2011-12-201-0/+4
| | | | | | | | | v2: Handle EGL_POST_SUB_BUFFER_SUPPORTED_NV in _eglParseSurfaceAttribList() Signed-off-by: Fredrik Höglund <fredrik@kde.org> [olv: remove #ifdef checks]
* egl: remove #ifdef's for official extensionsChia-I Wu2011-12-201-12/+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-8/+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/+8
| | | | | | | | Add EGL_ANDROID_image_native_buffer and EGL_ANDROID_swap_rectangle. There is no spec for them though. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Chad Versace <chad@chad-versace.us>
* 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: Add EGL_WL_bind_wayland_displayBenjamin Franzke2011-03-011-0/+11
|
* egl: Cleanup _EGLDisplay initialization.Chia-I Wu2011-01-131-1/+1
| | | | | 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: Add EGL_MESA_drm_image extensionKristian Høgsberg2010-08-251-0/+10
| | | | Create EGLImages from DRM buffer handles.
* egl: Add support for EGL_KHR_reusable_sync.Chia-I Wu2010-08-171-0/+18
| | | | Individual drivers still need to support and enable the extension.
* egl: Implement EGL_NOK_swap_regionKristian Høgsberg2010-05-131-0/+7
| | | | | | | | | 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: Always lock a display before using it.Chia-I Wu2010-02-171-0/+1
| | | | | | | 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: Clean up header inclusions.Chia-I Wu2010-01-301-1/+1
| | | | Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
* egl: eglMakeCurrent should accept an uninitialized display.Chia-I Wu2010-01-281-0/+1
| | | | | | 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: Native types are renamed in EGL 1.3.Chia-I Wu2010-01-251-3/+3
| | | | Rename Native*Type to EGLNative*Type.
* egl: Add support for EGL_KHR_image.Chia-I Wu2010-01-251-1/+12
| | | | Individual drivers still need to implement the API hooks.
* egl: Add _EGLDriver as the first argument to GetProcAddress.Chia-I Wu2010-01-121-1/+1
| | | | | 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-4/+2
| | | | | | | This adds error checking to the synchronization primitives. And eglWaitGL is now implemented by eglWaitClient. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Rework eglSwapInterval.Chia-I Wu2009-10-151-1/+1
| | | | | | | This adds error checking to eglSwapInterval and clamps the swap interval. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* egl: Overhaul driver API.Chia-I Wu2009-08-181-37/+37
| | | | | | | | | | | | 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>
* egl: new eglGetProcAddress() codeBrian Paul2008-05-301-1/+10
| | | | | The idea is to pass the call down to the device driver where an API-specific query can be made. Untested.
* some initial EGL 1.2 workBrian Paul2006-01-301-1/+14
|
* Some initial per-thread support.Brian Paul2005-12-101-2/+2
| | | | Rename eglShowSurfaceMESA to eglShowScreenSurfaceMESA.
* Move all the EGL API function pointers into a new _egl_api struct.Brian Paul2005-11-241-0/+106