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>
(cherry picked from commit 571effdf08)
This commit is contained in:
Mike Blumenkrantz 2024-02-27 17:03:56 -05:00 committed by Eric Engestrom
parent a2c0e08b45
commit 85338ceaf2
2 changed files with 4 additions and 3 deletions

View file

@ -3374,7 +3374,7 @@
"description": "egl/dri2: use the right egl platform enum",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "0fd066a1d7f64011fed63c64a1d3e3757ba5a55b",
"notes": null

View file

@ -1072,8 +1072,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;