egl/dri2: use the right egl platform enum

this is otherwise completely broken and allows loading zink in all cases

Fixes: 0fd066a1d7 ("egl: only check dri3 on X11")

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27836>
This commit is contained in:
Mike Blumenkrantz 2024-02-27 17:03:56 -05:00 committed by Marge Bot
parent 75f186f3c4
commit 571effdf08

View file

@ -974,8 +974,9 @@ 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) &&
/* this is enum _egl_platform_type */
(disp->Platform == _EGL_PLATFORM_X11 ||
disp->Platform == _EGL_PLATFORM_XCB) &&
!debug_get_bool_option("LIBGL_KOPPER_DRI2", false))
return EGL_FALSE;