diff --git a/player/src/bin/play.rs b/player/src/bin/play.rs index e06bd18568..2f67b47981 100644 --- a/player/src/bin/play.rs +++ b/player/src/bin/play.rs @@ -69,7 +69,7 @@ fn main() { let adapter = global .request_adapter( &wgc::instance::RequestAdapterOptions { - power_preference: wgt::PowerPreference::Default, + power_preference: wgt::PowerPreference::LowPower, #[cfg(feature = "winit")] compatible_surface: Some(surface), #[cfg(not(feature = "winit"))] diff --git a/player/tests/test.rs b/player/tests/test.rs index 21d83e34fe..3f52ff193e 100644 --- a/player/tests/test.rs +++ b/player/tests/test.rs @@ -174,7 +174,7 @@ impl Corpus { } let adapter = match global.request_adapter( &wgc::instance::RequestAdapterOptions { - power_preference: wgt::PowerPreference::Default, + power_preference: wgt::PowerPreference::LowPower, compatible_surface: None, }, wgc::instance::AdapterInputs::IdSet( diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs index 515024ffc0..ae6c5fe881 100644 --- a/wgpu-core/src/instance.rs +++ b/wgpu-core/src/instance.rs @@ -501,9 +501,7 @@ impl Global { } let preferred_gpu = match desc.power_preference { - PowerPreference::Default | PowerPreference::LowPower => { - integrated.or(other).or(discrete).or(virt) - } + PowerPreference::LowPower => integrated.or(other).or(discrete).or(virt), PowerPreference::HighPerformance => discrete.or(other).or(integrated).or(virt), }; diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index a2df03f5bc..8418fb6eaa 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -57,17 +57,15 @@ pub enum Backend { #[cfg_attr(feature = "trace", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] pub enum PowerPreference { - /// Prefer low power when on battery, high performance when on mains. - Default = 0, /// Adapter that uses the least possible power. This is often an integerated GPU. - LowPower = 1, + LowPower = 0, /// Adapter that has the highest performance. This is often a discrete GPU. - HighPerformance = 2, + HighPerformance = 1, } impl Default for PowerPreference { fn default() -> Self { - Self::Default + Self::LowPower } }