summaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* egl/android: remove config post-processingEmil Velikov2016-08-301-9/+0
| | | | | | | | | No longer needed as of last commit, since we no longer add OPENGL to the ClientAPIs thus, RenderType and Conformant don't have the desktop GL bit set. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* egl/dri2: check if the EGL API is valid before adding it to ClientAPIsEmil Velikov2016-08-301-4/+4
| | | | | | | | | | | | | In the rather unlikely case that the API is considered invalid, don't add it to the (supported) ClientAPIs bitmask. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> --- Strictly speaking we only need this in the Android case for OpenGL. Adding it everywhere doesn't hurt us since the compiler will const propagate and optimise/remove these.
* egl/android: annotate static const data as suchEmil Velikov2016-08-301-1/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* egl: treat EGL_OPENGL_API as invalid on AndroidEmil Velikov2016-08-301-1/+7
| | | | | | | | At the moment one can use OpenGL in eglBindAPI() only to clear the EGL_OPENGL_BIT from RenderableType and Conformant for _each_ config. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* egl: turn a couple asserts static (compile-time)Eric Engestrom2016-08-241-3/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/wayland-egl: Fix for segfault in dri2_wl_destroy_surface.Stencel, Joanna2016-08-242-0/+4
| | | | | | | | | | | Segfault occurs when destroying EGL surface attached to already destroyed Wayland window. The fix is to set to NULL the pointer of surface's native window when wl_egl_destroy_window() is called. Cc: [email protected] Signed-off-by: Stencel, Joanna <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: dri2_initialize: Do not reference-count TestOnly displayNicolas Boichat2016-08-231-20/+9
| | | | | | | | | | | | | | | In the case where dri2_initialize is called with a TestOnly display, the display is not actually initialized, so dri2_egl_display always fails, and we cannot do any reference counting. Fixes piglit spec@egl_khr_create_context@verify gl flavor (reproducible with LIBGL_ALWAYS_SOFTWARE=1). Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Reported-by: Michel Dänzer <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: remove error checks on return values from mtx_lock and cnd_waitDongwon Kim2016-08-231-35/+12
| | | | | | | | | | | | | This removes unnecessary error checks on return result of mtx_lock and cnd_wait calls as in all other places in MESA source since there is no chance that any of these functions return any of error codes in current implementation. This patch also removes a redundent _eglError call that follows EGL_FALSE check in the bottom of dri2_client_wait_sync. Signed-off-by: Dongwon Kim <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: dri2_make_current: Release previous context's displayNicolas Boichat2016-08-161-4/+5
| | | | | | | | | | | | | | | | | | | eglMakeCurrent can also be used to change the active display. In that case, we need to decrement ref_count of the previous display (possibly destroying it), and increment it on the next display. Also, old_dsurf/old_rsurf cannot be non-NULL if old_ctx is NULL, so we only need to test if old_ctx is non-NULL. v2: Save the old display before destroying the context. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97214 Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Reported-by: Alexandr Zelinsky <[email protected]> Tested-by: Alexandr Zelinsky <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]>
* egl/android: Set dpy->DriverData to NULL on errorNicolas Boichat2016-08-151-0/+1
| | | | | | | | | | Avoid use-after-free on error. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Tested-by: Martin Peres <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/drm: Set disp->DriverData to NULL on errorNicolas Boichat2016-08-151-0/+1
| | | | | | | | | | Avoid use-after-free on error. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Tested-by: Martin Peres <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/surfaceless: Set disp->DriverData to NULL on errorNicolas Boichat2016-08-151-0/+1
| | | | | | | | | | Avoid use-after-free on error. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Tested-by: Martin Peres <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/wayland: Set disp->DriverData to NULL on errorNicolas Boichat2016-08-151-0/+2
| | | | | | | | | | | Avoid use-after-free, fix spec@egl_khr_fence_sync@conformance. Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Reported-by: Michel Dänzer <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Tested-by: Martin Peres <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/x11: avoid using freed memory if dri2 init failsJan Ziak2016-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found with valgrind: ==4841== Invalid read of size 4 ==4841== at 0x56BDC80: dri2_initialize (egl_dri2.c:783) ==4841== by 0x56BAFE5: _eglMatchAndInitialize (egldriver.c:261) ==4841== by 0x56BB15E: _eglMatchDriver (egldriver.c:295) ==4841== by 0x56B58C9: eglInitialize (eglapi.c:480) ==4841== by 0x4F537DC: _glfwInitEGL (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x4F4BEFB: _glfwPlatformInit (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x4F46F40: glfwInit (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x402E59: main ==4841== Address 0x6a05824 is 148 bytes inside a block of size 480 free'd ==4841== at 0x4C2B680: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==4841== by 0x56C2AAE: dri2_initialize_x11_swrast (platform_x11.c:1233) ==4841== by 0x56C2AAE: dri2_initialize_x11 (platform_x11.c:1493) ==4841== by 0x56BDCEB: dri2_initialize (egl_dri2.c:805) ==4841== by 0x56BAFAF: _eglMatchAndInitialize (egldriver.c:261) ==4841== by 0x56BB0C9: _eglMatchDriver (egldriver.c:292) ==4841== by 0x56B58C9: eglInitialize (eglapi.c:480) ==4841== by 0x4F537DC: _glfwInitEGL (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x4F4BEFB: _glfwPlatformInit (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x4F46F40: glfwInit (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x402E59: main ==4841== Block was alloc'd at ==4841== at 0x4C2A868: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==4841== by 0x56C2A47: dri2_initialize_x11_swrast (platform_x11.c:1171) ==4841== by 0x56C2A47: dri2_initialize_x11 (platform_x11.c:1493) ==4841== by 0x56BDCEB: dri2_initialize (egl_dri2.c:805) ==4841== by 0x56BAFAF: _eglMatchAndInitialize (egldriver.c:261) ==4841== by 0x56BB0C9: _eglMatchDriver (egldriver.c:292) ==4841== by 0x56B58C9: eglInitialize (eglapi.c:480) ==4841== by 0x4F537DC: _glfwInitEGL (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x4F4BEFB: _glfwPlatformInit (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x4F46F40: glfwInit (in /usr/lib64/libglfw.so.3.2) ==4841== by 0x402E59: main Signed-off-by: Jan Ziak (http://atom-symbol.net) <[email protected]> Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display) Cc: "12.0" <[email protected]> Reviewed-by: Nicolas Boichat <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: android: query native window default width and height (v2)Haixia Shi2016-08-093-0/+42
| | | | | | | | | | | | | | | | On android platform, the width and height of a native window surface may be updated after initialization. It is therefore necessary to query android framework for the current width and height. v2: remove Android specific #ifdef's and just implement the fallback directly if the platform query_surface() callback is not provided. TEST=dEQP-EGL.functional.resize.surface_size#* on cyan-cheets Reviewed-by: Kristian H. Kristensen <[email protected]> (v1) Reviewed-by: Tomasz Figa <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: I673f7d2f1d90c3bf572b30f63da537f2cae1496e
* egl/android: Add support for YV12 pixel format (v2)Tomasz Figa2016-08-081-6/+50
| | | | | | | | | | | | | | | This patch adds support for YV12 pixel format to the Android platform backend. Only creating EGL images is supported, it is not added to the list of available visuals. v2: Use const array defined just for YV12 instead of trying to be overly generic. Signed-off-by: Tomasz Figa <[email protected]> Signed-off-by: Kalyan Kondapally <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: I4aeb2d67a95c5cdd10b530c549b23146c8f0b983
* egl/android: Make get_fourcc() accept HAL formatsTomasz Figa2016-08-081-9/+11
| | | | | | | | | | | | | There are DRI_IMAGE_FOURCC macros, for which there are no corresponding DRI_IMAGE_FORMAT macros. To support such formats we need to make the lookup function take the native format directly. As a side effect, it simplifies all existing calls to this function, because they all called get_format() first to convert from native to DRI_IMAGE_FORMAT. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: I4674000fb5ccfd02e38b8fa89bc567ac1d4fc16b
* egl/android: Refactor image creation to separate flink and prime paths (v2)Tomasz Figa2016-08-081-42/+57
| | | | | | | | | | | | | | | | This patch splits current dri2_create_image_android_native_buffer() into main entry point and two additional functions, one for creating an image from flink name and one for handling prime FDs using the generic DMA-buf path. This makes the code cleaner and also prepares for disabling flink path more easily in the future. v2: Split into separate patch. Add error messages. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: Ifdfb5927399d56992fe707160423c29278f49172
* egl/android: Respect buffer mask in droid_image_get_buffers (v2)Tomasz Figa2016-08-081-5/+15
| | | | | | | | | | | | | | Drivers can request different set of buffers depending on the buffer mask they pass to the get_buffers callback. This patch makes droid_image_get_buffers() respect this mask. v2: Return error only in case of real error condition and ignore requests of unavailable buffers. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: I6c3c4eca90f4c618579f6725dec323c004cb44ba
* egl/android: Remove unused variables in droid_get_buffers_with_format()Tomasz Figa2016-08-081-3/+0
| | | | | | | | | | Fix compilation warnings due to unused variables left after some earlier code changes. Signed-off-by: Tomasz Figa <[email protected]> Tested-by: Rob Herring <[email protected]> Reviewed-by: Chad Versace <[email protected]> Change-Id: Iec09eb2a62887f3a38dff156756ed8385f3f3447
* egl/dri2: Add reference count for dri2_egl_displayNicolas Boichat2016-07-282-20/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | android.opengl.cts.WrapperTest#testGetIntegerv1 CTS test calls eglTerminate, followed by eglReleaseThread. A similar case is observed in this bug: https://bugs.freedesktop.org/show_bug.cgi?id=69622, where the test calls eglTerminate, then eglMakeCurrent(dpy, NULL, NULL, NULL). With the current code, dri2_dpy structure is freed on eglTerminate call, so the display is not initialized when eglReleaseThread calls MakeCurrent with NULL parameters, to unbind the context, which causes a a segfault in drv->API.MakeCurrent (dri2_make_current), either in glFlush or in a latter call. eglTerminate specifies that "If contexts or surfaces associated with display is current to any thread, they are not released until they are no longer current as a result of eglMakeCurrent." However, to properly free the current context/surface (i.e., call glFlush, unbindContext, driDestroyContext), we still need the display vtbl (and possibly an active dri dpy connection). Therefore, we add some reference counter to dri2_egl_display, to make sure the structure is kept allocated as long as it is required. One drawback of this is that eglInitialize may not completely reinitialize the display (if eglTerminate was called with a current context), however, this seems to meet the EGL spec quite well, and does not permanently leak any context/display even for incorrectly written apps. Cc: "12.0" <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Stop leaking DRI imagesTomasz Figa2016-07-201-0/+11
| | | | | | | | | | | | | | | | Current implementation of the DRI image loader does not free the images created in get_back_bo() and so leaks memory. Moreover, it creates a new image every time the DRI driver queries for buffers, even if the backing native buffer has not changed. leaking memory again. This patch adds missing call to destroyImage() in droid_enqueue_buffer() and a check if image is already created to get_back_bo() to fix the above. Cc: "11.2 12.0" <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Add some useful error messagesTomasz Figa2016-07-201-3/+10
| | | | | | | | | | It is much easier to debug issues when the application gives some meaningful error messages. This patch adds few to the EGL Android platform backend. Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Check return value of dri2_get_dri_config()Tomasz Figa2016-07-201-0/+2
| | | | | | | | | It might return NULL if specific config variant is unsupported. Cc: "11.2 12.0" <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/dri2: dri2_make_current: Set EGL error if bindContext failsNicolas Boichat2016-07-201-2/+8
| | | | | | | | | | | | | Without this, if a configuration is, say, available only on GLES2/3, but not on GLES1, and is rejected by the dri module's bindContext call, eglMakeCurrent fails with error "EGL_SUCCESS". In this patch, we set error to EGL_BAD_MATCH, which is what CTS/dEQP dEQP-EGL.functional.surfaceless_context expect. Cc: "11.2 12.0" <[email protected]> Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Remove unused variablesTomasz Figa2016-07-201-2/+0
| | | | | | | | | There are some unused variables left after previous clean-ups triggering compiler warnings. Let's remove them. Cc: "12.0" <[email protected]> Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Use correct names for dlopen()ed files on CygwinYaakov Selkowitz2016-07-151-0/+2
| | | | | Signed-off-by: Yaakov Selkowitz <[email protected]> Reviewed-by: Jon Turney <[email protected]>
* egl: restrict swap_available dri2_egl_display field to X11Frank Binns2016-07-072-3/+1
| | | | | | | This field is only ever set and read by the X11 platform. Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl: Fix the bad surface attributes combination checking for pbuffers. (v3)Guillaume Charifi2016-07-071-21/+15
| | | | | | | | | | | | | | | | | Fixes a regression induced by commit a0674ce5c41903ccd161e89abb149621bfbc40d2: When EGL_TEXTURE_FORMAT and EGL_TEXTURE_TARGET were both specified (and both != EGL_NO_TEXTURE), an error was instantly triggered, before the other one had even a chance to be checked, which is obviously not the intended behaviour. v2: Full commit hash, remove useless variables. v3: [chadv] Add Fixes footers. Fixes: piglit "spec/egl 1.4/eglcreatepbuffersurface and then glclear" Fixes: piglit "spec/egl 1.4/largest possible eglcreatepbuffersurface and then glclear" Signed-off-by: Guillaume Charifi <[email protected]> Reviewed-by: Frank Binns <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* egl/display: remove unnecessary code and make it easier to readEric Engestrom2016-07-071-15/+14
| | | | | | | | | Remove the two first level `if` as they will always be true, and flatten the two remaining `if`. No functional change. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* Added pbuffer hooks for surfaceless platformGurchetan Singh2016-06-142-5/+215
| | | | | | | | | | This change enables the creation of pbuffer surfaces on the surfaceless platform. v3: Going back to single-buffered pbuffer plus additional code review changes Reviewed-by: Chad Versace <[email protected]>
* Android: move libdrm settings to top-level Android.common.mkRob Herring2016-06-131-6/+0
| | | | | | | | | | | | | | Fix warnings like these due to HAVE_LIBDRM being inconsistently defined: external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition] typedef struct drm_clip_rect drm_clip_rect_t; HAVE_LIBDRM needs to be set project wide to fix this. This change also harmlessly links libdrm with everything, but simplifies the makefiles a bit. Signed-off-by: Rob Herring <[email protected]> Acked-by: Emil Velikov <[email protected]>
* platform_android: prevent deadlock in droid_swap_buffersHaixia Shi2016-06-071-5/+12
| | | | | | | | | | | | | To avoid blocking other EGL calls, release the display mutex before we enqueue buffer to android frameworks and re-acquire the mutex upon return. v2: moved lock/unlock inside droid_window_enqueue_buffer(). TEST=verify pinch zoom in Photos app no longer causes hangs Signed-off-by: Haixia Shi <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: android: don't add the image loader extension for !render_nodeEmil Velikov2016-06-071-8/+7
| | | | | | | | | | | | | | | | | | | | With earlier commit we introduced support for render_node devices, which was couples with the use of the image loader extension. As the work was inspired by egl/wayland we (erroneously) added the extension for the !render_node path as well. That works for wayland, as the implementations of the DRI2 and IMAGE loader extensions converge behind the scenes. As that is not yet the case for Android we shouldn't expose the extension. Fixes: 34ddef39cef ("egl: android: add dma-buf fd support") Cc: <[email protected]> Reported-by: Mauro Rossi <[email protected]> Tested-by: Mauro Rossi <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* Revert "egl: Check if API is supported when using eglBindAPI."Marek Olšák2016-06-034-72/+10
| | | | | | This reverts commit e8b38ca202fbe8c281aeb81a4b64256983f185e0. It broke Glamor for Gallium at least.
* egl: Account for default values of texture target and formatPlamena Manolova2016-06-021-0/+6
| | | | | | | | | | When validating attributes during surface creation we should account for the default values of texture target and format (EGL_NO_TEXTURE) since the user is not obligated to explicitly set both via the attribute list passed to eglCreatePbufferSurface. Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* egl: Check if API is supported when using eglBindAPI.Plamena Manolova2016-06-024-10/+72
| | | | | | | | | According to the EGL specifications before binding an API we must check whether it's supported first. If not eglBindAPI should return EGL_FALSE and generate a EGL_BAD_PARAMETER error. Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa_glinterop: remove mesa_glinterop typedefsEmil Velikov2016-05-303-12/+12
| | | | | | | | | | | | | | | | 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 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl/dri3: don't crash on no context.Dave Airlie2016-05-301-2/+4
| | | | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94925 Pointed out by Karol Herbst on irc. Signed-off-by: Dave Airlie <[email protected]> Cc: "11.1 11.2" <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* egl: Additional attribute validation for eglCreatePbufferSurfacePlamena Manolova2016-05-261-0/+13
| | | | | | | | | | | | | eglCreatePbufferSurface should generate an EGL_BAD_MATCH error if: 1: The EGL_TEXTURE_FORMAT attribute is EGL_NO_TEXTURE and EGL_TEXTURE_TARGET is something other than EGL_NO_TEXTURE 2: EGL_TEXTURE_FORMAT is something other than EGL_NO_TEXTURE and EGL_TEXTURE_TARGET is EGL_NO_TEXTURE. This fixes the dEQP-EGL.functional.negative_api.create_pbuffer_surface test. Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* mesa_glinterop: make GL interop version field bidirectionalEmil Velikov2016-05-243-3/+3
| | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* mesa_glinterop: remove unneeded GLAPI/GLAPIENTRY/APIENTRYP symbolsEmil Velikov2016-05-241-2/+2
| | | | | | | | | | | | | | | | These come from windows.h, gl.h, glcorearb.h and/or glext.h. The interop interface is aimed at non-Windows platforms while the macros are used/derived due to Windows specifics. Thus we can safely remove them. Strictly speaking there should be GLXAPIENTRY/EGLAPIENTRY and alike macros, although a) there is no GLX ones and b) this brings us even further from decoupling the file from the GLX/EGL header dependency. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Tom Stellard <[email protected]>
* egl: Add OpenGL_ES to API string regardless of GLES versionPlamena Manolova2016-05-231-7/+4
| | | | | | | | | | | | | | | | | According to the EGL specifications eglQueryString(EGL_CLIENT_APIS) should return a string containing a combination of "OpenGL", "OpenGL_ES" and "OpenVG", any other values would be considered invalid. Due to this when the API string is constructed, the version of GLES should be disregarded and "OpenGL_ES" should be attached once instead of "OpenGL_ES2" and "OpenGL_ES3". Fixes: dEQP-EGL.functional.negative_api* and dEQP-EGL.functional.query_context.simple.query_api Signed-off-by: Plamena Manolova <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
* configure.ac: Add support for Android buildsNicolas Boichat2016-05-231-0/+5
| | | | | | | | | | | | | Add support for EGL android platform. Also, detect when --host finishes with -android. In that case, we do not set _GNU_SOURCE, and define autoconf symbol HAVE_ANDROID, so that Android-specific workarounds can be applied. Signed-off-by: Nicolas Boichat <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov: Rebase on top of HAVE_EGL_PLATFORM_NULL removal] Signed-off-by: Emil Velikov <[email protected]>
* egl: add missing link against $(CLOCK_LIB)Emil Velikov2016-05-231-1/+1
| | | | | | | | | | | | Some platforms require separate library in order to resolve the clock_gettime() symbol. Add the link or the build will fail. Fixes: 70299474f58 ("egl: add EGL_KHR_reusable_sync to egl_dri") Cc: Dongwon Kim <[email protected]> Reported-by: Pali Rohár <[email protected]> Tested-by: Pali Rohár <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* egl: android: remove explicit glFlush callEmil Velikov2016-05-231-6/+0
| | | | | | | The DRI flush extension should already do the same thing. Signed-off-by: Emil Velikov <[email protected]> Tested-by: Rob Herring <[email protected]>
* egl: android: drop dri2_create_image_android_native_buffer argumentEmil Velikov2016-05-231-2/+2
| | | | | | | The drv is no longer used/needed as of last commit. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Herring <[email protected]>
* egl: android: directly use dri2_create_image_dma_buf()Emil Velikov2016-05-233-3/+6
| | | | | | | | Make the function non static so that we can use it directly from the android platform code. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Herring <[email protected]>
* gbm: rename gbm_dri_bo_{map,unmap} to gbm_dri_bo_{map,unmap}_dumbRob Herring2016-05-231-4/+4
| | | | | | | | | In preparation to add public map/unmap functions, rename the existing gbm_dri_bo_{map,unmap} functions to indicate that they are only for dumb buffers. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: Move setting DEFAULT_DRIVER_DIR to shared locationRob Herring2016-05-231-7/+0
| | | | | | | | | Move the defining of DEFAULT_DRIVER_DIR path to a common location so both EGL and GBM can use it. Signed-off-by: Rob Herring <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>