From 95810e75fb0c86e68006fc5029fe78fa5afe341a Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Fri, 11 Dec 2020 14:42:39 +0000 Subject: [PATCH] graphics: Look for Mesa DRI drivers in ${libdir}/xorg/modules/dri Slackware puts DRI drivers here. Partially addresses https://github.com/ValveSoftware/steam-runtime/issues/318 Signed-off-by: Simon McVittie <smcv@collabora.com> --- steam-runtime-tools/graphics.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/steam-runtime-tools/graphics.c b/steam-runtime-tools/graphics.c index 2ffe728da..d2325b0f6 100644 --- a/steam-runtime-tools/graphics.c +++ b/steam-runtime-tools/graphics.c @@ -3749,6 +3749,23 @@ _srt_get_modules_full (const char *sysroot, libdir_driver, is_extra, module, drivers_out); } + if (module == SRT_GRAPHICS_DRI_MODULE) + { + /* Used on Slackware according to + * https://github.com/ValveSoftware/steam-runtime/issues/318 */ + g_autofree gchar *slackware = g_build_filename (libdir, "xorg", + "modules", "dri", + NULL); + + if (!g_hash_table_contains (drivers_set, slackware)) + { + _srt_get_modules_from_path (envp, helpers_path, + multiarch_tuple, slackware, + is_extra, module, drivers_out); + g_hash_table_add (drivers_set, g_steal_pointer (&slackware)); + } + } + if (force_elf_class) { if (g_strcmp0 (force_elf_class, "64") == 0) -- GitLab