Hi Gregory, On 21 May 2017 at 15:59, Gregory Hainaut <gregory.hain...@gmail.com> wrote: > +static GLboolean > +dri_is_thread_safe(void *loaderPrivate) > +{ > +#ifdef HAVE_X11_PLATFORM > + struct dri2_egl_surface *dri2_surf = loaderPrivate; > + _EGLDisplay *display = dri2_surf->base.Resource.Display;
Move these out of the ifdef, and ... > + Display *xdpy = (Display*)display->PlatformDisplay; > + > + /* Check Xlib is running in thread safe mode when running on EGL/X11-xlib > + * platform > + * > + * 'lock_fns' is the XLockDisplay function pointer of the X11 display > 'dpy'. > + * It wll be NULL if XInitThreads wasn't called. > + */ > + if (display->Platform == _EGL_PLATFORM_X11 && xdpy && !xdpy->lock_fns) > + return false; #ifdef HAVE_WAYLAND_PLATFORM if (display->Platform == _EGL_PLATFORM_WAYLAND) return true; #endif Not entirely sure about how DRM/GBM behaves WRT flushing here; hopefully it works too. Cheers Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev