summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/platform_x11.c
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2016-08-25 13:15:43 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2016-10-14 12:53:39 +0100
commit98f5d0106a8ee45e58a6bf162720da3f6f614a95 (patch)
tree0179539bacaae92ba76661c02509bed009a3875f /src/egl/drivers/dri2/platform_x11.c
parent637d001a97a82142bc20d410655098a0b7b39694 (diff)
downloadexternal_mesa3d-98f5d0106a8ee45e58a6bf162720da3f6f614a95.zip
external_mesa3d-98f5d0106a8ee45e58a6bf162720da3f6f614a95.tar.gz
external_mesa3d-98f5d0106a8ee45e58a6bf162720da3f6f614a95.tar.bz2
egl/dri2: set WL_bind_wayland_display in a consistent way
Introduce a helper and use it throughout the platform code. This allows us to reduce the amount of ifdef(s) and (potentially) use kms_swrast_dri.so for !drm platforms (namely wayland and x11). Note: in the future as other platforms (android, surfaceless) support the extension they can reuse the helper. v2: Rebase, check for device_name. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Diffstat (limited to 'src/egl/drivers/dri2/platform_x11.c')
-rw-r--r--src/egl/drivers/dri2/platform_x11.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index c27f289..0b1b514 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -1339,10 +1339,7 @@ dri2_initialize_x11_dri3(_EGLDriver *drv, _EGLDisplay *disp)
disp->Extensions.CHROMIUM_sync_control = EGL_TRUE;
disp->Extensions.EXT_buffer_age = EGL_TRUE;
-#ifdef HAVE_WAYLAND_PLATFORM
- if (dri2_dpy->device_name)
- disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
-#endif
+ dri2_set_WL_bind_wayland_display(drv, disp);
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, false))
goto cleanup_configs;
@@ -1458,9 +1455,7 @@ dri2_initialize_x11_dri2(_EGLDriver *drv, _EGLDisplay *disp)
disp->Extensions.NV_post_sub_buffer = EGL_TRUE;
disp->Extensions.CHROMIUM_sync_control = EGL_TRUE;
-#ifdef HAVE_WAYLAND_PLATFORM
- disp->Extensions.WL_bind_wayland_display = EGL_TRUE;
-#endif
+ dri2_set_WL_bind_wayland_display(drv, disp);
if (!dri2_x11_add_configs_for_visuals(dri2_dpy, disp, true))
goto cleanup_configs;