diff --git a/wgpu/examples/framework.rs b/wgpu/examples/framework.rs index e036ed2aa09..ef5d6af01cb 100644 --- a/wgpu/examples/framework.rs +++ b/wgpu/examples/framework.rs @@ -268,6 +268,10 @@ fn start( ) { let spawner = Spawner::new(); let mut config = wgpu::SurfaceConfiguration::from_size(size.width, size.height); + #[cfg(target_arch = "wasm32")] + { + config.format = surface.get_supported_formats(&adapter)[0]; + } surface.configure(&device, &config); log::info!("Initializing the example...");