diff options
author | Tapani Pälli <[email protected]> | 2013-12-01 11:53:55 +0200 |
---|---|---|
committer | Chad Versace <[email protected]> | 2013-12-03 09:21:24 -0800 |
commit | a057b837ddd1c725a7504eedc53c6df05a012773 (patch) | |
tree | cd38ea0291c88629cacbeb34ba9c0e7058e9f222 /src/egl/drivers | |
parent | ad3937fd4efdd0a9a2b79ab6ae899a4ca1f3bb01 (diff) |
egl: add HAVE_LIBDRM define, fix EGL X11 platform
Commit a594cec broke EGL X11 backend by adding dependency between
X11 and DRM backends requiring HAVE_EGL_PLATFORM_DRM defined for X11.
This patch fixes the issue by adding additional define for libdrm
detection independent of which backend is being compiled. Tested by
compiling Mesa with '--with-egl-platforms=x11' and running es2gears_x11
+ glbenchmark2.7 successfully.
v2: return true for dri2_auth if running without libdrm (Samuel)
v3: check libdrm when building EGL drm platform + AM_CFLAGS fix (Emil)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72062
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Cc: Samuel Thibault <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/egl/drivers')
-rw-r--r-- | src/egl/drivers/dri2/platform_x11.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index c56a4138a64..04cb62b41d3 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -33,7 +33,7 @@ #include <fcntl.h> #include <errno.h> #include <unistd.h> -#ifdef HAVE_DRM_PLATFORM +#ifdef HAVE_LIBDRM #include <xf86drm.h> #endif #include <sys/types.h> @@ -608,7 +608,7 @@ dri2_x11_authenticate(_EGLDisplay *disp, uint32_t id) static EGLBoolean dri2_authenticate(_EGLDisplay *disp) { -#ifdef HAVE_DRM_PLATFORM +#ifdef HAVE_LIBDRM struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); drm_magic_t magic; @@ -621,11 +621,8 @@ dri2_authenticate(_EGLDisplay *disp) _eglLog(_EGL_WARNING, "DRI2: failed to authenticate"); return EGL_FALSE; } - - return EGL_TRUE; -#else - return EGL_FALSE; #endif + return EGL_TRUE; } static EGLBoolean |