22
33# hook that checks several potential issues vulkan related
44
5+ # On aarch64 device drivers are all over the place and often they ship with
6+ # modifications not upstreamed to mesa, so we need to allow the host vulkan
7+ if [ " $APPIMAGE_ARCH " = ' aarch64' ]; then
8+ export SHARUN_ALLOW_SYS_VKICD=1
9+ fi
10+
511_err_msg (){
612 >&2 printf ' \033[1;31m%s\033[0m\n' " $* "
713}
@@ -53,15 +59,15 @@ _check_vulkan_json_path() (
5359 implicit_dir=" $_VULKAN_HOOK_DIR " /vulkan/implicit_layer.d
5460 explicit_dir=" $_VULKAN_HOOK_DIR " /vulkan/explicit_layer.d
5561
56- for dep in grep sed mkdir uname ; do
62+ for dep in grep sed mkdir; do
5763 if ! command -v " $dep " 1> /dev/null; then
5864 return 1
5965 fi
6066 done
6167
6268 for f in /usr/share/vulkan/explicit_layer.d/* ; do
6369 if [ -f " $f " ] && layer_path=$( grep -o ' "/usr.*$LIB.*"' " $f " ) ; then
64- for p in lib/" $( uname -m ) " -linux-gnu lib64 lib; do
70+ for p in lib/" $APPIMAGE_ARCH " -linux-gnu lib64 lib; do
6571 test_path=$( echo " $layer_path " | sed " s|\" ||g; s|\$ LIB|$p |" )
6672 if [ -e " $test_path " ]; then
6773 mkdir -p " $explicit_dir "
@@ -77,7 +83,7 @@ _check_vulkan_json_path() (
7783
7884 for f in /usr/share/vulkan/implicit_layer.d/* ; do
7985 if [ -f " $f " ] && layer_path=$( grep -o ' "/usr.*$LIB.*"' " $f " ) ; then
80- for p in lib/" $( uname -m ) " -linux-gnu lib64 lib; do
86+ for p in lib/" $APPIMAGE_ARCH " -linux-gnu lib64 lib; do
8187 test_path=$( echo " $layer_path " | sed " s|\" ||g; s|\$ LIB|$p |" )
8288 if [ -e " $test_path " ]; then
8389 mkdir -p " $implicit_dir "
@@ -95,3 +101,4 @@ _check_vulkan_json_path() (
95101if _check_vulkan_json_path && [ -d " $_VULKAN_HOOK_DIR " ]; then
96102 export XDG_CONFIG_DIRS=" $_VULKAN_HOOK_DIR :${XDG_CONFIG_DIRS:-/ etc/ xdg} "
97103fi
104+
0 commit comments