Skip to content

Commit 0ce6a2d

Browse files
authored
Merge pull request #876 from Cupnfish/master
Add a primary backend that can be set
2 parents 70ee917 + 88defb6 commit 0ce6a2d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

wgpu/src/settings.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ impl Settings {
4747
/// - `dx11`
4848
/// - `gl`
4949
/// - `webgpu`
50+
/// - `primary`
5051
pub fn from_env() -> Self {
5152
Settings {
5253
internal_backend: backend_from_env()
@@ -78,6 +79,7 @@ fn backend_from_env() -> Option<wgpu::BackendBit> {
7879
"dx11" => wgpu::BackendBit::DX11,
7980
"gl" => wgpu::BackendBit::GL,
8081
"webgpu" => wgpu::BackendBit::BROWSER_WEBGPU,
82+
"primary" => wgpu::BackendBit::PRIMARY,
8183
other => panic!("Unknown backend: {}", other),
8284
}
8385
})

0 commit comments

Comments
 (0)