Commit Graph

14 Commits

Author SHA1 Message Date
Daniel Stone
05fd07f427 wayland-egl: Ignore underscored symbols in ABI check
Rather than a hard-coded list of platform symbols, just ignore anything
prefaced with an underscore. This fixes breakage on ARM, which declares
several slightly different platform symbols to x86.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Fixes: 21b1f22eb0 ("wayland-egl: enhance the symbol test")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105620
Cc: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2018-03-20 10:01:19 -05:00
Daniel Stone
3de11b8d79 wayland-egl: Make symbol test fail on failure
The previous rewrite of the wayland-egl ABI checker introduced checks
for removed symbols as well as added symbols, but broke some failure
conditions. Add an explict return-code variable set in failure paths,
rather than chaining or conditions.

If we cannot find the binary or nm, we regard this as an error
condition, rather than test failure.

v2: Don't test if we can execute $NM.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Fixes: 21b1f22eb0 ("wayland-egl: enhance the symbol test")
Cc: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-19 11:44:28 -05:00
Emil Velikov
5f5945b71b wayland-egl: bump the version number to 18.1.0
Seems like I was overoptimistic with my earlier assumption, namely:

"... 17.3.x should be the last version that ships the library."

Mesa 18.0.0 and its wayland-egl is about to be released any time soon,
so bump the number since it must no be smaller. As soon as we get
a wayland release I'll drop the Mesa copy but for now.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-03-19 11:40:47 +02:00
Emil Velikov
21b1f22eb0 wayland-egl: enhance the symbol test
The current test had a few fall-outs:
 - it was checking only for T (.text) symbols
 - did not consider symbol removal

Fix that by fetching all the symbols and doing a bidirectional check -
for added and removed symbols. Error out with informative message for
each case.

v2: Rebase on top of $NM patch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-03-19 11:40:39 +02:00
Emil Velikov
2ba70f1f6d wayland-egl: fail the symbol check if lib is missing
Based on a similar patch (in Mesa) by Eric Engestrom.

v2: Rebase on top of $NM patch
v3: Rebase

Reviewed-by: Eric Engestrom <eric@engestrom.ch> (v1)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-03-19 11:40:20 +02:00
Emil Velikov
6903e4d539 wayland-egl: use correct nm path when cross-compiling
Inspired by Heiko Becker and Eric's work in libdrm and Mesa
respectively.

Cc: Eric Engestrom <eric.engestrom@imgtec.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2018-02-23 17:38:22 +00:00
Emil Velikov
9fa60983b5 wayland-egl: rename wl_egl_window::private to driver_private
private is a reserved keyword in C++. Thus if one is to have a backend
driver written in said language build will fail as below:

.../wayland-egl-backend.h:56:8: expected unqualified-id before ‘private’

Rename it to driver_private and update the test.

NOTE: version bump is not required since:
 - this is a pure API change, ABI is identical
 - hardware drivers already require [minor] changes to move to the
upstream wayland-egl-backend.h

Cc: Arnaud Vrac <rawoul@gmail.com>
Cc: Miguel A . Vico <mvicomoya@nvidia.com>
Suggested-by: Arnaud Vrac <rawoul@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
2018-02-09 17:34:19 +00:00
Emil Velikov
8d8f2600ec wayland-egl: move the wayland-egl{, -core}.h headers to egl/
Now we have all the wayland-egl bits in a single place.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:31:06 +00:00
Emil Velikov
85cb5ed64a wayland-egl-symbols-check: pass the DSO name via the build system
The location of the file is build system specific so, keep it there.

Cc: Daniel Stone <daniels@collabora.com>
Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:31:03 +00:00
Emil Velikov
066113a4c8 wayland-egl: add a note about keeping the backend version in sync
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:30:57 +00:00
Emil Velikov
bf3f9e2413 wayland-egl: introduce wayland-egl-backend.pc
File will be installed alongside the backend header.

This way vendor implementations have enough information about the
interface and they can build their backend/driver library accordingly.

Cc: Miguel A. Vico <mvicomoya@nvidia.com>
Cc: James Jones <jajones@nvidia.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: duncan-roe <duncan_roe@optusnet.com.au>
Cc: Takanari Hayama <taki@igel.co.jp>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:30:54 +00:00
Emil Velikov
6c7f96e8fe wayland-egl: correct wayland-egl.pc description/version
Drop the "Mesa" part from the commit message and change the version to
17.4.0. The number bears references from its Mesa heritage.

Currently Mesa provides 17.2.x while 17.3.x should be the last version
that ships the library.

Some version numbers of wayland-egl.pc providers and users.
The latter is taken from Ubuntu 17.04.

Providers:
 - Mali: 7.10
 - Mesa: 17.2.2

Users:
 - retroarch: NA
 - qtwayland5: NA
 - mpv, libmpv1: 9.0
 - mesa-utils-extra: NA
 - weston, libweston-1-0: NA

 - libwaffle-1-0: 9.1
 - libsdl2-2.0-0: NA

 - libgstreamer-plugins-bad1.0-0: autotools 9.0, meson 1.0
 - libglfw3-wayland: NA

 - kwin-wayland, kwin-wayland-backend-wayland: NA?
 - glmark2-wayland, glmark2-es2-wayland: NA

 - libwebkit2gtk-4.0-37, libwebkit2gtk-4.0-37-gtk2, (webkit overall): NA
 - libgtk-3-0 (gtk overall): NA
 - libcogl20 (cogl overall): 1.0.0

v2: Bump the version to 17.4.0

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:30:50 +00:00
Emil Velikov
d71e4ca501 wayland-egl: reuse the existing WL_EXPORT macro
There's little point if redefining new one ourselves. Just reuse the one
that's already available.

Cc: Daniel Stone <daniels@collabora.com>
Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:30:47 +00:00
Emil Velikov
549a5ea710 wayland-egl: import libwayland-egl.so frontend library from Mesa
Currently the client-facing libwayland-egl API is defined by a header
file shipped by Wayland, but the implementation is left to each vendor.

This can cause collisions when multiple implementations are installed on
the same system. Importing the implementation into Wayland with a stable
and versioned driver-facing ABI allows multiple drivers to coexist on
the same system.

Pull the sample implementation from Mesa commit 677edff5cfd
("wayland-egl: rework and simplify wl_egl_window initialization")
It has been used by the Mesa open source drivers, NVIDIA and others[1].

v2: Reword commit message, rebase on top of newer Mesa.

[1] https://github.com/thayama/wayland-egl

Cc: Miguel A. Vico <mvicomoya@nvidia.com>
Cc: James Jones <jajones@nvidia.com>
Cc: Daniel Stone <daniels@collabora.com>
Cc: duncan-roe <duncan_roe@optusnet.com.au>
Cc: Takanari Hayama <taki@igel.co.jp>
Suggested-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Miguel A Vico Moya <mvicomoya@nvidia.com>
Reviewed-by: Arnaud Vrac <avrac@freebox.fr>
2018-02-09 17:30:36 +00:00