mesa-gl:moved to "simplified /usr" and towards RCS
[nyanlinux.git] / builders / mesa-gl-amd-sh-8368a972943d5265b22eab86aa17c9a3cfe3406b / contrib / egl_dri2.c.patch
blob03a36dd9d06db9aa0c34e8a9c34d2c2683e87207
1 --- a/src/egl/drivers/dri2/egl_dri2.c
2 +++ b/src/egl/drivers/dri2/egl_dri2.c
3 @@ -1057,6 +1057,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
4 return EGL_FALSE;
7 +#ifdef HAVE_X11_PLATFORM
8 #ifdef HAVE_DRI3_MODIFIERS
9 dri2_dpy->multibuffers_available =
10 (dri2_dpy->dri3_major_version > 1 ||
11 @@ -1066,11 +1067,14 @@ 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);
15 +#endif
16 #endif
17 if (disp->Options.Zink && !disp->Options.ForceSoftware &&
18 +#ifdef HAVE_X11_PLATFORM
19 #ifdef HAVE_DRI3_MODIFIERS
20 dri2_dpy->dri3_major_version != -1 &&
21 !dri2_dpy->multibuffers_available &&
22 +#endif
23 #endif
24 (disp->Platform == EGL_PLATFORM_X11_KHR ||
25 disp->Platform == EGL_PLATFORM_XCB_EXT) &&
26 @@ -1287,11 +1291,13 @@ dri2_display_create(void)
27 dri2_dpy->fd_render_gpu = -1;
28 dri2_dpy->fd_display_gpu = -1;
30 +#ifdef HAVE_X11_PLATFORM
31 #ifdef HAVE_DRI3_MODIFIERS
32 dri2_dpy->dri3_major_version = -1;
33 dri2_dpy->dri3_minor_version = -1;
34 dri2_dpy->present_major_version = -1;
35 dri2_dpy->present_minor_version = -1;
36 +#endif
37 #endif
39 return dri2_dpy;