From 85338ceaf26d3dddc9e555fbb4028c3f8802c034 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 27 Feb 2024 17:03:56 -0500 Subject: [PATCH] egl/dri2: use the right egl platform enum this is otherwise completely broken and allows loading zink in all cases Fixes: 0fd066a1d7f ("egl: only check dri3 on X11") Acked-by: Daniel Stone Part-of: (cherry picked from commit 571effdf087ac3a62f62227fd157f808135885a6) --- .pick_status.json | 2 +- src/egl/drivers/dri2/egl_dri2.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7c16ce6519b..0e40785f046 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 992f0e3d46d..988a655d82b 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -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;