|
|
|
@ -247,7 +247,7 @@ impl<'a> State<'a> {
|
|
|
|
|
// BackendBit::PRIMARY => Vulkan + Metal + DX12 + Browser WebGPU
|
|
|
|
|
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
|
|
|
|
|
// UPDATED
|
|
|
|
|
#[cfg(not(target_arch="wasm32"))]
|
|
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
|
|
|
backends: wgpu::Backends::PRIMARY,
|
|
|
|
|
#[cfg(target_arch = "wasm32")]
|
|
|
|
|
backends: wgpu::Backends::BROWSER_WEBGPU,
|
|
|
|
@ -300,7 +300,6 @@ impl<'a> State<'a> {
|
|
|
|
|
desired_maximum_frame_latency: 2,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let texture_bind_group_layout =
|
|
|
|
|
device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
|
|
|
|
|
entries: &[
|
|
|
|
@ -713,9 +712,7 @@ impl<'a> State<'a> {
|
|
|
|
|
|
|
|
|
|
fn render(&mut self) -> Result<(), wgpu::SurfaceError> {
|
|
|
|
|
let output = self.surface.get_current_texture()?;
|
|
|
|
|
let view = output
|
|
|
|
|
.texture
|
|
|
|
|
.create_view(&wgpu::TextureViewDescriptor {
|
|
|
|
|
let view = output.texture.create_view(&wgpu::TextureViewDescriptor {
|
|
|
|
|
format: Some(self.config.format.add_srgb_suffix()),
|
|
|
|
|
..Default::default()
|
|
|
|
|
});
|
|
|
|
|