File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,14 @@ impl Compositor {
68
68
69
69
// HACK:
70
70
// 1. If we specifically didn't select an nvidia gpu
71
- // 2. and nobody set an adapter name,
72
- // 3. and the user didn't request the high power pref
71
+ // 2. and the user didn't specifically request an nvidia gpu
72
+ // 3. and the user didn't set an adapter name,
73
+ // 4. and the user didn't request the high power pref
73
74
// => don't load the nvidia icd, as it might power on the gpu in hybrid setups causing severe delays
74
75
#[ cfg( all( unix, not( target_os = "macos" ) , not( target_os = "redox" ) ) ) ]
75
76
if !matches ! ( ids, Some ( ( 0x10de , _) ) )
77
+ && std:: env:: var_os ( "__NV_PRIME_RENDER_OFFLOAD" )
78
+ . is_none_or ( |var| var == "0" )
76
79
&& std:: env:: var_os ( "WGPU_ADAPTER_NAME" ) . is_none ( )
77
80
&& std:: env:: var ( "WGPU_POWER_PREF" ) . as_deref ( ) != Ok ( "high" )
78
81
{
You can’t perform that action at this time.
0 commit comments