From e6db43987072e62ae146e9b6fe4bc2ef0e519073 Mon Sep 17 00:00:00 2001 From: Downtime Date: Thu, 13 May 2021 16:46:20 +0800 Subject: [PATCH 1/2] Add a primary backend that can be set Add a primary backend that can be set --- wgpu/src/settings.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/wgpu/src/settings.rs b/wgpu/src/settings.rs index abc404dc..4a1bb322 100644 --- a/wgpu/src/settings.rs +++ b/wgpu/src/settings.rs @@ -78,6 +78,7 @@ fn backend_from_env() -> Option { "dx11" => wgpu::BackendBit::DX11, "gl" => wgpu::BackendBit::GL, "webgpu" => wgpu::BackendBit::BROWSER_WEBGPU, + "primary" => wgpu::BackendBit::PRIMARY, other => panic!("Unknown backend: {}", other), } }) From 88defb65caa70688c47a9d4d2d4f51dd97814e01 Mon Sep 17 00:00:00 2001 From: Downtime Date: Fri, 14 May 2021 21:21:25 +0800 Subject: [PATCH 2/2] update doc --- wgpu/src/settings.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/wgpu/src/settings.rs b/wgpu/src/settings.rs index 4a1bb322..6c97d895 100644 --- a/wgpu/src/settings.rs +++ b/wgpu/src/settings.rs @@ -47,6 +47,7 @@ impl Settings { /// - `dx11` /// - `gl` /// - `webgpu` + /// - `primary` pub fn from_env() -> Self { Settings { internal_backend: backend_from_env()