From fe61d2fd676beea9b0b6b30471fe595f4f88496d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sat, 15 Feb 2020 10:45:45 +0100 Subject: [PATCH] Request high performance adapter if MSAA is enabled --- wgpu/src/window/backend.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wgpu/src/window/backend.rs b/wgpu/src/window/backend.rs index 6f8a0bb0..4c9f289b 100644 --- a/wgpu/src/window/backend.rs +++ b/wgpu/src/window/backend.rs @@ -18,7 +18,11 @@ impl iced_native::window::Backend for Backend { fn new(settings: Self::Settings) -> (Backend, Renderer) { let adapter = wgpu::Adapter::request(&wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::Default, + power_preference: if settings.antialiasing.is_none() { + wgpu::PowerPreference::Default + } else { + wgpu::PowerPreference::HighPerformance + }, backends: wgpu::BackendBit::all(), }) .expect("Request adapter");