Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PortWINE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mikhail Tergoev
PortWINE
Commits
6d9ff428
Commit
6d9ff428
authored
2 months ago
by
Mikhail Tergoev
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'add-check_vendor_gpu' of github.com:Htylol/PortWINE into Htylol-add-check_vendor_gpu
parents
40551edd
f3c64820
master
devel
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
9 deletions
+50
-9
functions_helper
data_from_portwine/scripts/functions_helper
+50
-9
No files found.
data_from_portwine/scripts/functions_helper
View file @
6d9ff428
...
@@ -833,6 +833,51 @@ check_selinux () {
...
@@ -833,6 +833,51 @@ check_selinux () {
}
}
export -f check_selinux
export -f check_selinux
check_vendor_gpu () {
unset VENDOR_GPU_USE
if [[
$PW_GPU_USE
!= disabled ]] ; then
case "
${
PW_GPU_USE
,,
}
" in
*nvidia*)
[[ -d /sys/bus/pci/drivers/nvidia ]] && VENDOR_GPU_USE+=("
nvidia
")
[[ -d /sys/bus/pci/drivers/nouveau ]] && VENDOR_GPU_USE+=("
nouveau
")
;;
*amd*)
[[ -d /sys/bus/pci/drivers/amdgpu ]] && VENDOR_GPU_USE+=("
amd
")
;;
*intel*)
[[ -d /sys/bus/pci/drivers/i915 ]] && VENDOR_GPU_USE+=("
intel
")
;;
esac
fi
if command -v glxinfo &>/dev/null ; then
if [[ ! -f "
${
PW_TMPFS_PATH
}
/glxinfo.tmp
" ]] ; then
glxinfo -B &> "
${
PW_TMPFS_PATH
}
/glxinfo.tmp
"
fi
case "
$(
<
"
${
PW_TMPFS_PATH
}
/glxinfo.tmp"
tr
'[:upper:]'
'[:lower:]'
)
" in
*nvidia*)
[[ -d /sys/bus/pci/drivers/nvidia ]] && VENDOR_GPU_USE+=("
nvidia
")
[[ -d /sys/bus/pci/drivers/nouveau ]] && VENDOR_GPU_USE+=("
nouveau
")
;;
*amd*)
[[ -d /sys/bus/pci/drivers/amdgpu ]] && VENDOR_GPU_USE+=("
amd
")
;;
*intel*)
[[ -d /sys/bus/pci/drivers/i915 ]] && VENDOR_GPU_USE+=("
intel
")
;;
esac
fi
if [[ -z
${
VENDOR_GPU_USE
[0]
}
]] ; then
[[ -d /sys/bus/pci/drivers/nvidia ]] && VENDOR_GPU_USE+=("
nvidia
")
[[ -d /sys/bus/pci/drivers/nouveau ]] && VENDOR_GPU_USE+=("
nouveau
")
[[ -d /sys/bus/pci/drivers/amdgpu ]] && VENDOR_GPU_USE+=("
amd
")
[[ -d /sys/bus/pci/drivers/i915 ]] && VENDOR_GPU_USE+=("
intel
")
fi
echo "
${
VENDOR_GPU_USE
[*]
}
"
}
background_pid () {
background_pid () {
local arg1 arg2 arg3 PID
local arg1 arg2 arg3 PID
arg1=
$1
# --start или --end
arg1=
$1
# --start или --end
...
@@ -3267,11 +3312,7 @@ start_portwine () {
...
@@ -3267,11 +3312,7 @@ start_portwine () {
fi
fi
#https://github.com/flathub/net.lutris.Lutris/pull/368#issuecomment-1751381312
#https://github.com/flathub/net.lutris.Lutris/pull/368#issuecomment-1751381312
if
[[
"
${
PW_GPU_USE
,,
}
"
=
~ nvidia
]]
\
[[
$(
check_vendor_gpu
)
=
~ nvidia
]]
&&
export
WEBKIT_DISABLE_DMABUF_RENDERER
=
1
||
[[
$(
glxinfo |
grep
"OpenGL renderer"
|
grep
-i
nvidia
)
]]
then
export
WEBKIT_DISABLE_DMABUF_RENDERER
=
1
fi
if
check_gamescope_session
;
then
if
check_gamescope_session
;
then
export
PW_GAMEMODERUN_SLR
=
""
export
PW_GAMEMODERUN_SLR
=
""
...
@@ -3464,7 +3505,7 @@ start_portwine () {
...
@@ -3464,7 +3505,7 @@ start_portwine () {
then
then
export
LIBGL_KOPPER_DRI2
=
"1"
export
LIBGL_KOPPER_DRI2
=
"1"
fi
fi
if
[[
-d
/sys/bus/pci/drivers/
nouveau
]]
;
then
if
[[
$(
check_vendor_gpu
)
=
~
nouveau
]]
;
then
export
NOUVEAU_USE_ZINK
=
"1"
export
NOUVEAU_USE_ZINK
=
"1"
fi
fi
;;
;;
...
@@ -3981,7 +4022,7 @@ start_portwine () {
...
@@ -3981,7 +4022,7 @@ start_portwine () {
||
check_gamescope_session
||
check_gamescope_session
then
then
export
vk_xwayland_wait_ready
=
"false"
export
vk_xwayland_wait_ready
=
"false"
if
[[
-d
/sys/bus/pci/drivers/amdgpu
]]
;
then
if
[[
$(
check_vendor_gpu
)
=
~ amd
]]
;
then
export
RADV_DEBUG+
=
"nodcc "
export
RADV_DEBUG+
=
"nodcc "
export
AMD_DEBUG
=
"nodcc"
export
AMD_DEBUG
=
"nodcc"
if
[[
!
$(
<
"
${
PW_TMPFS_PATH
}
/vulkaninfo.tmp"
)
=
~ VK_EXT_image_drm_format_modifier
]]
;
then
if
[[
!
$(
<
"
${
PW_TMPFS_PATH
}
/vulkaninfo.tmp"
)
=
~ VK_EXT_image_drm_format_modifier
]]
;
then
...
@@ -3989,10 +4030,10 @@ start_portwine () {
...
@@ -3989,10 +4030,10 @@ start_portwine () {
grep
-e
'--backend'
"
${
PW_TMPFS_PATH
}
/gamescope.tmp"
&>/dev/null
&&
PW_GS_BACKEND_SDL
=
"1"
grep
-e
'--backend'
"
${
PW_TMPFS_PATH
}
/gamescope.tmp"
&>/dev/null
&&
PW_GS_BACKEND_SDL
=
"1"
fi
fi
fi
fi
if
[[
-d
/sys/bus/pci/drivers/i915
]]
;
then
if
[[
$(
check_vendor_gpu
)
=
~ intel
]]
;
then
export
INTEL_DEBUG
=
"norbc"
export
INTEL_DEBUG
=
"norbc"
fi
fi
if
[[
-d
/sys/bus/pci/drivers/
nvidia
]]
;
then
if
[[
$(
check_vendor_gpu
)
=
~
nvidia
]]
;
then
PW_GAMESCOPE_VARIABLES_BEFORE+
=
"__GL_THREADED_OPTIMIZATIONS=0 "
PW_GAMESCOPE_VARIABLES_BEFORE+
=
"__GL_THREADED_OPTIMIZATIONS=0 "
PW_GAMESCOPE_VARIABLES_AFTER+
=
"__GL_THREADED_OPTIMIZATIONS=1 "
PW_GAMESCOPE_VARIABLES_AFTER+
=
"__GL_THREADED_OPTIMIZATIONS=1 "
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment