Improve how we collect DRI drivers
/cc @denittis
This is not quite ready yet, but the refactoring should be OK to review commit-by-commit.
tests/pressure-vessel/containers.py
is failing on my laptop, because it asserts that "extra" DRI drivers are captured and put into the container, which the old code did, but the new code doesn't; and my laptop has some "extra" DRI drivers in lib32
and lib64
even though they aren't actually used, specifically to try out this stuff. I think the new code is probably correct, and the test needs updating to detect which drivers are considered "extra" and skip them.
-
runtime: Fix an obsolete comment
This hasn't been true since af22427b.
-
runtime: Drop unused argument from try_bind_dri()
-
runtime: Factor out collection of s2tc compatibility shim
-
runtime: Collect s2tc with correct precedence
Because capsule-capture-libs doesn't overwrite existing symbolic links, in the unlikely event that s2tc exists in more than one directory in the search path, we want to look at the highest-precedence first.
The reversed order was correct for the current implementation of collecting DRI drivers, but not for s2tc.
-
graphics: Use g_canonicalize_filename() instead of reinventing it
Now that we have a backport of this function, we don't need to use a simplified version.
-
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
-
tests: Make sure we have the *-inspect-library helpers
We need those to be able to deal with some graphics drivers.
-
runtime: Simplify construction of VA-API search path
Instead of building a list of drivers and then converting it into a search path, we can build the search path as we go. The only side-effect is that previously we interleaved x86_64 and i386 paths, but now we put all the x86_64 paths before all the i386 paths.
-
runtime: Try to avoid putting drivers in multiple numbered directories
We can make life easier for the VA-API and VDPAU driver loaders by trying to put everything in one directory, as we already do for DRI. We might as well do the same for Vulkan and EGL, where the names we choose are completely arbitrary anyway.
-
runtime: Collect DRI drivers in the same way as VA-API drivers
This means we use all the search paths that steam-runtime-tools knows about, and in particular we respect LIBGL_DRIVERS_PATH and a Slackware-specific path.
TODO: Looks like this will miss out on some of the more obscure/odd places where graphics drivers could be lurking, like libQUAL on a Debian system.