1 --- a/src/egl/drivers/dri2/egl_dri2.c
2 +++ b/src/egl/drivers/dri2/egl_dri2.c
3 @@ -959,6 +959,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
7 +#ifdef HAVE_X11_PLATFORM
8 #ifdef HAVE_DRI3_MODIFIERS
9 dri2_dpy->multibuffers_available =
10 (dri2_dpy->dri3_major_version > 1 ||
11 @@ -968,11 +969,15 @@ dri2_setup_extensions(_EGLDisplay *disp)
12 (dri2_dpy->present_major_version == 1 &&
13 dri2_dpy->present_minor_version >= 2)) &&
14 (dri2_dpy->image && dri2_dpy->image->base.version >= 15);
17 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 /* this is enum _egl_platform_type */
26 (disp->Platform == _EGL_PLATFORM_X11 ||
27 @@ -1196,11 +1201,13 @@ dri2_display_create(void)
28 dri2_dpy->fd_render_gpu = -1;
29 dri2_dpy->fd_display_gpu = -1;
31 +#ifdef HAVE_X11_PLATFORM
32 #ifdef HAVE_DRI3_MODIFIERS
33 dri2_dpy->dri3_major_version = -1;
34 dri2_dpy->dri3_minor_version = -1;
35 dri2_dpy->present_major_version = -1;
36 dri2_dpy->present_minor_version = -1;