aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <pcmsinan@gmail.com>2023-02-18 11:07:18 +0530
committersinanmohd <pcmsinan@gmail.com>2023-02-18 12:22:31 +0530
commit7cee8aa5eadafb01b8c68fd44b1b2b00a8bddf73 (patch)
tree1a186e42e98d75bed63c08fde49ab77528083f96
parent53759a69e132bd1fec21304426a93cd4bcff9bed (diff)
optimization: speed up the game launching if uptodate vulkan translation is already installed
-rwxr-xr-xsoibox18
1 files changed, 16 insertions, 2 deletions
diff --git a/soibox b/soibox
index 4614890..20b9989 100755
--- a/soibox
+++ b/soibox
@@ -340,9 +340,10 @@ setup_dxvk()
: "${1:?}"
dl_path=
dxvk_exe=
+ d3d11_dxvk=
+ d3d11_prefix="${WINEPREFIX}/dosdevices/c:/windows/system32/d3d11.dll"
dxvk_sh="https://gist.githubusercontent.com/doitsujin/1652e0e3382f0e0ff611e70142684d01/raw/setup_dxvk.sh"
export WINE_LARGE_ADDRESS_AWARE=1
-
dep_check "wine"
[ "$loglevel" = 3 ] &&
@@ -356,6 +357,10 @@ setup_dxvk()
fi
dxvk_exe="$(find "$dl_path" -type f -name setup_dxvk.sh)"
+ d3d11_dxvk="$(find "$dl_path" -type f -name d3d11.dll | grep -m1 x64)"
+
+ diff "$d3d11_dxvk" "$d3d11_prefix" > /dev/null 2>&1 &&
+ return
# author removed setup_dxvk.sh in v2.1
if [ -z "$dxvk_exe" ]
@@ -375,6 +380,8 @@ setup_dxvk()
fi
unset dxvk_exe
+ unset d3d11_dxvk
+ unset d3d11_prefix
unset dxvk_sh
unset dl_path
}
@@ -385,7 +392,8 @@ setup_vkd3d()
: "${1:?}"
dl_path=
vkd3d_exe=
-
+ d3d12_vkd3d=
+ d3d12_prefix="${WINEPREFIX}/dosdevices/c:/windows/system32/d3d12.dll"
dep_check "wine"
[ "$loglevel" = 3 ] &&
@@ -399,6 +407,10 @@ setup_vkd3d()
fi
vkd3d_exe="$(find "$dl_path" -type f -name setup_vkd3d_proton.sh)"
+ d3d12_vkd3d="$(find "$dl_path" -type f -name d3d12.dll | grep -m1 x64)"
+
+ diff "$d3d12_vkd3d" "$d3d12_prefix" > /dev/null 2>&1 &&
+ return
if [ "$loglevel" != 3 ]
then
@@ -408,6 +420,8 @@ setup_vkd3d()
fi
unset vkd3d_exe
+ unset d3d12_prefix
+ unset d3d12_vkd3d
unset dl_path
}