summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
Commit message (Collapse)AuthorAgeFilesLines
* egl: rewire the build systems to use libwayland-eglEric Engestrom2018-06-061-4/+3
| | | | | | | 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]>
* 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]>
* 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]>
* egl/x11: Re-allocate buffers if format is suboptimalLouis-Francis Ratté-Boulianne2018-03-093-0/+7
| | | | | | | | | | If PresentCompleteNotify event says the pixmap was presented with mode PresentCompleteModeSuboptimalCopy, it means the pixmap could possibly have been flipped instead if allocated with a different format/modifier. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/x11: Support DRI3 v1.1Louis-Francis Ratté-Boulianne2018-03-093-15/+96
| | | | | | | | | | | | Add support for DRI3 v1.1, which allows pixmaps to be backed by multi-planar buffers, or those with format modifiers. This is both for allocating render buffers, as well as EGLImage imports from a native pixmap (EGL_NATIVE_PIXMAP_KHR). Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gbm: give a name to rgba fieldsEric Engestrom2018-03-051-8/+8
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/dri2: fix segfault when display initialisation failsFrank Binns2018-02-231-1/+1
| | | | | | | | | | | | dri2_display_destroy() is called when platform specific display initialisation fails. However, this would typically lead to a segfault due to the dri2_egl_display vbtl not having been set up. Fixes: 2db95482964 ("loader_dri3/glx/egl: Optionally use a blit context for blitting operations") Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* loader_dri3/glx/egl: Reinstate the loader_dri3_vtable get_dri_screen callbackThomas Hellstrom2018-02-201-0/+12
| | | | | | | | | | | | | | | Removing this callback caused rendering corruption in some multi-screen cases, so it is reinstated but without the drawable argument which was never used by implementations and was confusing since the drawable could have been created with another screen. Cc: "17.3 18.0" [email protected] Fixes: 5198e48a0d (loader_dri3/glx/egl: Remove the loader_dri3_vtable get_dri_screen callback) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105013 Reported-by: Daniel van Vugt <[email protected]> Tested-by: Timo Aaltonen <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* egl/wayland: Always use in-tree wayland-egl-backend.hDaniel Stone2018-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | A recent patchset to Wayland[0] migrated Mesa's libwayland-egl backend into Wayland itself, so implementations could provide backends. Mesa still uses its own, and the two have already diverged[1]. The include from egl_dri2.h could pick up either the installed Wayland wayland-egl-backend.h (with a 'driver_private' member), or the Mesa internal wayland-egl-backend.h (with a 'private' member), failing the build in the first instance. Add an explicit directory prefix to the include, so we always get our in-tree version. [0]: https://patchwork.freedesktop.org/series/31663/ [1]: https://cgit.freedesktop.org/wayland/wayland/commit/?id=9fa60983b579 Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105103 Fixes: 198af27c679c ("wayland-egl: rename wayland-egl-{priv,backend}.h")
* egl/wayland: check for invalid format indexEric Engestrom2018-02-161-0/+2
| | | | | | | | | | v2: just tell the compiler to assume the format will always be found, as it comes from the table itself to begin with. (DanielS) CID: 1429516 Fixes: d32b23f3830099a328b91 "egl/wayland: Add bpp to visual map" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* dri: fromPlanar() can return NULL as a valid resultLouis-Francis Ratté-Boulianne2018-02-152-7/+5
| | | | | | | | | | | | | It was assumed that fromPlanar() could return NULL to mean that the planar image is the same as the parent DRI image. That assumption wasn't made everywhere though. Let's fix things and make sure that all callers understand a NULL result Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/x11: Fix leak in dri3_create_image_khr_pixmapLouis-Francis Ratté-Boulianne2018-02-141-0/+1
| | | | | | | bp_reply wasn't properly free'd Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* egl/gbm: Fix compiler warning about visual matching.Eric Anholt2018-02-121-1/+1
| | | | | | | The compiler doesn't know that num_visuals > 0. Fixes: 37a8d907cc16 ("egl/gbm: Ensure EGLConfigs match GBM surface format") Reviewed-by: Daniel Stone <[email protected]>
* egl/gbm: Ensure EGLConfigs match GBM surface formatDaniel Stone2018-02-091-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | When we create an EGL window surface on a GBM surface, ensure that the EGLConfig is compatible with the GBM format, notwithstanding XRGB/ARGB interchange. For example, rendering with an XRGB8888 EGLConfig on to an ARGB8888 gbm_surface (and vice-versa) are acceptable, but rendering with an XRGB2101010 EGLConfig on to an XRGB8888 gbm_surface will now be rejected. This was previously allowed through; when 10bpc formats were enabled, clients which picked a completely random EGL config and hoped/assumed they were XRGB8888 would break. If you have bisected a failure to start a GBM/KMS client to this commit, please look at its EGLConfig selection (e.g. through eglChooseConfigs), and add an EGL_NATIVE_VISUAL_ID == gbm_surface format match to the attribs for config selection. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/gbm: Remove duplicate format tableDaniel Stone2018-02-091-18/+17
| | | | | | | | | | | | | | Now that we have mask/channel information in gbm_dri's format conversion table, we can remove the copy in EGL. As this table contains more formats (notably including R8 and RG8, which can be used for BO but not surface allocation), we now compare the masks of all channels when trying to find a suitable config. Without doing this, an XRGB8888 EGLConfig would match on an R8 format. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use an array for modifiersDaniel Stone2018-02-092-72/+20
| | | | | | | | | | | Each Wayland EGLDisplay currently contains a struct with one vector of modifiers per format, hardcoded in the header. To allow easier support for more formats, turn this into an array of u_vectors which is opaque outside of platform_wayland.c. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Remove has_format enumDaniel Stone2018-02-091-19/+14
| | | | | | | | | Instead of the has_format enum, use an index into the visual array. This makes adding new formats less typing. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Add bpp to visual mapDaniel Stone2018-02-091-24/+12
| | | | | | | | | | Both the DRI2 GetBuffersWithFormat interface, and SHM buffer allocation, had their own format -> bpp lookup tables. Replace these with a lookup into the visual map. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for DRIImage<->FourCC mapDaniel Stone2018-02-091-14/+11
| | | | | | | | | When trying to translate between DRIImage format enums and FourCC codes, use our visual map rather than an open-coded subset. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for format advertisementDaniel Stone2018-02-091-39/+36
| | | | | | Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for buffer_from_imageDaniel Stone2018-02-091-21/+19
| | | | | | | | | | When creating a wl_buffer on an upstream Wayland display from an existing EGLImage, use the dri2_wl_visual map rather than another hardcoded list of formats. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use visual map for config->format lookupDaniel Stone2018-02-091-25/+36
| | | | | | | | | Having hoisted the format -> config map into common code, we now use it for config -> format lookups. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Add format enums to visual mapDaniel Stone2018-02-091-0/+13
| | | | | | | | | | | | | | Extend the visual map from only containing names and bitmasks, to also carrying the three format enums we need. These are the DRIImage format tokens for internal allocation, FourCC codes for wl_drm and dmabuf protocol, and wl_shm codes for swrast drivers. We will later use these formats to eliminate a bunch of open-coded conversions. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Use proper enum type in visual definitionDaniel Stone2018-02-091-1/+1
| | | | | | | | No semantic change. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Widen channel masks to bppDaniel Stone2018-02-091-5/+20
| | | | | | | | | | | Widen the channel masks given in the visual table to the full width of the pixel format, i.e. as many leading zeros as required. No functional change. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Hoist format <-> EGLConfig definition upDaniel Stone2018-02-091-16/+17
| | | | | | | | | Pull the mapping between Wayland formats and EGLConfigs up to the top level, so we can reuse it elsewhere. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl/wayland: Fix ARGB/XRGB transposition in config mapDaniel Stone2018-02-091-2/+2
| | | | | | | | | | | | When 0b2b7191214eb moved from an if tree to a struct to map between wl_drm formats and EGLConfigs, it transposed the mapping between XRGB and ARGB. Luckily, everyone exposes both formats, so this is harmless. Signed-off-by: Daniel Stone <[email protected]> Fixes: 0b2b7191214eb ("egl/wayland: introduce dri2_wl_add_configs_for_visuals() helper") Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* egl: add support for EGL_ANDROID_blob_cacheTapani Pälli2018-02-072-0/+17
| | | | | | | | | | | v2: cleanup, move callbacks to _egl_display struct (Emil Velikov) adapt to earlier ctx->screen changes v3: remove useless checking, add _eglSetFuncName (Emil Velikov) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> (v2) Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Fix build break with dri2_initialize_android _EGLDisplay parameterRob Herring2018-01-041-15/+15
| | | | | | | | | | | | | | | | Commit 2f421651aca9 ("egl: let each platform decided how to handle LIBGL_ALWAYS_SOFTWARE") broke the build due to copy-n-paste of misnamed function parameter.: src/egl/drivers/dri2/platform_android.c:1183:8: error: use of undeclared identifier 'disp' Rather than just fixing 'disp', rename the function parameter 'dpy' to 'disp' to align with the other EGL platforms' implementations. Fixes: 2f421651aca9 ("egl: let each platform decided how to handle LIBGL_ALWAYS_SOFTWARE") Reviewed-by: Tapani Pälli <[email protected]> Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* egl/wayland: Add Wayland shm swrast support for RGB10 winsys buffers.Mario Kleiner2018-01-031-3/+13
| | | | | | Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl/wayland: Add Wayland dmabuf support for RGB10 winsys buffers. (v2)Mario Kleiner2018-01-032-1/+19
| | | | | | | | | | | Successfully tested under Weston 3.0. Photometer confirms 10 rgb bits from rendering to display. v2: Rebased onto master for dri2_teardown_wayland(). Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl/wayland: Add Wayland drm support for RGB10 winsys buffers.Mario Kleiner2018-01-031-3/+34
| | | | | | | | | Successfully tested under Weston 3.0. Photometer confirms 10 rgb bits from rendering to display. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl/x11: Handle depth 30 drawables for EGL_KHR_image_pixmap.Mario Kleiner2018-01-032-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables eglCreateImageKHR() with target set to EGL_NATIVE_PIXMAP_KHR to handle color depth 30 X11 drawables. Note that in theory the drawable depth 32 case in the current implementation is ambiguous: A depth 32 drawable could be of format ARGB8888 or ARGB2101010, therefore an assignment of __DRI_IMAGE_FORMAT_ARGB8888 for a pixmap of ARGB2101010 format would be wrong. In practice however, the X-Server (as of v1.19) does not provide any depth 32 visuals for ARGB2101010 EGL/GLX configs. Those are associated with depth 30 visuals without an alpha channel instead. Therefore the switch-case depth 32 branch is only executed for ARGB8888 pixmaps and we get away with this. Tested with KDE Plasma 5 under X11, DRI2 and DRI3/Present, selecting EGL + OpenGL compositing and different fbconfigs with/without 2 bit alpha channel. glxinfo confirms use of depth 30 visuals for ARGB2101010 only. Suggested-by: Eric Engestrom <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl/x11: Handle depth 30 drawables under software rasterizer.Mario Kleiner2018-01-031-0/+1
| | | | | | | | | | | For fixing eglCreateWindowSurface() under swrast, as tested with LIBGL_ALWAYS_SOFTWARE=1. Suggested-by: Eric Engestrom <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl/x11: Match depth 30 RGB visuals to 32-bit RGBA EGLConfigs.Mario Kleiner2018-01-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | Similar to the matching of 24 bit RGB visuals to 32-bit RGBA EGLConfigs, so X11 compositors won't alpha-blend any config with a destination alpha buffer during compositing. Additionally this fixes failure to select ARGB2101010 configs via eglChooseConfig() with EGL_ALPHA_BITS 2 on a depth 30 X-Screen. The X-Server doesn't provide any visuals of depth 32 for ARGB2101010 configs, it only provides depth 30 visuals. Therefore if we'd only match ARGB2101010 configs to depth 32 RGBA visuals, we would not ever get a visual for such a config. This was apparent in piglit tests for egl configs, which are fixed by this commit. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* egl: rename LIBGL_ALWAYS_SOFTWARE variable from UseFallback to ForceSoftwareEric Engestrom2017-12-275-5/+5
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl: let each platform decided how to handle LIBGL_ALWAYS_SOFTWAREEric Engestrom2017-12-273-4/+8
| | | | | | | | | | | | | | | | My refactor in 47273d7312cb5b5b6b0b9 missed this early return; because of it, setting UseFallback one layer above actually prevented the software path from being used. Remove this early return and let each platform's dri2_initialize_*() decide what it can do with the LIBGL_ALWAYS_SOFTWARE restriction. platform_{surfaceless,x11,wayland} were already handling it themselves. Fixes: 47273d7312cb5b5b6b0b9 "egl: set UseFallback if LIBGL_ALWAYS_SOFTWARE is set" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reported-by: Brendan King <[email protected]>
* egl/android: Provide an option for the backend to expose KHR_imageHarish Krupo2017-12-141-0/+1
| | | | | | | | | | | | | | | | | From android cts 8.0_r4, a new test case checks if all the required egl extensions are exposed. In the current implementation we expose KHR_image if KHR_image_base and KHR_image_pixmap are supported but KHR_image spec does not mandate the existence of both the extensions. This patch preserves the current check and also provides the backend with an option to expose the KHR_image extension. Test: run cts -m CtsOpenGLTestCases -t \ android.opengl.cts.OpenGlEsVersionTest#testRequiredEglExtensions Signed-off-by: Harish Krupo <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* egl/android: Partially handle HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINEDTomasz Figa2017-12-131-2/+39
| | | | | | | | | | | | | | There is no API available to properly query the IMPLEMENTATION_DEFINED format. As a workaround we rely here on gralloc allocating either an arbitrary YCbCr 4:2:0 or RGBX_8888, with the latter being recognized by lock_ycbcr failing. Reviewed-on: https://chromium-review.googlesource.com/566793 Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Robert Foss <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* egl/x11: Remove unneeded free() on always null stringVadym Shovkoplias2017-12-011-1/+0
| | | | | | | | In this condition dri2_dpy->driver_name string always equals NULL, so call to free() is useless Signed-off-by: Vadym Shovkoplias <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* egl: pass the dri2_dpy to the $plat_teardown functionsEmil Velikov2017-11-161-2/+2
| | | | | | | | | Cc: Mark Janes <[email protected]> Fixes: 40a01c9a0ef ("egl/drm: move teardown code to the platform file") Fixes: 8d745abc009 ("egl/wayland: move teardown code to the platform file") Signed-off-by: Emil Velikov <[email protected]> Tested-by: Dylan Baker <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103784