summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11_dri3.c
diff options
context:
space:
mode:
authorFrank Binns <frank.binns@imgtec.com>2016-06-17 18:41:22 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-09-01 15:47:58 +0100
commitd6f669ba834697b7321c7ea2cbb38794385c7205 (patch)
tree73d0d46a5925f2729eb1edc5ba20f209b363cf69 /src/egl/drivers/dri2/platform_x11_dri3.c
parent2dc6930a5a54c0f586ba09437123c380f3eae456 (diff)
downloadexternal_mesa3d-d6f669ba834697b7321c7ea2cbb38794385c7205.zip
external_mesa3d-d6f669ba834697b7321c7ea2cbb38794385c7205.tar.gz
external_mesa3d-d6f669ba834697b7321c7ea2cbb38794385c7205.tar.bz2
egl: only store device name when Wayland support is built
The device name is only needed for WL_bind_wayland_display so make this clear by only storing the device name when Wayland support is built. Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11_dri3.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11_dri3.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c
index f996750..31649fe 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.c
+++ b/src/egl/drivers/dri2/platform_x11_dri3.c
@@ -229,6 +229,7 @@ dri3_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type,
static int
dri3_authenticate(_EGLDisplay *disp, uint32_t id)
{
+#ifdef HAVE_WAYLAND_PLATFORM
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
if (dri2_dpy->device_name) {
@@ -239,6 +240,7 @@ dri3_authenticate(_EGLDisplay *disp, uint32_t id)
_eglLog(_EGL_WARNING,
"Wayland client primary node authentication isn't supported");
+#endif
return -1;
}
@@ -533,11 +535,12 @@ dri3_x11_connect(struct dri2_egl_display *dri2_dpy)
return EGL_FALSE;
}
- /* Only try to get a render device name since it's only needed for
- * WL_bind_wayland_display and dri3 doesn't provide a mechanism for
- * authenticating client opened device node fds. If this fails then
- * don't advertise the extension. */
+#ifdef HAVE_WAYLAND_PLATFORM
+ /* Only try to get a render device name since dri3 doesn't provide a
+ * mechanism for authenticating client opened device node fds. If this
+ * fails then don't advertise the extension. */
dri2_dpy->device_name = drmGetRenderDeviceNameFromFd(dri2_dpy->fd);
+#endif
return EGL_TRUE;
}