Commit 5fdcf624 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'check-vulkan-driver' of https://github.com/Boria138/PortWINE into…

Merge branch 'check-vulkan-driver' of https://github.com/Boria138/PortWINE into Boria138-check-vulkan-driver
parents 864fe3a0 996fbfdd
......@@ -124,8 +124,8 @@ start_portwine () {
export INTEL_DEBUG=norbc
fi
if [[ "${PW_GPU_USE}" != "disabled" ]] ; then
PW_vendorID="$(vulkaninfo 2>/dev/null | grep -B3 "${PW_GPU_USE}" | grep vendorID | awk -F'0x' '{print $2}')"
PW_deviceID="$(vulkaninfo 2>/dev/null | grep -B3 "${PW_GPU_USE}" | grep deviceID | awk -F'0x' '{print $2}')"
PW_vendorID="$(vulkaninfo --summary 2>/dev/null | grep -B3 "${PW_GPU_USE}" | grep vendorID | awk -F'0x' '{print $2}')"
PW_deviceID="$(vulkaninfo --summary 2>/dev/null | grep -B3 "${PW_GPU_USE}" | grep deviceID | awk -F'0x' '{print $2}')"
PW_ID_VIDEO="--prefer-vk-device ${PW_vendorID}:${PW_deviceID}"
else
unset PW_ID_VIDEO
......@@ -775,7 +775,8 @@ create_new_dir "${PORT_WINE_TMP_PATH}"/mono
export PW_VULKAN_DIR="${PORT_WINE_TMP_PATH}/VULKAN"
create_new_dir "${PW_VULKAN_DIR}"
export VULKAN_API_DRIVER_VERSION="$(vulkaninfo 2>/dev/null | grep "api" | head -n 1 | awk '{print $3}')"
export VULKAN_API_DRIVER_VERSION="$(vulkaninfo --summary 2>/dev/null | grep "api" | head -n 1 | awk '{print $3}')"
export VULKAN_DRIVER_NAME="$(vulkaninfo --summary 2>/dev/null | grep driverName | awk '{print$3}' | head -1)"
export LSPCI_VGA="$(lspci -k | grep -E 'VGA|3D' | tr -d '\n')"
cd "${PORT_SCRIPTS_PATH}"
......
......@@ -28,6 +28,10 @@ if [[ "${XDG_SESSION_TYPE}" = "wayland" ]] && [[ ! -f "${PORT_WINE_TMP_PATH}/che
echo "1" > "${PORT_WINE_TMP_PATH}/check_wayland"
fi
if [[ -z "$VULKAN_DRIVER_NAME" ]] || [[ "$VULKAN_DRIVER_NAME" == "llvmpipe" ]] ; then
zenity_info "Attention working version of vulkan not detected!\nIt is recommended to run games in OpenGL (low performance possible)!"
fi
if [[ -f "${PORT_WINE_TMP_PATH}/tmp_main_gui_size" ]] && [[ ! -z "$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size)" ]] ; then
export PW_MAIN_SIZE_W="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $1}')"
export PW_MAIN_SIZE_H="$(cat ${PORT_WINE_TMP_PATH}/tmp_main_gui_size | awk '{print $2}')"
......@@ -558,10 +562,10 @@ do
export DIST_ADD_TO_GUI="${DIST_ADD_TO_GUI}!${DAIG}"
done
if [[ $VULKAN_API_DRIVER_VERSION == 1.[1-2].* ]]
then check_variables PW_VULKAN_USE "1"
else check_variables PW_VULKAN_USE "2"
fi
# if [[ $VULKAN_API_DRIVER_VERSION == 1.[1-2].* ]]
# then check_variables PW_VULKAN_USE "1"
# else check_variables PW_VULKAN_USE "2"
# fi
check_nvidia_rtx && check_variables PW_VULKAN_USE "2"
case "${PW_VULKAN_USE}" in
......
......@@ -170,7 +170,7 @@ pw_gui_for_edit_db () {
GPU_VAR="disabled"
fi
GET_GPU_NAMES=$(vulkaninfo 2>/dev/null | awk -F '=' '/deviceName/{print $2}' | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!')
GET_GPU_NAMES=$(vulkaninfo --summary 2>/dev/null | awk -F '=' '/deviceName/{print $2}' | sed '/llvm/d'| sort -u | sed 's/^ //' | paste -sd '!')
GET_REFRASH_RATE="30!45!60!75!120!144!165!240"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment