summaryrefslogtreecommitdiffstats
path: root/src/egl/main
Commit message (Collapse)AuthorAgeFilesLines
* egl/dri2: implement platform_surfacelessHaixia Shi2015-06-163-1/+7
| | | | | | | | | | | | | | | | | | The surfaceless platform is for off-screen rendering only. Render node support is required. Only consider the render nodes. Do not use normal nodes as they require auth hooks. v3: change platform_null to platform_surfaceless v4: make libdrm required for surfaceless v5: remove modified include guards with defined(HAVE_SURFACELESS_PLATFORM) v6: use O_CLOEXEC for drm fd Signed-off-by: Haixia Shi <[email protected]> Signed-off-by: Zach Reizner <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* android: Depend on gallium_dri from EGL, instead of linking in gallium.Chih-Wei Huang2015-06-091-80/+3
| | | | | | | | | | | | The Android gallium build used to use gallium_egl, which was removed back in March. Instead, we will now use a normal Mesa libEGL loader with dlopen()ing of a DRI module. v2: add a clean step to rebuild all dri modules properly. v3: Squish the 2 patches doing this together (change by anholt). Signed-off-by: Chih-Wei Huang <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* egl: expose EGL 1.5 if all requirements are metMarek Olšák2015-06-052-0/+16
| | | | | | | | There's no driver support yet, because EGL_KHR_gl_colorspace isn't implemented. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: return correct invalid-type error from eglCreateSyncMarek Olšák2015-06-051-8/+19
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: add new platform functions (v2)Marek Olšák2015-06-051-0/+54
| | | | | | | | These are just wrappers around the existing extension functions. v2: return BAD_ALLOC if _eglConvertAttribsToInt fails Reviewed-by: Chad Versace <[email protected]>
* egl: add eglCreateImage (v2)Marek Olšák2015-06-051-0/+42
| | | | | | | v2: - use calloc - return BAD_ALLOC if calloc fails Reviewed-by: Chad Versace <[email protected]>
* egl: add eglGetSyncAttrib (v2)Marek Olšák2015-06-055-10/+29
| | | | | | | | | 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 <[email protected]>
* egl: add eglWaitSyncMarek Olšák2015-06-051-0/+12
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: add EGL 1.5 functions that don't need any changes from extensionsMarek Olšák2015-06-051-12/+16
| | | | | | | Declare the functions without the suffix, so that the core names are exported. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: use EGL 1.5 types without suffixesMarek Olšák2015-06-055-36/+36
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: add context attribs from EGL 1.5Marek Olšák2015-06-051-0/+30
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: fix setting context flagsMarek Olšák2015-06-051-2/+3
| | | | | | Cc: 10.6 10.5 10.4 <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: combine VersionMajor and VersionMinor into one variableMarek Olšák2015-06-052-7/+5
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: set the EGL version in common codeMarek Olšák2015-06-051-0/+7
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove unused _egl_global::ClientExtensionsMarek Olšák2015-06-052-19/+0
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: remove remaining EGL_MESA_copy_context skeletonEmil Velikov2015-05-142-2/+0
| | | | | | | | | | With earlier commit (7a58262e58d egl: Remove skeleton implementation of EGL_MESA_screen_surface) we've removed the skeleton implementation of eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension was never implemented in mesa. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* egl/main: fix EGL_KHR_get_all_proc_addressesEmil Velikov2015-05-141-3/+3
| | | | | | | | | | | | | | | | The extension requires that the address of the core functions should be available via eglGetProcAddress. Currently the list is guarded by _EGL_GET_CORE_ADDRESSES, which was only set for the scons (windows) build. Unconditionally enable it for all the builds (automake, android and haiku) considering that the extension is not platform specific and is always enabled. v2: Drop the _EGL_GET_CORE_ADDRESSES macro altogether. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* egl: more define fixes for EGL_MESA_image_dma_buf_exportMarc-André Lureau2015-05-142-2/+2
| | | | | | s/EGL_MESA_dma_buf_image_export/EGL_MESA_image_dma_buf_export as defined by the spec Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/main: expose only core EGL functions staticallyEmil Velikov2015-05-142-135/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | The EGL 1.3, 1.4 and 1.5 spec (as quoted below) explicitly mentions that providing static symbols for functions provided by EGL extensions is not portable. Considering that relatively recently we've seen a non-mesa desktop EGL implementation, the fact that we opt for such behaviour has gone unnoticed. From the EGL 1.5 specification: For functions that are queryable with eglGetProcAddress, implementations may choose to also export those functions statically from the object libraries implementing those functions. However, portable clients cannot rely on this behavior. To encourage devs against writing such non-portable code, let's hide the symbols similar to the official binary driver from NVIDIA. v2: Quote the EGL 1.5 spec, as suggested by Chad. Cc: Brian Paul <[email protected]> Cc: Chad Versace <[email protected]> Cc: Daniel Kurtz <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/main: Update README.txtEmil Velikov2015-05-141-7/+6
| | | | | | | | | | | | The driver search/load is not done at eglGetDisplay (or eglOpenDisplay as the readme called it) time, but during eglInitialize(). Drop _eglMain (available only for external drivers) reference. Mention we use function(s), specific to the built-in driver(s). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/main: cleanup function prototypesEmil Velikov2015-05-142-14/+2
| | | | | | | | | Cleanup the function propotypes which were part of the previous EGL drivers. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/main: drop support for external egl driversEmil Velikov2015-05-141-351/+13
| | | | | | | | The only user (egl_gallium) is not longer around. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: Add needed extern "C" for C++ accessAlexander von Gluck IV2015-05-1413-0/+110
| | | | | | * Haiku's egl driver is C++ due to the interface natively being C++ Reviewed-⁠by: Brian Paul <[email protected]>
* egl: Remove skeleton implementation of EGL_MESA_screen_surfaceAdam Jackson2015-05-1112-1196/+0
| | | | | | | | No backend wires this up to anything, and the extension spec has been marked obsolete for 4+ years. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* egl: image_dma_buf_export - use KHR 64-bit typeDave Airlie2015-05-052-2/+2
| | | | | | | | After talking to Jon Leech he suggested this should be fine. update spec to the version in the registry. Signed-off-by: Dave Airlie <[email protected]>
* egl/dri2: return the latest sync status in eglGetSyncAttribKHRMarek Olšák2015-04-301-1/+8
|
* egl/dri2: implement EGL_KHR_cl_event2 (v2)Marek Olšák2015-04-305-10/+88
| | | | v2: fix the SYNC_CONDITION query
* egl/dri2: implement EGL_KHR_wait_syncMarek Olšák2015-04-304-0/+32
|
* egl/dri2: implement EGL_KHR_fence_syncMarek Olšák2015-04-301-5/+29
|
* egl: misc fixes for EGL_MESA_image_dma_buf_exportMarc-André Lureau2015-04-292-2/+2
| | | | | | | Fix define and a function argument name introduced in commit 8f7338f284cdb1fef64c85e3293d2200d0cc6387 Signed-off-by: Dave Airlie <[email protected]>
* android: fix the building rules for Android 5.0Chih-Wei Huang2015-04-221-0/+4
| | | | | | | | | | | | | | | | | Android 5.0 allows modules to generate source into $OUT/gen, which will then be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as necessary. Modules will need to change calls to local-intermediates-dir into local-generated-sources-dir. The patch changes local-intermediates-dir into local-generated-sources-dir. If the Android version is less than 5.0, fallback to local-intermediates-dir. The patch also fixes the 64-bit building issue of Android 5.0. v2 [Emil Velikov] - Keep the LOCAL_UNSTRIPPED_PATH variable. Signed-off-by: Chih-Wei Huang <[email protected]>
* egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie2015-04-014-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* scons: Don't build egl on Windows.Jose Fonseca2015-03-252-11/+1
| | | | | | Useless, as there are no drivers for it. Reviewed-by: Brian Paul <[email protected]>
* egl: cut down static storage size for {Version,ClientAPI}StringEmil Velikov2015-03-211-2/+2
| | | | | | | | | | | Both seems to be excessively long, namely: ClientAPIString can get up-to 47 based on current code, while the name of the driver can dictate the length of the VersionString, currently it is around 11. Let's pad each to 100, rather than the current 1000. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: drop platform fbdev specific codeEmil Velikov2015-03-213-21/+0
| | | | | | | st/egl was the only one which had support for this platform. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* egl: don't fill client apis string forever.Dave Airlie2015-03-191-0/+1
| | | | | | | | | We never reset the string on eglTerminate, so it grows for ever on multiple eglInitialise. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* egl: Remove eglQueryString virtual dispatch.Matt Turner2015-03-176-109/+12
| | | | Reviewed-by: Chad Versace <[email protected]>
* egl: Create queryable strings in eglInitialize().Matt Turner2015-03-132-125/+112
| | | | | | | | | | | | | | | | | | | | | | | Creating/recreating the strings in eglQueryString() is extra work and isn't thread-safe, as exhibited by shader-db's run.c using libepoxy. Multiple threads in run.c call eglReleaseThread() around the same time. libepoxy calls eglQueryString() to determine whether eglReleaseThread() exists, and our EGL implementation passes a pointer to the version string to libepoxy while simultaneously overwriting the string, leading to a failure in libepoxy. Moreover, the EGL spec says (emphasis mine): "eglQueryString returns a pointer to a *static*, zero-terminated string" This patch moves some auxiliary functions from eglmisc.c to eglapi.c so that they may be used to create the extension, API, and version strings once during eglInitialize(). The auxiliary functions are renamed from _eglUpdate* to _eglCreate*, and some checks made unnecessary by calling the functions from eglInitialize() are removed. Reviewed-by: Chad Versace <[email protected]>
* egl: fix cast to silence compiler warningBrian Paul2015-03-131-1/+1
| | | | | | | | | | | | | | | | eglcurrent.c: In function '_eglSetTSD': eglcurrent.c:57:4: warning: passing argument 2 of 'tss_set' discards 'const' qualifier from pointer target type [enabled by default] tss_set(_egl_TSD, (const void *) t); ^ In file included from ../../../include/c11/threads.h:72:0, from eglcurrent.c:32: ../../../include/c11/threads_posix.h:357:1: note: expected 'void *' but argument is of type 'const void *' tss_set(tss_t key, void *val) ^ Reviewed-by: Emil Velikov <[email protected]>
* egl/main: convert thread management to use c11 threadsEmil Velikov2015-03-111-42/+6
| | | | | | | | | Convert the code to use the C11 threads implementation, and nuke the Windows non-pthreads code-path. The c11/threads_win32.h abstraction should be better than the current code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: use c11/threads' mutex directlyEmil Velikov2015-03-1111-111/+47
| | | | | | | Remove the inline wrappers/abstraction layer. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Revert "egl/main: use c11/threads' mutex directly"Emil Velikov2015-03-0611-47/+111
| | | | | | This reverts commit 6cee785c69a5c8d2d32b6807f9c502117f5a74b0. Not meant to go in yet. Lacking review.
* Revert "egl/main: convert thread management to use c11 threads"Emil Velikov2015-03-061-6/+42
| | | | | | This reverts commit 33eff853363d7eba5e61b00431b95f7aa0d7b0a5. Not meant to go in yet. Lacking review.
* egl/main: convert thread management to use c11 threadsEmil Velikov2015-03-061-42/+6
| | | | | | | | Convert the code to use the C11 threads implementation, and nuke the Windows non-pthreads code-path. The c11/threads_win32.h abstraction should be better than the current code. Signed-off-by: Emil Velikov <[email protected]>
* egl/main: use c11/threads' mutex directlyEmil Velikov2015-03-0611-111/+47
| | | | | | Remove the inline wrappers/abstraction layer. Signed-off-by: Emil Velikov <[email protected]>
* egl/main: remove no-longer needed definition of stdint typesEmil Velikov2015-03-051-32/+0
| | | | | | | | | All the users directly include the header, plus we have a in-tree replacements for non C99 compilers which we already use. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: drop the declaration of PUBLIC keyword.Emil Velikov2015-03-051-14/+0
| | | | | | | | | | Should no longer be used. As many places indirectly include eglcompiler.h keep this change separate, so that it can be easily reverted, if needed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: no longer export internal functionEmil Velikov2015-03-0513-36/+36
| | | | | | | | | | | | With the split of the gallium egl module we had previously it required access to some of the internal functions. As the only build (automake) that did this no longer builds it we can now appropriately hide those functions. Cc: 10.5 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: replace __FUNCTION__ with __func__Emil Velikov2015-03-052-11/+3
| | | | | | | | | | | The latter is a C99 standard, and our current wrapper c99_compat.h should handle non-compliant compilers. Drop the c99_compat.h inclusion from eglcompiler.h altogether, as it's no longer required. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/main: replace INLINE with inlineEmil Velikov2015-03-0515-68/+82
| | | | | | | | | | Drop the custom keyword in favour of the C99 one. All the places using it now directly include c99_compat.h which should handle things on platforms which lack it. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Brian Paul <[email protected]>