switch to `Backends::PRIMARY`

0.19
Benjamin Hansen 2 months ago
parent 3e618336bd
commit 202012b76d

@ -28,7 +28,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -26,7 +26,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -28,7 +28,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -89,7 +89,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -85,7 +85,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -91,7 +91,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -91,7 +91,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -241,7 +241,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -241,7 +241,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -295,7 +295,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -302,7 +302,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -494,7 +494,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -312,7 +312,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -252,7 +252,10 @@ impl<'a> State<'a> {
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
log::warn!("WGPU setup");
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
#[cfg(not(target_arch="wasm32"))]
backends: wgpu::Backends::PRIMARY,
#[cfg(target_arch="wasm32")]
backends: wgpu::Backends::GL,
..Default::default()
});

@ -347,7 +347,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -347,7 +347,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -227,7 +227,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -250,7 +250,7 @@ impl<'a> State<'a> {
#[cfg(target_arch = "wasm32")]
backends: wgpu::Backends::BROWSER_WEBGPU,
#[cfg(not(target_arch = "wasm32"))]
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -228,7 +228,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -166,7 +166,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -36,7 +36,7 @@ impl<'a> Display<'a> {
pub async fn new(window: &'a Window) -> Result<Display<'a>, Error> {
let size = window.inner_size();
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});
let surface = instance.create_surface(window).unwrap();

@ -232,7 +232,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -41,7 +41,7 @@ impl<'a> Render<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -226,7 +226,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

@ -61,7 +61,7 @@ impl<'a> State<'a> {
// The instance is a handle to our GPU
// Backends::all => Vulkan + Metal + DX12 + Browser WebGPU
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: wgpu::Backends::all(),
backends: wgpu::Backends::PRIMARY,
..Default::default()
});

Loading…
Cancel
Save