From ac1a2c1ebc4543597d4b523f41c15a5dfff6ebb8 Mon Sep 17 00:00:00 2001 From: darkweird Date: Thu, 20 Jul 2023 21:39:39 +0300 Subject: [PATCH] fix: choose high performance adapter for our game. wgpu's PowerPreference::default() provide LowPower device by default --- core-rust/natives/src/window_surface.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-rust/natives/src/window_surface.rs b/core-rust/natives/src/window_surface.rs index 7ba0b2f..3d68fc7 100644 --- a/core-rust/natives/src/window_surface.rs +++ b/core-rust/natives/src/window_surface.rs @@ -29,7 +29,7 @@ impl WindowSurface { pub async fn new(instance: &wgpu::Instance, surface: wgpu::Surface ) -> WindowSurface { let adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::PowerPreference::default(), + power_preference: wgpu::PowerPreference::HighPerformance, force_fallback_adapter: false, // Request an adapter which can render to our surface compatible_surface: Some(&surface),