always auto set PW_VULKAN_USE if empty

This commit is contained in:
Mikhail Tergoev
2025-07-24 20:09:58 +03:00
parent a8f0badcd1
commit a2acf29a37
2 changed files with 21 additions and 20 deletions

View File

@ -558,6 +558,24 @@ if [[ -f "$portwine_exe" ]] ; then
unset RESTART_PP_USED
gui_userconf
fi
if [[ -z $PW_VULKAN_USE ]] \
|| [[ $PW_VULKAN_USE == [3-5] ]]
then
if [[ -e "/sys/module/nvidia/version" ]] ;then
if [[ $(</sys/module/nvidia/version) > 550.54.13 ]]
then export PW_VULKAN_USE="6"
else export PW_VULKAN_USE="2"
fi
else
background_pid --stop "pw_check_glxinfo" "2"
if [[ $(grep "Version:" "$PW_TMPFS_PATH/glxinfo.tmp" | awk '{print $2}') > 24.9.9 ]]
then export PW_VULKAN_USE="6"
else export PW_VULKAN_USE="2"
fi
fi
fi
if [[ $PW_GUI_DISABLED_CS != 1 ]] ; then
pw_create_gui_png
if ! grep -il "$portwine_exe" "$PORT_WINE_PATH"/*.desktop &>/dev/null ; then
@ -577,23 +595,6 @@ if [[ -f "$portwine_exe" ]] ; then
fi
fi
if [[ -z $PW_VULKAN_USE ]] \
|| [[ $PW_VULKAN_USE == [3-5] ]]
then
if [[ -e "/sys/module/nvidia/version" ]] ;then
if [[ $(</sys/module/nvidia/version) > 550.54.13 ]]
then export PW_VULKAN_USE="6"
else export PW_VULKAN_USE="2"
fi
else
background_pid --stop "pw_check_glxinfo" "2"
if [[ $(grep "Version:" "$PW_TMPFS_PATH/glxinfo.tmp" | awk '{print $2}') > 24.9.9 ]]
then export PW_VULKAN_USE="6"
else export PW_VULKAN_USE="2"
fi
fi
fi
case "$PW_VULKAN_USE" in
0) PW_DEFAULT_VULKAN_USE="$SORT_OPENGL!$SORT_NEWEST!$SORT_STABLE!$SORT_SAREK" ;;
1) PW_DEFAULT_VULKAN_USE="$SORT_SAREK!$SORT_NEWEST!$SORT_STABLE!$SORT_OPENGL" ;;