egl: only check dri3 on X11

When mesa is built without support for X11 Zink will always refuse to
start unless `LIBGL_KOPPER_DRI2` is set.

Only perform this check on X11 where it is relevant.

Fixes: cedb534a17 ("egl/glx: don't load non-sw zink without dri3 support")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26929>
(cherry picked from commit 0fd066a1d7)
This commit is contained in:
antonino
2024-01-08 13:29:41 +01:00
committed by Eric Engestrom
parent a53c9acd82
commit 04b3e4a4f2
2 changed files with 3 additions and 1 deletions

View File

@@ -1067,6 +1067,8 @@ dri2_setup_extensions(_EGLDisplay *disp)
dri2_dpy->dri3_major_version != -1 &&
!dri2_dpy->multibuffers_available &&
#endif
(disp->Platform == EGL_PLATFORM_X11_KHR ||
disp->Platform == EGL_PLATFORM_XCB_EXT) &&
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false))
return EGL_FALSE;