···11# shellcheck shell=bash
2233+# Mesa: force software rendering
34# https://docs.mesa3d.org/envvars.html
45export LIBGL_ALWAYS_SOFTWARE=true
56export LIBGL_DRIVERS_PATH=@mesa@/lib/dri
6788+# GLX
99+# glvnd just does dlopen("libGLX_%s.so"), so we have to resort to
1010+# LD_LIBRARY_PATH, which is bad but what can you do.
1111+# FIXME: maybe change glvnd to allow specifying this properly
1212+export LD_LIBRARY_PATH=@mesa@/lib:${LD_LIBRARY_PATH:-}
1313+export __GLX_VENDOR_LIBRARY_NAME=mesa
1414+1515+# EGL
716# https://github.com/NVIDIA/libglvnd/blob/master/src/EGL/icd_enumeration.md
817export __EGL_VENDOR_LIBRARY_FILENAMES=@mesa@/share/glvnd/egl_vendor.d/50_mesa.json
9181919+# GBM
2020+export GBM_BACKENDS_PATH=@mesa@/lib/gbm
2121+export GBM_BACKEND=dri
2222+2323+# Vulkan
1024# https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md
1125# glob because the filenames contain an architecture suffix
1226# echo is needed to force-expand the glob