Merge pull request #876 from Cupnfish/master
Add a primary backend that can be set
This commit is contained in:
commit
0ce6a2db21
@ -47,6 +47,7 @@ impl Settings {
|
|||||||
/// - `dx11`
|
/// - `dx11`
|
||||||
/// - `gl`
|
/// - `gl`
|
||||||
/// - `webgpu`
|
/// - `webgpu`
|
||||||
|
/// - `primary`
|
||||||
pub fn from_env() -> Self {
|
pub fn from_env() -> Self {
|
||||||
Settings {
|
Settings {
|
||||||
internal_backend: backend_from_env()
|
internal_backend: backend_from_env()
|
||||||
@ -78,6 +79,7 @@ fn backend_from_env() -> Option<wgpu::BackendBit> {
|
|||||||
"dx11" => wgpu::BackendBit::DX11,
|
"dx11" => wgpu::BackendBit::DX11,
|
||||||
"gl" => wgpu::BackendBit::GL,
|
"gl" => wgpu::BackendBit::GL,
|
||||||
"webgpu" => wgpu::BackendBit::BROWSER_WEBGPU,
|
"webgpu" => wgpu::BackendBit::BROWSER_WEBGPU,
|
||||||
|
"primary" => wgpu::BackendBit::PRIMARY,
|
||||||
other => panic!("Unknown backend: {}", other),
|
other => panic!("Unknown backend: {}", other),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user