snap: make anbox work on systems with GLVND

Systems with GLVND load the actual EGL implementation in a different way
when the GL driver is dlopen'ed and therefor we need to tell GLVND which
vendor implementations are available on the system. As snapd is not yet
exposing this to the snap we have to ship a small set of configs on our
own until that is fixed.
This commit is contained in:
Simon Fels 2018-05-16 07:25:13 +02:00
commit 31c64f0a19
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{
"file_format_version" : "1.0.0",
"ICD" : {
"library_path" : "libEGL_nvidia.so.0"
}
}

6
data/glvnd/50_mesa.json Normal file
View file

@ -0,0 +1,6 @@
{
"file_format_version" : "1.0.0",
"ICD" : {
"library_path" : "libEGL_mesa.so.0"
}
}

View file

@ -22,4 +22,11 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SNAP/lib
# launchers.
export XDG_DATA_HOME="$SNAP_USER_COMMON/app-data"
# In order to support GLVND based systems we need to work around a bug in snapd
# as it does not yet expose the EGL vendor configurations from the host to snaps.
# As long as this isn't fixed we have to carry a set of configs on our own which
# may map to the host. GLVND will handle situation properly where a vendor is
# configured but the actual EGL implementation is missing.
export __EGL_VENDOR_LIBRARY_DIRS="$SNAP/glvnd"
exec $SNAP/usr/bin/anbox $@