From c2ff9aea0a9c8d8cd17981f3a8abf3330ad74381 Mon Sep 17 00:00:00 2001 From: Htylol Date: Wed, 23 Jul 2025 23:05:08 +0500 Subject: [PATCH] Improved for dxvk-sarek and new 3d api --- data_from_portwine/scripts/functions_helper | 4 ++-- data_from_portwine/scripts/start.sh | 24 ++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index b0d331ca..585b49d5 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -3949,7 +3949,7 @@ fi 0) rm_from_var CP_WINE_FILES "d3d9 d3d8" ;; - 1|2) + 1|2|6) rm_from_var CP_DXVK_FILES "d3d9 d3d8" ;; esac @@ -5471,7 +5471,7 @@ gui_edit_db () { VKD3D_CB="DCB" DISABLE_EDIT_DB_LIST="PW_VKBASALT PW_VKBASALT_USER_CONF PW_USE_RAY_TRACING PW_USE_OBS_VKCAPTURE PW_USE_GALLIUM_ZINK PW_USE_WINED3D_VULKAN" ;; - 1|2) + 1|2|6) # Sarek, Newest VKD3D_CB="CB" ;; diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index 78a927b6..1fe6a2b1 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -571,17 +571,18 @@ if [[ -f "$portwine_exe" ]] ; then if [[ -z $PW_VULKAN_USE ]] ; then pw_check_vulkan if [[ -f "${PW_TMPFS_PATH}/vulkaninfo.tmp" ]] ; then + unset VULKAN_VERSION_CHECK VULKAN_DRIVER_VERSION VULKAN_DEVICE_NAME count="0" while read -r line ; do [[ $line =~ apiVersion ]] && VULKAN_VERSION_CHECK["$count"]="$line" [[ $line =~ driverVersion ]] && VULKAN_DRIVER_VERSION["$count"]="$line" if [[ $line =~ deviceName ]] ; then - if [[ $line =~ "$PW_GPU_USE" ]] ; then + if [[ $line == *"$PW_GPU_USE"* ]] ; then VULKAN_DEVICE_NAME["$count"]="$PW_GPU_USE" break else if [[ $line =~ llvmpipe ]] ; then - unset VULKAN_VERSION_CHECK["$count"] VULKAN_DRIVER_VERSION["$count"] + unset 'VULKAN_VERSION_CHECK["$count"]' 'VULKAN_DRIVER_VERSION["$count"]' else VULKAN_DEVICE_NAME["$count"]="$line" (( count++ )) @@ -589,14 +590,17 @@ if [[ -f "$portwine_exe" ]] ; then fi fi done < "${PW_TMPFS_PATH}/vulkaninfo.tmp" - if [[ ${VULKAN_VERSION_CHECK[@]} =~ 1.[3-9]+. ]] ; then - if [[ ${VULKAN_DEVICE_NAME[@],,} =~ (amd|intel) && ${VULKAN_DRIVER_VERSION[@]} =~ (2[5-9]|[3-9][0-9]). ]] \ - || [[ ${VULKAN_DEVICE_NAME[@],,} =~ nvidia && ${VULKAN_DRIVER_VERSION[@]} =~ (5[5-9][0-9]|[6-9][0-9][0-9]). ]] ; then - export PW_VULKAN_USE="2" - else - export PW_VULKAN_USE="6" - fi - elif [[ ${VULKAN_VERSION_CHECK[@]} =~ 1.[1-2]. ]] ; then + if [[ ${VULKAN_VERSION_CHECK[*]} =~ 1.[3-9]+. ]] ; then + for number in $(seq 0 $(( ${#VULKAN_VERSION_CHECK[@]} - 1 ))) ; do + if [[ ${VULKAN_DEVICE_NAME[$number],,} =~ (amd|intel) && ${VULKAN_DRIVER_VERSION[$number]} =~ (2[5-9]|[3-9][0-9]). ]] \ + || [[ ${VULKAN_DEVICE_NAME[$number],,} =~ nvidia && ${VULKAN_DRIVER_VERSION[$number]} =~ (5[5-9][0-9]|[6-9][0-9][0-9]). ]] ; then + export PW_VULKAN_USE="2" + break + else + export PW_VULKAN_USE="6" + fi + done + elif [[ ${VULKAN_VERSION_CHECK[*]} =~ 1.[1-2]. ]] ; then export PW_VULKAN_USE="1" fi else