• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Revisiónb832b37c6a6f7ff69a4ea4656007827a1b7e67e8 (tree)
Tiempo2017-02-16 02:43:52
AutorHans de Goede <hdegoede@redh...>
CommiterSean V. Kelley

Log Message

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>

Cambiar Resumen

Diferencia incremental

--- a/va/wayland/va_wayland_drm.c
+++ b/va/wayland/va_wayland_drm.c
@@ -38,7 +38,10 @@
3838 #include "wayland-drm-client-protocol.h"
3939
4040 /* XXX: Wayland/DRM support currently lives in Mesa libEGL.so.* library */
41-#define LIBWAYLAND_DRM_NAME "libEGL.so.1"
41+/* First try the soname of a glvnd enabled mesa build */
42+#define LIBWAYLAND_DRM_NAME "libEGL_mesa.so.0"
43+/* Then fallback to plain libEGL.so.1 (which might not be mesa) */
44+#define LIBWAYLAND_DRM_NAME_FALLBACK "libEGL.so.1"
4245
4346 typedef struct va_wayland_drm_context {
4447 struct va_wayland_context base;
@@ -207,8 +210,11 @@ va_wayland_drm_create(VADisplayContextP pDisplayContext)
207210 vtable->has_prime_sharing = 0;
208211
209212 wl_drm_ctx->handle = dlopen(LIBWAYLAND_DRM_NAME, RTLD_LAZY|RTLD_LOCAL);
210- if (!wl_drm_ctx->handle)
211- return false;
213+ if (!wl_drm_ctx->handle) {
214+ wl_drm_ctx->handle = dlopen(LIBWAYLAND_DRM_NAME_FALLBACK, RTLD_LAZY|RTLD_LOCAL);
215+ if (!wl_drm_ctx->handle)
216+ return false;
217+ }
212218
213219 wl_drm_ctx->drm_interface =
214220 dlsym(wl_drm_ctx->handle, "wl_drm_interface");