summaryrefslogtreecommitdiffstats
path: root/src/egl/wayland
Commit message (Collapse)AuthorAgeFilesLines
* autoconf: stop exporting internal wayland detailsEmil Velikov2018-08-071-1/+1
| | | | | | | | | | | | | | | | | 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: 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]>
* wayland-drm: do not distribute generated sourcesJuan A. Suarez Romero2018-03-231-6/+16
| | | | | | | | | 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]>
* 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]>
* *-symbol-check: use correct `nm` path when cross-compilingEric Engestrom2018-02-262-1/+2
| | | | | | Inspired-by: a similar patch for libdrm by Heiko Becker Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: Move Wayland dmabuf to wayland-drmDaniel Stone2018-02-161-0/+22
| | | | | | | | | | | As the comment notes: linux-dmabuf has nothing to do with wayland-drm, but we need a single place to build these files we can use from both EGL and Vulkan, which is guaranteed to be included before both EGL and Vulkan WSI. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* autotools: include meson build files in tarballDylan Baker2018-01-192-2/+2
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: Use consistent style for testsDylan Baker2018-01-111-1/+4
| | | | | | | Don't use intermediate variables, use consistent whitespace. Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* egl/wayland: Add Wayland drm support for RGB10 winsys buffers.Mario Kleiner2018-01-031-0/+6
| | | | | | | | | 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]>
* wayland-drm: static inline wayland_drm_buffer_getEmil Velikov2017-11-082-38/+36
| | | | | | | | | | | | | | | | | | | | The function is effectively a direct function call into libwayland-server.so. Thus GBM no longer depends on the wayland-drm static library, making the build more straight forward. And the resulting binary is a bit smaller. Note: we need to move struct wayland_drm_callbacks further up, otherwise we'll get an error since the type is incomplete. v2: Rebase, beef-up commit message, update meson, move struct wayland_drm_callbacks. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> # meson bit only Acked-by: Eric Engestrom <[email protected]> # for the rest Reviewed-by: Dylan Baker <[email protected]> # meson
* meson: Set c visibility args for wayland-drmDylan Baker2017-11-021-0/+1
| | | | | | | Because otherwise gbm will expose wayland symbols that it shouldn't. Signed-off-by: Dylan Baker <[email protected]> Reviewed-and-Tested-by: Eric Engestrom <[email protected]>
* gbm: Don't traverse backwards for includesDylan Baker2017-11-021-0/+2
| | | | | | | | | | | | | | This is just a bad idea and should be avoided. Instead, make the #include flat and fix the build systems to pass the proper -I flags v2: - add an inc_wayland_drm instead passing a path to include_directories (Emil) - update commit message (Emil) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> (v1)
* automake: Remove unused include pathDylan Baker2017-11-021-2/+1
| | | | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: pass correct args to wayland-egl symbol testEric Engestrom2017-10-311-1/+4
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* wayland-egl: fail symbol check if lib is missingEric Engestrom2017-10-311-1/+9
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* wayland-egl: fix wayland cflagsEric Engestrom2017-10-271-1/+1
| | | | | | | | Fixes: 80bfff5c4f1d4d8c842a0 "wayland-egl: adds CFLAGS for wayland.egl.h include" Suggested-by: Daniel Stone <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Emil Velikov <[email protected]> Acked-by: Tobias Klausmann <[email protected]>
* meson: wayland-egl depends on wayland-clientDaniel Stone2017-10-261-0/+1
| | | | | | | | | | | | Since wayland-egl.h is currently provided by the core Wayland package, depend on wayland-client to make sure we get it in our include path. Signed-off-by: Daniel Stone <[email protected]> Acked-by: Emil Velikov <[email protected]> Fixes: 108d257a16 ("meson: build libEGL") Cc: Tobias Klausmann <[email protected]> Cc: Dylan Baker <[email protected]> Cc: Gert Wollny <[email protected]>
* meson: build libEGLDylan Baker2017-10-202-0/+56
| | | | | | | | | | | | | | | | | | This is based heavily on Daniel Stone's work for the same, rebased on master and with a number of TODO's fixed. This does not implement glvnd (which is coming in a later patch) Meson builds egl slightly differently than autotools, namely it doesn't build an intermediate shared library. It doesn't do this because meson doesn't have problems with the name of the library being dynamically generated, so the glvnd and non-glvnd code can follow the same path. v2: - Don't reuse variable (Eric E.) Signed-off-by: Dylan Baker <[email protected]> Tested-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* meson: move wayland_drm_protocol generation to wayland-drmDylan Baker2017-10-201-1/+13
| | | | | | | | | | | These files are needed by both vulkan wayland-wsi and by egl wayland-wsi, since the XML file is in src/egl/wayland/wayland-drm and we can include this directory in such a way that it will be loaded before egl and vulkan this allows us to avoid multiple calls to the same generator. Signed-off-by: Dylan Baker <[email protected]> Reviewed-and-Tested-by: Eric Engestrom <[email protected]>
* wayland-drm: constify the callbacks struct, take 2Emil Velikov2017-10-132-2/+2
| | | | | | | | | | | Now that wayland-drm (correctly) keeps a local copy of the callbacks, this should not longer cause explosions. After all the symbol is a local, constant data. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Tested-by: Derek Foreman <[email protected]>
* wayland-drm: use a copy of the wayland_drm_callbacks structEmil Velikov2017-10-131-5/+5
| | | | | | | | | | | The callbacks may be called even when they are no longer valid. Say, the user is dlclose(ing) libEGL while the buffers are being destroyed. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Tested-by: Derek Foreman <[email protected]>
* wayland-egl: adds CFLAGS for wayland.egl.h includeTobias Klausmann2017-10-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with commit ab0589c6ed ("wayland-egl: remove no longer needed wayland-client dependency") the wayland-egl.h include was missing leading to a build failure: CC wayland-egl.lo wayland-egl.c:33:10: fatal error: wayland-egl.h: No such file or directory #include "wayland-egl.h" ^~~~~~~~~~~~~~~ Strictly speaking we should be checking for wayland-egl in configure and propagating its CFLAGS here. Yet again, the current wayland-egl split is bonkers as the Wayland repo provides single header, no pkg-config file or library. That will be resolved at a later stage, but in the meanwhile fix the build. Fixes: ab0589c6ed ("wayland-egl: remove no longer needed wayland-client dependency") Signed-off-by: Tobias Klausmann <[email protected]> Reviewed-by: Emil Velikov <[email protected]> [Emil Velikov: add some text about CFLAGS and current wayland-egl situation] Signed-off-by: Emil Velikov <[email protected]>
* wayland-egl: rework and simplify wl_egl_window initializationEmil Velikov2017-10-021-10/+16
| | | | | | | | | | | | | | | Use calloc instead of malloc + explicitly zeroing the different fields. We need special handling for the version field which is of type const intptr_t. As we're here document why keeping the constness is a good idea. The wl_egl_window_resize() call is replaced with an explicit set of the width/height. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: move WL_EGL_EXPORT declaration to where it's usedEmil Velikov2017-10-022-7/+7
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: use C99 commentsEmil Velikov2017-10-021-3/+3
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: remove no longer needed wayland-client dependencyEmil Velikov2017-10-023-4/+1
| | | | | | | | | Was required for wl_surface, which is opaque and forward declared with earlier patch. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: add stdint.h include for intptr_tEmil Velikov2017-10-021-0/+1
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: forward declare struct wl_surfaceEmil Velikov2017-10-021-0/+2
| | | | | | | | | It makes the header self-contained and with later commit we'll remove the unnecessary wayland-client.h include. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* wayland-egl: rename wayland-egl-{priv,backend}.hEmil Velikov2017-10-024-4/+4
| | | | | | | | In preparation to lifting the whole thing out as a separate library. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Miguel A. Vico <[email protected]>
* meson: Add build Intel "anv" vulkan driverDylan Baker2017-09-271-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows building and installing the Intel "anv" Vulkan driver using meson and ninja, the driver has been tested against the CTS and has seems to pass the same series of tests (they both segfault when the CTS tries to run wayland wsi tests). There are still a mess of TODO, XXX, and FIXME comments in here. Those are mostly for meson bugs I'm trying to fix, or for additional things to implement for other drivers/features. I have configured all intermediate libraries and optional tools to not build by default, meaning they will only be built if they're pulled in as a dependency of a target that will actually be installed) this allows us to avoid massive if chains, while ensuring that only the bits that need to be built are. v2: - enable anv, x11, and wayland by default - add configure option to disable valgrind v3: - fix typo in meson_options (Nicholas) v4: - Remove dead code (Eric) - Remove change to generator that was from v0 (Eric) - replace if chain with loop (Eric) - Fix typos (Eric) - define HAVE_DLOPEN for both libdl and builtin dl cases (Eric) v5: - rebase on util string buffer implementation Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v4)
* Revert "wayland-drm: constify the callbacks struct"Daniel Stone2017-09-262-3/+3
| | | | | | | | | | | | | | | The wayland-drm callback struct is referenced, rather than duplicated, inside wayland-drm. Constifying this struct involved moving it on to the stack; as a result, starting any EGL client on Wayland called into random stack memory, and killed the compositor. This reverts commit 1d0be5b3fe548ee33d4520092f583c76d42510a6 and 39d539e321c6c97433a15660c9d9a20ad8657ff0. Signed-off-by: Daniel Stone <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Krzysztof Sobiecki <[email protected]> Fixes: 1d0be5b3fe54 ("wayland-drm: constify the callbacks struct")
* egl: fix build fallouts from 1d0be5b3fe5Krzysztof Sobiecki2017-09-191-1/+1
| | | | | Fixes: 1d0be5b3fe5 ("wayland-drm: constify the callbacks struct") Reviewed-by: Emil Velikov <[email protected]>
* configure.ac: split the wayland client/server confusionEmil Velikov2017-09-192-2/+2
| | | | | | | | | | | | | | | | | | | | At the moment wayland-clients, such as the Vulkan drivers were over-linking against libwayland-server.so. That went unnoticed, since both client and server code uses the wl*interface symbols, which are present in both libwayland-client.so and libwayland-server.so. I've looked at correcting that, although that's orthogonal to this fix. Note: wayland-egl does _not_ depend on wayland-client, although it does need wayland-egl.h. There's no distinct package that provides it (I have a WIP on the topic) so current solution will do for now. v2: Rebase with the "...inline wayland_drm_buffer_get" patch removed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: constify the callbacks structEmil Velikov2017-09-191-2/+2
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: add wl_display/wl_resource forward declarationsEmil Velikov2017-09-191-0/+2
| | | | | | | ... making the header self-contained. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: avoid deprecated use of struct wl_resourceMicah Fedke2017-09-191-3/+3
| | | | | | | | | | | | | | | | | | | Wayland v1.2 with commit 1488c96a5db ("Add accessor functions for wl_resource and deprecate wl_client_add_resource") paves the way towards making wl_resource opaque. Namely, new helpers were introduced and the struct was annotated as deprecated. Since wayland headers are normally installed in /usr/include, which is in -isystem, GCC did not generate warnings as documented in the manual. "Warnings from system headers are normally suppressed..." Signed-off-by: Micah Fedke <[email protected]> Reviewed-by: Pekka Paalanen <[email protected]> [Emil Velikov: add commit message] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: remove unused wayland_drm_buffer_get_{format,buffer}Emil Velikov2017-09-192-18/+0
| | | | | | | | | | | Unused anywhere throughout the codebase. We could start using it, although that contradicts to an evil plan* of mine. * Only wayland servers will make use of the static library, providing actual distinction between server vs client. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-drm: remove hardcoded enum wl_drm_formatEmil Velikov2017-09-191-64/+0
| | | | | | | The exact same copy is generated in the client/server protocol header. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* wayland-egl: update the SHA1 of the commit introducing v3Emil Velikov2017-07-241-1/+1
| | | | Signed-off-by: Emil Velikov <[email protected]>
* wayland-egl: Update ABI checkerMiguel A. Vico2017-07-241-15/+75
| | | | | | | | | | This change updates wayland-egl-abi-check.c with the latest changes to wl_egl_window. Signed-off-by: Miguel A. Vico <[email protected]> Reviewed-by: James Jones <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* wayland-egl: Make wl_egl_window a versioned structMiguel A. Vico2017-07-242-1/+9
| | | | | | | | | | | | | | | | | | | | | | We need wl_egl_window to be a versioned struct in order to keep track of ABI changes. This change makes the first member of wl_egl_window the version number. An heuristic in the wayland driver is added so that we don't break backwards compatibility: - If the first field (version) is an actual pointer, it is an old implementation of wl_egl_window, and version points to the wl_surface proxy. - Else, the first field is the version number, and we have wl_egl_window::surface pointing to the wl_surface proxy. Signed-off-by: Miguel A. Vico <[email protected]> Reviewed-by: James Jones <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* wayland-egl: Add wl_egl_window ABI checkerMiguel A. Vico2017-07-242-1/+180
| | | | | | | | | | Add a small ABI checker for wl_egl_window so that we can check for backwards incompatible changes at 'make check' time. Signed-off-by: Miguel A. Vico <[email protected]> Reviewed-by: James Jones <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: Axe buffer import format conversion tableDaniel Stone2017-07-181-1/+2
| | | | | | | | | | | | | Wayland buffers coming from wl_drm use the WL_DRM_FORMAT_* enums, which are identical to GBM_FORMAT_*. Similarly, FD imports do not need to convert between GBM and DRI FourCC, since they are (almost) completely compatible. This widens the formats accepted by gbm_bo_import() when importing wl_buffers; previously, only XRGB8888, ARGB8888, RGB565 and YUYV were supported. Reviewed-by: Emil Velikov <[email protected]>
* wayland: move .gitignore where applicableEmil Velikov2017-03-131-0/+0
| | | | | | | | Strictly speaking things work as-is, but let's move the file alongside the artefacts it references. Analogous to all other places in mesa. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* wayland-egl/wayland-egl-symbols-check: do not mandate bashEmil Velikov2017-03-101-1/+1
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Andreas Boll <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* Add missing copyright header to wayland-egl-priv.hMicah Fedke2017-02-011-0/+27
| | | | | Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* wayland-drm: add missing NULL checkFrank Binns2016-09-011-0/+2
| | | | | | | | Although malloc is unlikely to fail check its return value nevertheless. Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Introduce .editorconfigEric Engestrom2016-08-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | A few weeks ago, Jose Fonseca suggested [0] we use .editorconfig files to try and enforce the formatting of the code, to which Michel Dänzer suggested [1] we start by importing the existing .dir-locals.el settings. The first draft was discussed in the RFC [2]. These .editorconfig are a first step, one that has the advantage of requiring little to no intervention from the devs once the settings files are in place, but the settings are very limited. This does have the advantage of applying while the code is being written. This doesn't replace the need for more comprehensive formatting tools such as clang-format & clang-tidy, but those reformat the code after the fact. [0] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121545.html [1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121639.html [2] https://lists.freedesktop.org/archives/mesa-dev/2016-July/123431.html Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[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]>