aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl
Commit message (Collapse)AuthorAgeFilesLines
* egl: check for buffer overflow *before* corrupting our memoryEric Engestrom2018-08-161-4/+15
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/wayland: remove sign from bitfield `formats`Eric Engestrom2018-08-162-6/+6
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: some spelling fixesEric Engestrom2018-08-161-5/+5
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* meson: fix build for egl platform_x11 without dri3 and gbmAlexander Tsoy2018-08-151-1/+1
| | | | | | | | | | | | | | | | Compiling EGL's platform_x11 without dri3 and gbm yields this compile failure: platform_x11 needs inc_loader: ../mesa-18.2.0-rc2/src/egl/drivers/dri2/platform_x11.c:48:10: fatal error: loader.h: No such file or directory #include "loader.h" ^~~~~~~~~~ Fixes: 108d257a1685 ("meson: build libEGL") Bugzilla: https://bugs.gentoo.org/663534 Reviewed-by: Matt Turner <[email protected]>
* egl/android: fix regression in drm_gralloc path (v2)Mauro Rossi2018-08-151-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a regression in mesa 18.2 and mesa-dev branches for HAVE_DRM_GRALLOC code path which is causing black screen on Android and prevents boot due to SIGSEGV MAPERR crash related to unproper handling of drm_gralloc drm FD in new droid_open_device() path. Problem is due to c7bb82136b ("egl/android: Add DRM node probing and filtering") To avoid the crash the former existing working droid_open_device() is restored, renamed droid_open_device_drm_gralloc() and kept within HAVE_DRM_GRALLOC braces. Tested with mesa-dev and mesa 18.2 branch and oreo-x86 bootanimation and Androdi GUI booting is fixed with i965, nouveau, radeon. The changes are compatible with gbm_gralloc, I've tested build with hwc too. (v2) remove indentation from HAVE_DRM_GRALLOC pre-processor directive NOTE: Definition of enum{} for GRALLOC_MODULE_PERFORM_GET_DRM_FD is not necessary and it's actually causing a redefinition building error, because in HAVE_DRM_GRALLOC path gralloc_drm.h is already exported by libgralloc_drm which is currently still a dependency. Fixes: c7bb82136b ("egl/android: Add DRM node probing and filtering") Cc: "18.2" <[email protected]> Signed-off-by: Mauro Rossi <[email protected]>
* meson: Build with Python 3Mathieu Bridon2018-08-101-2/+2
| | | | | | | | | | | | Now that all the build scripts are compatible with both Python 2 and 3, we can flip the switch and tell Meson to use the latter. Since Meson already depends on Python 3 anyway, this means we don't need two different Python stacks to build Mesa. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* egl: Fix leak of X11 pixmaps backing pbuffers in DRI3.Eric Anholt2018-08-091-0/+5
| | | | | | | | | | This is basically copied from the DRI2 destroy path. Without this, Raspberry Pi would quickly run out of CMA during the EGL tests in the CTS due to all the pixmaps laying around. Fixes: f35198badeb9 ("egl/x11: Implement dri3 support with loader's dri3 helper") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* wayland/egl: update surface size on window resizeJuan A. Suarez Romero2018-08-081-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to EGL 1.5 spec, section 3.10.1.1 ("Native Window Resizing"): "If the native window corresponding to _surface_ has been resized prior to the swap, _surface_ must be resized to match. _surface_ will normally be resized by the EGL implementation at the time the native window is resized. If the implementation cannot do this transparently to the client, then *eglSwapBuffers* must detect the change and resize surface prior to copying its pixels to the native window." So far, resizing a native window in Wayland/EGL was interpreted in Mesa as a request to resize, which is not executed until the first draw call. And hence, surface size is not updated until executing it. Thus, querying the surface size with eglQuerySurface() after a window resize still returns the old values. This commit updates the surface size values as soon as the resize is done, even when the real resize is done in the draw call. This makes the semantics that any native window resize request take effect inmediately, and if user calls eglQuerySurface() it will return the new resized values. v2: update surface size if there isn't a back surface (Daniel) CC: Daniel Stone <[email protected]> CC: [email protected] Reviewed-by: Daniel Stone <[email protected]>
* wayland/egl: initialize window surface size to window sizeJuan A. Suarez Romero2018-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating a windows surface with eglCreateWindowSurface(), the width and height returned by eglQuerySurface(EGL_{WIDTH,HEIGHT}) is invalid until buffers are updated (like calling glClear()). But according to EGL 1.5 spec, section 3.5.6 ("Surface Attributes"): "Querying EGL_WIDTH and EGL_HEIGHT returns respectively the width and height, in pixels, of the surface. For a window or pixmap surface, these values are initially equal to the width and height of the native window or pixmap with respect to which the surface was created" This fixes dEQP-EGL.functional.color_clears.* CTS tests v2: - Do not modify attached_{width,height} (Daniel) - Do not update size on resizing window (Brendan) CC: Daniel Stone <[email protected]> CC: Brendan King <[email protected]> CC: [email protected] Tested-by: Eric Engestrom <[email protected]> Tested-by: Chad Versace <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl: automake: add egl.pc/headers TODO when using glvndEmil Velikov2018-08-081-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* egl/main: Add bits for EGL_KHR_mutable_render_bufferChad Versace2018-08-075-4/+93
| | | | | | | | A follow-up patch enables EGL_KHR_mutable_render_buffer for Android. This patch is separate from the Android patch because I think it's easier to review the platform-independent bits separately. Reviewed-by: Tapani Pälli <[email protected]>
* egl/dri2: In dri2_make_current, return early on failureChad Versace2018-08-071-14/+15
| | | | | | | | | | This pulls an 'else' block into the function's main body, making the code easier to follow. Without this change, the upcoming EGL_KHR_mutable_render_buffer patch transforms dri2_make_current() into spaghetti. Reviewed-by: Tapani Pälli <[email protected]>
* egl: Simplify queries for EGL_RENDER_BUFFERChad Versace2018-08-075-20/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There exist *two* queryable EGL_RENDER_BUFFER states in EGL: eglQuerySurface(EGL_RENDER_BUFFER) and eglQueryContext(EGL_RENDER_BUFFER). These changes eliminate potentially very fragile code in the upcoming EGL_KHR_mutable_render_buffer implementation. * eglQuerySurface(EGL_RENDER_BUFFER) The implementation of eglQuerySurface(EGL_RENDER_BUFFER) contained abstruse logic which required comprehending the specification complexities of how the two EGL_RENDER_BUFFER states interact. The function sometimes returned _EGLContext::WindowRenderBuffer, sometimes _EGLSurface::RenderBuffer. Why? The function tried to encode the actual logic from the EGL spec. When did the function return which variable? Go study the EGL spec, hope you understand it, then hope Mesa mutated the EGL_RENDER_BUFFER state in all the correct places. Have fun. To simplify eglQuerySurface(EGL_RENDER_BUFFER), and to improve confidence in its correctness, flatten its indirect logic. For pixmap and pbuffer surfaces, simply return a hard-coded literal value, as the spec suggests. For window surfaces, simply return _EGLSurface::RequestedRenderBuffer. Nothing difficult here. * eglQueryContext(EGL_RENDER_BUFFER) The implementation of this suffered from the same issues as eglQuerySurface, and the solution is the same. confidence in its correctness, flatten its indirect logic. For pixmap and pbuffer surfaces, simply return a hard-coded literal value, as the spec suggests. For window surfaces, simply return _EGLSurface::ActiveRenderBuffer. Reviewed-by: Tapani Pälli <[email protected]>
* egl: set EGL_BAD_NATIVE_PIXMAP in the copy_buffers fallbackEmil Velikov2018-08-071-1/+2
| | | | | | | | | | As the spec says: EGL_BAD_NATIVE_PIXMAP is generated if the implementation does not support native pixmaps. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/x11: use the no-op dri2_fallback_copy_buffers for swrastEmil Velikov2018-08-071-1/+2
| | | | | | | | | | | Currently dri2_copy_buffers is used for swrast, which depends on the DRI2_FLUSH extension. Since that's not a thing on software based drivers we crash out. Do the slightly more graceful, thing of returning EGL_FALSE. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: remove unneeded _eglGetNativePlatform checkEmil Velikov2018-08-071-2/+0
| | | | | | | | | | | | | | | | | | There's little point in calling _eglGetNativePlatform() in eglCopyBuffers. The platform returned should be identical to the one already stored in our _EGLDisplay. In the following corner case, the check is incorrect. The function _eglGetNativePlatform effectively invokes the old-style eglGetDisplay platform selection. Thus if the EGL_PLATFORM platform does not match with the EGL_EXT_platform_* used to create the display we'll error out. Addresses the egl-copy-buffers piglit test. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* autoconf: stop exporting internal wayland detailsEmil Velikov2018-08-072-2/+2
| | | | | | | | | | | | | | | | | With version v1.15 the "code" option was deprecated in favour of "private-code" or "public-code". Before the interface symbol generated was exported (which is a bad idea since it's internal implementation detail) and others may misuse it. That was the case with libva approx. 1 year ago. Since then libva was fixed, so we can finally hide it by using "private-code" Inspired by similar xserver patch by Adam Jackson. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: stop exporting internal wayland detailsEmil Velikov2018-08-071-2/+2
| | | | | | | | | | | | | | | | | With version v1.15 the "code" option was deprecated in favour of "private-code" or "public-code". Before the interface symbol generated was exported (which is a bad idea since it's internal implementation detail) and others may misuse it. That was the case with libva approx. 1 year ago. Since then libva was fixed, so we can finally hide it by using "private-code" Inspired by similar xserver patch by Adam Jackson. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/main: fix indentationEric Engestrom2018-08-022-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Frank Binns <[email protected]>
* egl/x11: Handle both depth 30 formats for eglCreateImage(). (v4)Mario Kleiner2018-08-014-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to distinguish if the backing storage of a pixmap is XRGB2101010 or XBGR2101010, as different gpu hw supports different formats. NVidia hw prefers XBGR, whereas AMD and Intel are happy with XRGB. Use the red channel mask of the first depth 30 visual of the x-screen to distinguish which hw format to choose. This fixes desktop composition of color depth 30 windows when the X11 compositor uses EGL. v2: Switch from using the visual of the root window to simply using the first depth 30 visual for the x-screen, as testing shows that each driver only exports either xrgb ordering or xbgr ordering for the channel masks of its depth 30 visuals, so this should be unambiguous and avoid trouble if X ever supports depth 30 pixmaps on screens with a non-depth 30 root window visual. This per Michels suggestion. v3: No change to v2, but spent some time testing this more on AMD hw, with my software hacked up to intentionally choose pixel formats/visual with the non-preferred xBGR2101010 ordering on the ati-ddx, also with a standard non-OpenGL X-Window with depth 30 visual, to make sure that things show up properly with the right colors on the screen when going through EGL+OpenGL based compositing on KDE-5. Iow. to confirm that my explanation to the v2 patch on the mailing list of why it should work and the actual practice agree (or possibly that i am good at fooling myself during testing ;). v4: Drop the local `red_mask` and just `return visual->red_mask`/ `return 0`, as suggested by Eric Engestrom. Rebased onto current master, to take the cleanup via the new function dri2_format_for_depth() into account. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl/wayland: Add 10bpc BGR configsDaniel Stone2018-08-011-0/+12
| | | | | | | | | | Add support for XBGR2101010 and ABGR2101010. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Mario Kleiner <[email protected]> Tested-by: Mario Kleiner <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/surfaceless: Allow DRMless fallback.David Riley2018-07-301-0/+19
| | | | | | | | | | Allow platform_surfaceless to use swrast even if DRM is not available. To be used to allow a fuzzer for virgl to be run on a jailed VM without hardware GL or DRM support. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: David Riley <[email protected]>
* egl/surfaceless: Define DRI_SWRastLoader extension when using swrast.David Riley2018-07-301-4/+21
| | | | | | | Signed-off-by: David Riley <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> [chadv: Dropped spurious hunk] Reviewed-by: Chad Versace <[email protected]>
* egl: Fix missing clamping in eglSetDamageRegionKHRHarish Krupo2018-07-241-14/+11
| | | | | | | | | | | | Clamp the x and y co-ordinates of the rectangles. v2: Clamp width/height after converting to co-ordinates (Ilia Merkin) Signed-off-by: Harish Krupo <[email protected]> Reviewed-by: Qiang Yu <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: Refuse EGL_MESA_image_dma_buf_export if we don't have a DRM fourcc.Eric Anholt2018-07-201-0/+27
| | | | | | | | The EGL CTS expects that you can make images from all sorts of things, including things like z16 and s8, which we don't have DRM fourccs for. Just return an error when trying to export one of those. Reviewed-by: Marek Olšák <[email protected]>
* egl: Use the canonical drm-uapi fourcc header to avoid local defines.Eric Anholt2018-07-186-37/+4
| | | | | | | We should only use a #define locally once it's been upstreamed, and at that point you should just update our drm_fourcc.h. Reviewed-by: Jason Ekstrand <[email protected]>
* egl: fix build race in automakeRoss Burton2018-06-291-0/+1
| | | | | | | | | | | | | | | | | There is a parallel make build issue in src/egl/drivers/dri2/ for wayland builds. Can be reproduced with: $ rm src/egl/drivers/dri2/*.h src/egl/drivers/dri2/platform_wayland.lo $ make -C src/egl/ drivers/dri2/platform_wayland.lo ../../../mesa-18.1.2/src/egl/drivers/dri2/platform_wayland.c:50:10: fatal error: linux-dmabuf-unstable-v1-client-protocol.h: No such file or directory This patch adds the missing dependency. Fixes: 02cc359372773800de817 "egl/wayland: Use linux-dmabuf interface for buffers" Reviewed-by: Eric Engestrom <[email protected]> [Eric: fixed up the commit title] Signed-off-by: Eric Engestrom <[email protected]>
* egl/android: Add DRM node probing and filteringRobert Foss2018-06-251-53/+170
| | | | | | | | | | | | | This patch both adds support for probing & filtering DRM nodes and switches away from using the GRALLOC_MODULE_PERFORM_GET_DRM_FD gralloc call. Currently the filtering is based just on the driver name, and the desired name is supplied using the "drm.gpu.vendor_name" Android property. Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* egl/android: #ifdef out flink name supportRob Herring2018-06-253-15/+49
| | | | | | | | | | | | | | | | | | Maintaining both flink names and prime fd support which are provided by 2 different gralloc implementations is problematic because we have a dependency on a specific gralloc implementation header. This mostly disables the dependency on the gralloc implementation and headers. The dependency on GRALLOC_MODULE_PERFORM_GET_DRM_FD remains for now, but the definition is added locally to remove the header dependency. drm_gralloc support can be enabled by setting BOARD_USES_DRM_GRALLOC=true in BoardConfig.mk. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Tomasz Figa <[email protected]>
* meson: Remove various completed todosDylan Baker2018-06-131-2/+0
| | | | | | | | v3: - Remove "won't do" todos, so only completed todo's are now removed. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> (v2)
* egl/glvnd: Fix a segfault in eglGetProcAddress.Kyle Brenneman2018-06-111-17/+13
| | | | | | | | | | | | If FindProcIndex in egldispatchstubs.c is called with a name that's less than the first entry in the array, it would end up trying to store an index of -1 in an unsigned integer, wrap around to 2^32, and then crash when it tries to look that up. Change FindProcIndex so that it uses bsearch(3) instead of implementing its own binary search, like the GLX equivalent FindGLXFunction does. Reviewed-by: Eric Engestrom <[email protected]>
* autotools/meson: compile against wayland-egl-*backend*Eric Engestrom2018-06-081-1/+1
| | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106861 Fixes: 1db4ec05462914096b1f "egl: rewire the build systems to use libwayland-egl" Suggested-by: Emil Velikov <[email protected]> Tested-by: Andreas Hartmetz <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* egl: remove wayland-egl now that we're using libwayland-eglEric Engestrom2018-06-067-516/+0
| | | | | | | Cc: Emil Velikov <[email protected]> Cc: Daniel Stone <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* egl: rewire the build systems to use libwayland-eglEric Engestrom2018-06-063-13/+7
| | | | | | | Cc: Emil Velikov <[email protected]> Cc: Daniel Stone <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Eric Engestrom <[email protected]>
* egl/x11: fix build with DRI3 disabledEric Engestrom2018-05-291-0/+3
| | | | | | | Fixes: 473af0b541b2583f4c72 "egl/x11: deduplicate depth-to-format logic" Signed-off-by: Eric Engestrom <[email protected]> Tested-by: Vinson Lee <[email protected]> Reviewed-by: Yogesh Marathe <[email protected]>
* egl/x11: deduplicate depth-to-format logicEric Engestrom2018-05-243-33/+26
| | | | | | Suggested-by: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* android: change include "cutils/log.h" to "log/log.h" on Android API >=26jenny.q.cao2018-05-141-0/+4
| | | | | | | | | There is a compile warning from Android 8 (API version 26) from "include cutils/log.h" warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h"-W#warnings, Change to include "log/log.h" on Android 8 or later major version to avoid this warning Signed-off-by: jenny.q.cao <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* meson: Fix build for egl platform_x11 with dri3Ville Syrjälä2018-05-111-0/+1
| | | | | | | | | | | | | | | platform_x11 with dri3 needs inc_loader. In file included from ../src/egl/drivers/dri2/platform_x11_dri3.c:35:0: ../src/egl/drivers/dri2/egl_dri2.h:41:32: fatal error: loader_dri3_helper.h: No such file or directory In file included from ../src/egl/drivers/dri2/platform_x11.c:46:0: ../src/egl/drivers/dri2/egl_dri2.h:41:32: fatal error: loader_dri3_helper.h: No such file or directory In file included from ../src/egl/drivers/dri2/egl_dri2.c:61:0: ../src/egl/drivers/dri2/egl_dri2.h:41:32: fatal error: loader_dri3_helper.h: No such file or directory Cc: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]>
* egl: add EGL_BAD_MATCH error case for surfaceless and androidTapani Pälli2018-05-042-2/+6
| | | | | | | | Just like is done for other backends when suitable config is not found (added in fd4eba4929). Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Juan A. Suarez <[email protected]>
* egl/x11: Send invalidate to driver on copy_region path in swap_bufferDeepak Rawat2018-05-031-10/+13
| | | | | | | | | | | | | | | | Similar to swap_available path send invalidate to the driver because egl/X11 is not watching for for server's invalidate events. The dri2_copy_region path is trigerred when server supports DRI2 version minor 1. Tested with piglit egl tests for regression. V2: Move invalidate from dri2_copy_region to swap_buffer common. Cc: <[email protected]> Signed-off-by: Deepak Rawat <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* egl: check if colorspace/surface type is supportedJuan A. Suarez Romero2018-05-034-0/+21
| | | | | | | | | | | | | | | | | | According to EGL 1.4 spec, section 3.5.1 ("Creating On-Screen Rendering Surfaces"), if config does not support the colorspace or alpha format attributes specified in attrib_list (as defined for eglCreateWindowSurface), an EGL_BAD_MATCH error is generated. This fixes dEQP-EGL.functional.wide_color.*_888_colorspace_srgb (still not merged, https://android-review.googlesource.com/c/platform/external/deqp/+/667322), which is crashing when trying to create a windows surface with RGB888 configuration and sRGB colorspace. v2: Handle the fix in other backends (Tapani) Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* x11: Only report supported DRI3/Present versionsDaniel Stone2018-03-301-4/+16
| | | | | | | | | | | | | The version passed to QueryVersion requests is the version that the client supports. We were just passing in whatever version of XCB was present on the system, which may not be a version that Mesa actually explicitly supports, e.g. it might bring unwanted semantics. Set specific protocol versions which we support, and only pass those. Signed-off-by: Daniel Stone <[email protected]> Fixes: 7aeef2d4efd ("dri3: allow building against older xcb (v3)") Reviewed-by: Emil Velikov <[email protected]>
* wayland-drm: do not distribute generated sourcesJuan A. Suarez Romero2018-03-232-8/+26
| | | | | | | | | Instead we will re-generate them again on building. v2: get rid of BUILT_SOURCES (Daniel, Emil) v3: keep BUILT_SOURCES for egl/Makefile.am (Emil) Reviewed-by: Emil Velikov <[email protected]>
* egl/wayland: Make swrast display_sync the correct queueDerek Foreman2018-03-221-1/+1
| | | | | | | | | | | | | | commit 03dd9a88b0be17ff0ce91e92f6902a9a85ba584a introduced per surface queues, but the display_sync for swrast_commit_backbuffer remained on the old queue. This is likely to break when dispatching the correct queue at the top of function (which can't dispatch the sync callback we're waiting for). The easiest known reproduction case is running weston-subsurfaces under weston --use-pixman Signed-off-by: Derek Foreman <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* dri3: Don't fail on version mismatchDaniel Stone2018-03-202-5/+7
| | | | | | | | | | | | | The previous commit to make DRI3 modifier support optional, breaks with an updated server and old client. Make sure we never set multibuffers_available unless we also support it locally. Make sure we don't call stubs of new-DRI3 functions (or empty branches) which will never succeed. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Fixes: 7aeef2d4efdc ("dri3: allow building against older xcb (v3)")
* dri3: allow building against older xcb (v3)Dave Airlie2018-03-161-0/+4
| | | | | | | | | | | | | | | | | | | | | I'm not sure everyone wants to be updating their dri3 in a forced march setting, this allows a nicer approach, esp when you want to build on distro that aren't brand new. I'm sure there are plenty of ways this patch could be cleaner, and I've also not built it against an updated dri3. For meson I've just left it alone, since if you are using meson you probably don't mind xcb updates, and if you are using meson you can fix this better than me. v3: just don't put a version in for dri3/present without modifiers, should allow building with 1.11 as well (feel free to supply meson followups) Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl/android: Implement the eglSwapinterval for Android.Wu, Zhongmin2018-03-161-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the eglSwapinterval for Android platform to enable the async mode for some GFX benchmarks such as Daimler C217, CityBench. Results of the dEQP-EGL.*swap_interval tests 'dEQP-EGL.functional.query_config.get_config_attrib.max_swap_interval'.. 'dEQP-EGL.functional.query_config.get_config_attrib.min_swap_interval'.. 'dEQP-EGL.functional.choose_config.simple.selection_only.max_swap_interval'.. 'dEQP-EGL.functional.choose_config.simple.selection_only.min_swap_interval'.. 'dEQP-EGL.functional.choose_config.simple.selection_and_sort.max_swap_interval'.. 'dEQP-EGL.functional.choose_config.simple.selection_and_sort.min_swap_interval'.. 'dEQP-EGL.functional.negative_api.swap_interval'.. Test run totals: Passed: 7/7 (100.0%) Failed: 0/7 (0.0%) Not supported: 0/7 (0.0%) Warnings: 0/7 (0.0%) Signed-off-by: Zhongmin Wu <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Tomasz Figa <[email protected]> [Emil Velikov: polish inline comment, add dEQP stats, s/dpy/disp/] Signed-off-by: Emil Velikov <[email protected]>
* egl/dri2: move wayland header inclusion where applicableEmil Velikov2018-03-163-3/+12
| | | | | | | | | | | | | | | | | | | | Instead of indirectly pulling the wayland headers everywhere, use forward declarations and #include only as needed. Should effectively fix build errors like the following: make[5]: Entering directory '/.../src/gallium/state_trackers/omx/tizonia' CC h264dprc.lo In file included from h264dprc.c:45:0: .../src/egl/drivers/dri2/egl_dri2.h:47:10: fatal error: wayland/wayland-egl/wayland-egl-backend.h: No such file or directory #include "wayland/wayland-egl/wayland-egl-backend.h" Cc: Dylan Baker <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Eric Engestrom <[email protected]> Tested-by: Andy Furniss <[email protected]>
* wayland-drm: autotools: do not redirect stdin/stdout for wayland-scannerEmil Velikov2018-03-121-3/+3
| | | | | | | | The tool accepts the input and output files as arguments. There's no need for the redirection. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* egl: autotools: do not redirect stdin/stdout for wayland-scannerEmil Velikov2018-03-121-2/+2
| | | | | | | | The tool accepts the input and output files as arguments. There's no need for the redirection. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>