Update PRIME Render Offload
Added Finer-Grained Control of PRIME Render Offload on Vulkan applications Added automatic activation of PRIME Render Offload when hybrid graphics are detected
This commit is contained in:
parent
0e82a32ef4
commit
42b5885ba2
@ -791,8 +791,9 @@ pw_check_and_download_plugins () {
|
||||
return 0
|
||||
}
|
||||
|
||||
lspci_output=$(lspci | grep VGA)
|
||||
|
||||
nvidia_check_rtx () {
|
||||
lspci_output=$(lspci | grep VGA)
|
||||
if echo "$lspci_output" | grep -i "nvidia" ; then
|
||||
# Turing (without nvidia 16XX)
|
||||
nv_arch=$(echo "$lspci_output" | sed -rn 's/.*(TU[0-9]*).*/\1/p')
|
||||
@ -807,6 +808,14 @@ nvidia_check_rtx () {
|
||||
return 1
|
||||
}
|
||||
|
||||
# Hybrid graphics (Intel + NVIDIA)
|
||||
if echo "$lspci_output" | grep -i "intel" && echo "$lspci_output" | grep -i "nvidia"; then
|
||||
export PW_PRIME_RENDER_OFFLOAD=1
|
||||
# Hybrid graphics (AMD + NVIDIA)
|
||||
elif echo "$lspci_output" | grep -i "amd" && echo "$lspci_output" | grep -i "nvidia"; then
|
||||
export PW_PRIME_RENDER_OFFLOAD=1
|
||||
fi
|
||||
|
||||
pw_init_db () {
|
||||
if [[ ! -z "${portwine_exe}" ]] ; then
|
||||
try_remove_file "${PORT_SCRIPTS_PATH}/portwine_db/setup"
|
||||
|
@ -171,6 +171,7 @@ start_portwine () {
|
||||
|
||||
if [[ "${PW_PRIME_RENDER_OFFLOAD}" == 1 ]] ; then
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user