summaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* egl/wayland: properly destroy wayland objectsAxel Davy2015-05-112-1/+6
| | | | | | | | | | | the wl_registry and the wl_queue allocated weren't destroyed. CC: 10.5 <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* egl/dri2: Fix codestyle in a commentChad Versace2015-05-071-1/+2
| | | | Pointed out by Kenneth Graunke. Trivial fix.
* egl/dri2: Check return value of __DRI2fence::create_fence()Chad Versace2015-05-061-0/+7
| | | | | | If it returns NULL, then return early with an error. Reviewed-by: Marek Olšák <[email protected]>
* egl: image_dma_buf_export - use KHR 64-bit typeDave Airlie2015-05-053-3/+3
| | | | | | | | 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-306-12/+111
| | | | v2: fix the SYNC_CONDITION query
* egl/dri2: implement EGL_KHR_wait_syncMarek Olšák2015-04-305-0/+47
|
* egl/dri2: implement EGL_KHR_fence_syncMarek Olšák2015-04-303-5/+133
|
* egl/dri: don't expose configs with an accumulation bufferMarek Olšák2015-04-301-0/+9
|
* 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-222-1/+11
| | | | | | | | | | | | | | | | | 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]>
* android: egl: add libsync_cflags to the buildEmil Velikov2015-04-221-0/+6
| | | | | | | | | | | | | ... via local_shared_libraries. Otherwise the sync/sync.h header won't be found. Note: 10.5 and earlier will need similar change in st/egl. v2: Append the library to the local_shared_libraries list. (Chih-Wei) Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]>
* android: use LOCAL_SHARED_LIBRARIES over TARGET_OUT_HEADERSEmil Velikov2015-04-221-1/+1
| | | | | | | | | ... to manage the LIBDRM*_CFLAGS. The former is the recommended approach by the Android build system developers while the latter has been depreciated for quite some time. Cc: "10.4 10.5" <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie2015-04-015-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
* automake: add missing egl files to the tarballEmil Velikov2015-03-251-0/+2
| | | | | | | | | Namely the Haiku EGL driver backend and the SConscript for the dri2 EGL driver backend. Cc: Alexander von Gluck IV <[email protected]> Cc: [email protected] Signed-off-by: Emil Velikov <[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/drivers: include stdint.h where neededEmil Velikov2015-03-056-0/+7
| | | | | | | | | Currently these files are including it indirectly via eglcompiler.h The latter of which will be removed with follow up commits. 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]>
* egl: Take alpha bits into account when selecting GBM formatsDaniel Stone2015-03-041-5/+11
| | | | | | | | | | | | This fixes piglit when using PIGLIT_PLATFORM=gbm Tom Stellard: - Fix ARGB2101010 format Cc: "10.4 10.5" <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* scons: Use -Werror MSVC compatibility flags per-directory.Jose Fonseca2015-03-041-0/+2
| | | | | | Matching what we already do with autotools builds. Reviewed-by: Brian Paul <[email protected]>
* st/egl: Remove.Jose Fonseca2015-03-043-9/+8
| | | | | | | | | | | | | | | | | | Largely superseeded by src/egl, and WGL/GLX_EXT_create_context_es_profile extensions. Note this will break Android.mk with gallium drivers -- somebody familiar with that build infrastructure will need to update it to use gallium drivers through egl_dri2. v2: Remove the _EGL_BUILT_IN_DRIVER_GALLIUM define from src/egl/main/Android.mk; and update the src/egl/main/Sconscript to create a SharedLibrary, add versioning, create symlink - copy the bits from egl-static, per Emil Velikov. Reviewed-by: Emil Velikov <[email protected]> v3: Disallow undefined symbols in libEGL.so. Update release notes
* configure: Leverage gcc warn options to enable safe use of C99 features ↵Jose Fonseca2015-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | where possible. The main objective of this change is to enable Linux developers to use more of C99 throughout Mesa, with confidence that the portions that need to be built with MSVC -- and only those portions --, stay portable. This is achieved by using the appropriate -Werror= options only on the places they need to be used. Unfortunately we still need MSVC 2008 on a few portions of the code (namely llvmpipe and its dependencies). I hope to eventually eliminate this so that we can use C99 everywhere, but there are technical/logistic challenges (specifically, newer Windows SDKs no longer bundle MSVC, instead require a full installation of Visual Studio, and that has hindered adoption of newer MSVC versions on our build processes.) Thankfully we have more directy control over our OpenGL driver, which is why we're now able to migrate to MSVC 2013 for most of the tree. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Revert "configure: Leverage gcc warn options to enable safe use of C99 ↵Kenneth Graunke2015-02-271-1/+0
| | | | | | | | | features where possible." This reverts commit 79daa510c7a871a33797308a2ccb4b83a067ffbe. I apparently hadn't done a clean build when testing this; it broke the build for Tom, Ben, and myself. We like the idea; let's try a v2.
* configure: Leverage gcc warn options to enable safe use of C99 features ↵Jose Fonseca2015-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | where possible. The main objective of this change is to enable Linux developers to use more of C99 throughout Mesa, with confidence that the portions that need to be built with MSVC -- and only those portions --, stay portable. This is achieved by using the appropriate -Werror= options only on the places they need to be used. Unfortunately we still need MSVC 2008 on a few portions of the code (namely llvmpipe and its dependencies). I hope to eventually eliminate this so that we can use C99 everywhere, but there are technical/logistic challenges (specifically, newer Windows SDKs no longer bundle MSVC, instead require a full installation of Visual Studio, and that has hindered adoption of newer MSVC versions on our build processes.) Thankfully we have more directy control over our OpenGL driver, which is why we're now able to migrate to MSVC 2013 for most of the tree. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* egl, wayland: RGB565 format support on Back-bufferVivek Kasireddy2015-02-231-3/+38
| | | | | | | | | | | | | | | | | | | | | | In current code, color format is always hardcoded to __DRI_IMAGE_FORMAT_ARGB8888 when buffer or DRI image is allocated in function calls, get_back_bo and dri2_get_buffers, regardless of current target's color format. This problem may leads to incorrect render pitch calculation, which eventually ends up with wrong offset of pixels in the frame buffer when the image is in different color format from dri surf's, especially with different bpp. (e.g. RGB565-16bpp) Attached code patch simply adds RGB565 and XRGB8888 cases to two functions noted above to resolve the issue. v2: added a case of XRGB8888, format and bpp selection is done via switch-case (not "if-else" anymore) Signed-off-by: Vivek Kasireddy <[email protected]> Signed-off-by: Dongwon Kim <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Cc: "10.5" <[email protected]>
* egl: Soften several HAVE_DRM_PLATFORM to HAVE_LIBDRMAxel Davy2015-02-121-7/+7
| | | | | | | | | | | | | | | | | | | | | To fix build when libdrm is not found, commit a594cec7e3ef275c386054127a357110a19dd823 did put several parts of egl code under #ifdef HAVE_DRM_PLATFORM. HAVE_DRM_PLATFORM means the egl drm platform is being built. What should have been used instead is HAVE_LIBDRM. At a few locations, the HAVE_DRM_PLATFORM introduced have already been replaced by HAVE_LIBDRM, this patch replaces the remaining occurences. This patch makes for example EGL_EXT_image_dma_buf_import be advertised by egl under x11 when the drm egl platform is not built, whereas previously it required the drm egl platform to be built. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: Pass the correct X visual depth to xcb_put_image().José Fonseca2015-01-311-11/+13
| | | | | | | | | | The dri2_x11_add_configs_for_visuals() function happily matches a 32 bits EGLconfig with a 24 bits X visual. However it was passing 32bits depth to xcb_put_image(), making X server unhappy: https://github.com/apitrace/apitrace/issues/313#issuecomment-70571911 Cc: "10.4" <[email protected]>
* egl/wayland: Fix unused variable warningsChad Versace2015-01-131-2/+0
| | | | Remove ctx variables unused as of 70e8ccc459.
* egl: Inform the client API when ancillary buffers may become undefined.Eric Anholt2015-01-066-15/+43
| | | | | | | This is part of the EGL spec, and is useful for a tiled renderer to avoid the memory bandwidth cost of storing the depth/stencil buffers. Reviewed-by: Jose Fonseca <[email protected]>
* egl: Fix non-dri SCons builds re #87657Alexander von Gluck IV2014-12-251-10/+7
| | | | | * Revert change to egl main producing Shared Libraries * Check for dri before including dri code
* egl/haiku: Clean up SConscript whitespaceAlexander von Gluck IV2014-12-231-13/+12
|
* egl/dri2: Fix build of dri2 egl driver with SConsAlexander von Gluck IV2014-12-231-0/+40
| | | | | * egl/dri2 was missing a SConscript * Problem caught by Adrián Arroyo Calle
* egl: Clean up Haiku visual creationAlexander von Gluck IV2014-12-231-49/+47
| | | | | | * Only create one struct * 'final' also is a language conflict * Some style cleanup
* egl: Add Haiku code and supportAlexander von Gluck IV2014-12-237-3/+509
| | | | | | | * This is the cleaned up work of the Haiku GCI student Adrián Arroyo Calle [email protected] * Several patches were consolidated to prevent unnecessary touching of non-related code