···1# shellcheck shell=bash
203# https://docs.mesa3d.org/envvars.html
4export LIBGL_ALWAYS_SOFTWARE=true
5export LIBGL_DRIVERS_PATH=@mesa@/lib/dri
6000000007# https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md
8export __EGL_VENDOR_LIBRARY_FILENAMES=@mesa@/share/glvnd/egl_vendor.d/50_mesa.json
90000010# https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md
11# glob because the filenames contain an architecture suffix
12# echo is needed to force-expand the glob
···1# shellcheck shell=bash
23+# Mesa: force software rendering
4# https://docs.mesa3d.org/envvars.html
5export LIBGL_ALWAYS_SOFTWARE=true
6export LIBGL_DRIVERS_PATH=@mesa@/lib/dri
78+# GLX
9+# glvnd just does dlopen("libGLX_%s.so"), so we have to resort to
10+# LD_LIBRARY_PATH, which is bad but what can you do.
11+# FIXME: maybe change glvnd to allow specifying this properly
12+export LD_LIBRARY_PATH=@mesa@/lib:${LD_LIBRARY_PATH:-}
13+export __GLX_VENDOR_LIBRARY_NAME=mesa
14+15+# EGL
16# https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md
17export __EGL_VENDOR_LIBRARY_FILENAMES=@mesa@/share/glvnd/egl_vendor.d/50_mesa.json
1819+# GBM
20+export GBM_BACKENDS_PATH=@mesa@/lib/gbm
21+export GBM_BACKEND=dri
22+23+# Vulkan
24# https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md
25# glob because the filenames contain an architecture suffix
26# echo is needed to force-expand the glob