1 --- a/src/egl/drivers/dri2/egl_dri2.c
2 +++ b/src/egl/drivers/dri2/egl_dri2.c
3 @@ -1051,7 +1051,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
8 +#ifdef HAVE_X11_PLATFORM
9 #ifdef HAVE_DRI3_MODIFIERS
10 dri2_dpy->multibuffers_available =
11 (dri2_dpy->dri3_major_version > 1 ||
12 @@ -1061,11 +1061,14 @@ dri2_setup_extensions(_EGLDisplay *disp)
13 (dri2_dpy->present_major_version == 1 &&
14 dri2_dpy->present_minor_version >= 2)) &&
15 (dri2_dpy->image && dri2_dpy->image->base.version >= 15);
18 if (disp->Options.Zink && !disp->Options.ForceSoftware &&
19 +#ifdef HAVE_X11_PLATFORM
20 #ifdef HAVE_DRI3_MODIFIERS
21 dri2_dpy->dri3_major_version != -1 &&
22 !dri2_dpy->multibuffers_available &&
25 !debug_get_bool_option("LIBGL_KOPPER_DRI2", false))
27 @@ -1238,12 +1241,13 @@ dri2_display_create(void)
29 dri2_dpy->fd_render_gpu = -1;
30 dri2_dpy->fd_display_gpu = -1;
32 +#ifdef HAVE_X11_PLATFORM
33 #ifdef HAVE_DRI3_MODIFIERS
34 dri2_dpy->dri3_major_version = -1;
35 dri2_dpy->dri3_minor_version = -1;
36 dri2_dpy->present_major_version = -1;
37 dri2_dpy->present_minor_version = -1;