-
Notifications
You must be signed in to change notification settings - Fork 0
/
zink
executable file
·54 lines (48 loc) · 1.3 KB
/
zink
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
export __GLX_VENDOR_LIBRARY_NAME=mesa
export __EGL_VENDOR_LIBRARY_FILENAMES=mesa
export MESA_LOADER_DRIVER_OVERRIDE=zink
b=${HOME}/git/zink/build
self=$(basename "$0")
if [ "$self" = "zink" ]; then
self="$1"
shift
fi
export RUSTICL_ENABLE=$self
# normal is zink+radv, but you can ask for:
case "$self" in
radeonsi)
unset MESA_LOADER_DRIVER_OVERRIDE
;;
iris)
unset MESA_LOADER_DRIVER_OVERRIDE
export DRI_PRIME=1
;;
radv)
export RUSTICL_ENABLE=zink
# this doesn't seem to help, or hurt...
# VK_ICD_FILENAMES=$b/src/amd/vulkan/radeon_devenv_icd.x86_64.json
;;
anv)
export RUSTICL_ENABLE=zink
VK_ICD_FILENAMES=$b/src/intel/vulkan/intel_devenv_icd.x86_64.json
;;
lvp)
VK_ICD_FILENAMES=$b/src/gallium/targets/lavapipe/lvp_devenv_icd.x86_64.json
export LIBGL_ALWAYS_SOFTWARE=1
# export LP_CL=1 # doesn't work...
;;
lp)
unset MESA_LOADER_DRIVER_OVERRIDE
export LIBGL_ALWAYS_SOFTWARE=1
;;
*)
echo "usage: zink [anv|iris|radv|radeonsi|lp|lvp] ..."
exit 1
;;
esac
if [ -v VK_ICD_FILENAMES ]; then
exec meson devenv -C "$b" env VK_ICD_FILENAMES=${VK_ICD_FILENAMES} "$@"
else
exec meson devenv -C "$b" "$@"
fi