From c291a73202107407926d1deb5053a62b1563220a Mon Sep 17 00:00:00 2001 From: Romain Naour Date: Tue, 6 Feb 2024 09:47:10 +0100 Subject: [PATCH] glxext: don't try zink if not enabled in mesa Commit 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers") added an automatic zink fallback even when the zink gallium is not enabled at build time. It leads to unexpected error log while loading drisw driver and zink is not installed on the rootfs: MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so Fixes: 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers") Signed-off-by: Romain Naour Reviewed-by: Antoine Coutant Part-of: (cherry picked from commit 02ab51a61eed8fed5940cf88df71f536ce14f0e2) --- .pick_status.json | 2 +- src/glx/glxext.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index c03b2cfb8a7..b1974ba2455 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4554,7 +4554,7 @@ "description": "glxext: don't try zink if not enabled in mesa", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "7d9ea77b4598e23d4415b529924f1cbdca6e33bd", "notes": null diff --git a/src/glx/glxext.c b/src/glx/glxext.c index fd53e00b4cc..31e85113abf 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -908,9 +908,11 @@ __glXInitialize(Display * dpy) #endif /* HAVE_DRI3 */ if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false)) dpyPriv->dri2Display = dri2CreateDisplay(dpy); +#if defined(HAVE_ZINK) if (!dpyPriv->dri3Display && !dpyPriv->dri2Display) try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) && !getenv("GALLIUM_DRIVER"); +#endif /* HAVE_ZINK */ } #endif /* GLX_USE_DRM */ if (glx_direct)