diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-02-15 15:21:12 +0100 |
---|---|---|
committer | Sean V. Kelley <seanvk@users.noreply.github.com> | 2017-02-15 09:45:21 -0800 |
commit | 204e286b4372cd01aea307518a19299087bb922f (patch) | |
tree | 491fd833ef4ab94d250abb20f5194d720c56f926 | |
parent | 71f77c6a4b757576edb22642cb9baf1cc9792453 (diff) | |
download | libva-intel-driver-204e286b4372cd01aea307518a19299087bb922f.tar.gz |
Wayland-drm: Fix not finding wl_drm_interface on systems with libglvnd
We do not want just any libEGL.so.1 we want mesa's libEGL.so.1 as that
is the only way which defines the wl_drm_interface symbol we need,
one systems with libglvnd libEGL.so.1 is a dispatcher library provided
by libglvnd and the actual mesa libEGL we want is named libEGL_mesa.so.0
so try that first.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/i965_output_wayland.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/i965_output_wayland.c b/src/i965_output_wayland.c index 99aa2f6e..d4c58329 100644 --- a/src/i965_output_wayland.c +++ b/src/i965_output_wayland.c @@ -36,7 +36,10 @@ #include "i965_defines.h" #include "dso_utils.h" -#define LIBEGL_NAME "libEGL.so.1" +/* We need mesa's libEGL, first try the soname of a glvnd enabled mesa build */ +#define LIBEGL_NAME "libEGL_mesa.so.0" +/* Then fallback to plain libEGL.so.1 (which might not be mesa) */ +#define LIBEGL_NAME_FALLBACK "libEGL.so.1" #define LIBWAYLAND_CLIENT_NAME "libwayland-client.so.0" typedef uint32_t (*wl_display_get_global_func)(struct wl_display *display, @@ -380,8 +383,11 @@ i965_output_wayland_init(VADriverContextP ctx) goto error; i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME); - if (!i965->wl_output->libegl_handle) - goto error; + if (!i965->wl_output->libegl_handle) { + i965->wl_output->libegl_handle = dso_open(LIBEGL_NAME_FALLBACK); + if (!i965->wl_output->libegl_handle) + goto error; + } dso_handle = i965->wl_output->libegl_handle; wl_vtable = &i965->wl_output->vtable; |