summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11.c
diff options
context:
space:
mode:
authorFrank Binns <frank.binns@imgtec.com>2016-06-17 18:41:20 +0100
committerAxel Davy <axel.davy@ens.fr>2016-08-31 15:09:12 +0200
commit4c28c916ef229e94bd46fd1703e6b535e03e7e64 (patch)
treef07a6ffd1945fa4dbc78003517f9f5d3d0d4797e /src/egl/drivers/dri2/platform_x11.c
parent55e417222f774b2a714313391c8f90982e7a7b4f (diff)
downloadexternal_mesa3d-4c28c916ef229e94bd46fd1703e6b535e03e7e64.zip
external_mesa3d-4c28c916ef229e94bd46fd1703e6b535e03e7e64.tar.gz
external_mesa3d-4c28c916ef229e94bd46fd1703e6b535e03e7e64.tar.bz2
egl/x11_dri3: disable WL_bind_wayland_display for devices without render nodes
Up until now, DRI3 was only used for devices that have render nodes, unless overridden via an environment variable, with it falling back to DRI2 otherwise. This limitation was there in order to support WL_bind_wayland_display as it requires client opened device node fds to be authenticated, which isn't possible when using DRI3. This is an unfortunate compromise as DRI3 provides security benefits over DRI2. Instead, allow DRI3 to be used for devices without render nodes but don't advertise WL_bind_wayland_display in this case. Applications that need this extension can still be run by disabling DRI3 support via the LIBGL_DRI3_DISABLE environment variable. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Axel Davy <axel.davy@ens.fr>
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 686552c..c8a9808 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1336,7 +1336,8 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
disp->Extensions.EXT_buffer_age = EGL_TRUE;
#ifdef HAVE_WAYLAND_PLATFORM
- disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
+ if (dri2_dpy->device_name)
+ disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
#endif
if (dri2_dpy->conn) {