@@ -96,21 +96,13 @@ pub fn linux_hardware_checks() {
9696}
9797
9898fn linux_gpu_checks ( device_infos : & [ ( & wgpu:: Adapter , DeviceInfo ) ] ) {
99- let have_igpu = device_infos. iter ( ) . any ( |gpu| {
99+ let have_intel_igpu = device_infos. iter ( ) . any ( |gpu| {
100100 gpu. 1
101- == DeviceInfo :: Amd {
101+ == DeviceInfo :: Intel {
102102 device_type : wgpu:: DeviceType :: IntegratedGpu ,
103103 }
104- || gpu. 1
105- == DeviceInfo :: Intel {
106- device_type : wgpu:: DeviceType :: IntegratedGpu ,
107- }
108104 } ) ;
109- debug ! ( "have_igpu: {}" , have_igpu) ;
110-
111- let have_nvidia_dgpu = device_infos. iter ( ) . any ( |gpu| gpu. 1 == DeviceInfo :: Nvidia ) ;
112- debug ! ( "have_nvidia_dgpu: {}" , have_nvidia_dgpu) ;
113-
105+ debug ! ( "have_intel_igpu: {}" , have_intel_igpu) ;
114106 let have_amd_igpu = device_infos. iter ( ) . any ( |gpu| {
115107 gpu. 1
116108 == DeviceInfo :: Amd {
@@ -119,6 +111,12 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) {
119111 } ) ;
120112 debug ! ( "have_amd_igpu: {}" , have_amd_igpu) ;
121113
114+ let have_igpu = have_intel_igpu || have_amd_igpu;
115+ debug ! ( "have_igpu: {}" , have_igpu) ;
116+
117+ let have_nvidia_dgpu = device_infos. iter ( ) . any ( |gpu| gpu. 1 == DeviceInfo :: Nvidia ) ;
118+ debug ! ( "have_nvidia_dgpu: {}" , have_nvidia_dgpu) ;
119+
122120 let have_amd_dgpu = device_infos. iter ( ) . any ( |gpu| {
123121 gpu. 1
124122 == DeviceInfo :: Amd {
@@ -138,7 +136,8 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) {
138136 if is_any_amd_driver_invalid {
139137 error ! ( "Amdvlk or amdgpu-pro vulkan drivers detected, SteamVR may not function properly. \
140138 Please remove them or make them unavailable for SteamVR and games you're trying to launch. \
141- For more detailed info visit wiki: https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#artifacting-no-steamvr-overlay-or-graphical-glitches-in-streaming-view")
139+ For more detailed info visit wiki: \
140+ https://github.com/alvr-org/ALVR/wiki/Linux-Troubleshooting#artifacting-no-steamvr-overlay-or-graphical-glitches-in-streaming-view")
142141 }
143142 }
144143
@@ -162,19 +161,22 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) {
162161 let mut vrmonitor_path_written = false ;
163162 if have_igpu {
164163 if have_nvidia_dgpu {
164+ let nv_options = "__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \
165+ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json";
166+
165167 warn ! (
166- "For functioning VR you need to put following line into SteamVR commandline options and restart it:"
168+ "For functioning VR you need to put the following line into SteamVR commandline options and restart it:"
167169 ) ;
168- warn ! ( "__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only \
169- VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json {} %command%", vrmonitor_path_string) ;
170+ warn ! ( "{nv_options} {vrmonitor_path_string} %command%" ) ;
170171 warn ! ( "And similar commandline to ALL games commandline option you're trying to launch from steam: \
171- __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json %command%") ;
172+ {nv_options} %command%") ;
173+
172174 vrmonitor_path_written = true ;
173175 } else if have_intel_dgpu || have_amd_dgpu {
174176 warn ! (
175- "For functioning VR you need to put following line into SteamVR commandline options and restart it:"
177+ "For functioning VR you need to put the following line into SteamVR commandline options and restart it:"
176178 ) ;
177- warn ! ( "DRI_PRIME=1 {} %command%" , vrmonitor_path_string ) ;
179+ warn ! ( "DRI_PRIME=1 {vrmonitor_path_string } %command%" ) ;
178180 warn ! ( "And similar commandline to ALL games commandline options you're trying to launch from stean:" ) ;
179181 warn ! ( "DRI_PRIME=1 %command%" ) ;
180182 vrmonitor_path_written = true ;
@@ -185,8 +187,7 @@ fn linux_gpu_checks(device_infos: &[(&wgpu::Adapter, DeviceInfo)]) {
185187 }
186188 if !vrmonitor_path_written {
187189 warn ! (
188- "Make sure you have set following line in your SteamVR commandline options and restart it: {} %command%" ,
189- vrmonitor_path_string
190+ "Make sure you have put the following line in your SteamVR commandline options and restart it: {vrmonitor_path_string} %command%"
190191 )
191192 }
192193}
0 commit comments