egl/x11_dri3: disable WL_bind_wayland_display for devices without render nodes
authorFrank Binns <frank.binns@imgtec.com>
Fri, 17 Jun 2016 17:41:20 +0000 (18:41 +0100)
committerAxel Davy <axel.davy@ens.fr>
Wed, 31 Aug 2016 13:09:12 +0000 (15:09 +0200)
commit4c28c916ef229e94bd46fd1703e6b535e03e7e64
treef07a6ffd1945fa4dbc78003517f9f5d3d0d4797e
parent55e417222f774b2a714313391c8f90982e7a7b4f
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>
src/egl/drivers/dri2/platform_x11.c
src/egl/drivers/dri2/platform_x11_dri3.c