Skip to content
Snippets Groups Projects
Commit ec06735b authored by Simon McVittie's avatar Simon McVittie
Browse files

tests/manual/gl.pl: Provide shortcuts for some plausible defaults


libcapsule seems to work OK for Mesa, so we can seriously consider
using it for that configuration.

With the NVIDIA binary driver, libcapsule crashes horribly; but the
benefit we can get from libcapsule is limited in that case anyway. The
NVIDIA driver is binary-only, so we are going to be using the precompiled
binary that matches the kernel, regardless of whether it was intended
for use with our container's base OS. However, we can assume that NVIDIA
compiled it with conservative glibc and libX11 dependencies, because
if they hadn't, it couldn't work on older OSs and containers anyway; so
we presumably don't really need to pull in newer supporting libraries,
just the NVIDIA blobs.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 62d38ff9
No related branches found
No related tags found
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -239,6 +239,19 @@ A shortcut for B<--gl-stack=/usr/lib/libcapsule/shims> and
B<--libcapsule-provider=/>.
This uses the libcapsule libGL, etc. shims from the host system.
=item --proposed-mesa
Use behaviour proposed as potentially appropriate for the Mesa graphics
stack: B<--gl-provider=/> B<--libcapsule> B<--libc-provider=auto>
B<--x11-provider=auto>.
=item --proposed-nvidia
Use behaviour proposed as potentially appropriate for the NVIDIA graphics
stack, or other binary blobs with conservative dependencies:
B<--gl-provider=/> B<--gl-stack=none> B<--libc-provider=container>
B<--x11-provider=container>.
=back
=cut
......@@ -736,6 +749,20 @@ GetOptions(
'multiarch=s' => sub {
@multiarch_tuples = split /[\s,]+/, $_[1];
},
'proposed-mesa' => sub {
$gl_provider_tree = '/';
$gl_stack = '/usr/lib/libcapsule/shims';
$libcapsule_tree = '/';
$libc_provider_tree = 'auto';
$x11_provider_tree = 'auto';
},
'proposed-nvidia' => sub {
$gl_provider_tree = '/';
$gl_stack = 'nvidia';
$libcapsule_tree = 'container';
$libc_provider_tree = 'container';
$x11_provider_tree = 'container';
},
help => sub {
print <<EOF;
Usage: $0 [OPTIONS] [-- COMMAND]
......@@ -774,6 +801,19 @@ Options:
--multiarch=TUPLE[,TUPLE…] Enable architecture(s) by Debian
multiarch tuple
[x86_64-linux-gnu]
--proposed-mesa Use proposed handling for Mesa:
--gl-provider=/
--libcapsule
--libc-provider=auto
--x11-provider=auto
--libcapsule-provider=auto
--proposed-nvidia Use proposed handling for binary
blob drivers like NVIDIA:
--gl-provider=/
--gl-stack=nvidia
--x11-provider=container
--libc-provider=container
--libcapsule-provider=container
EOF
exit 0;
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment