From 1301d027e94effbf329f9c1e9b6e937f58aa1a81 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 22 Apr 2026 14:20:40 +0200 Subject: [PATCH] fix: wasm WebGL only until WebGPU is fixed --- rust/crates/gpu/src/context.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/rust/crates/gpu/src/context.rs b/rust/crates/gpu/src/context.rs index 39070ec2..e38eff8c 100644 --- a/rust/crates/gpu/src/context.rs +++ b/rust/crates/gpu/src/context.rs @@ -184,16 +184,17 @@ impl GpuContext { ), GpuError, > { - let instance = wgpu::util::new_instance_with_webgpu_detection( - wgpu::InstanceDescriptor::new_without_display_handle(), - ) - .await; - - match Self::try_request_device(&instance, None).await { - Ok((adapter, device, queue)) => return Ok((instance, adapter, device, queue, None)), - Err(_) => {} - } + // Temporary fix: force the wasm renderer onto the WebGL backend even when + // WebGPU is available while a WebGPU bug is being investigated. + // let instance = wgpu::util::new_instance_with_webgpu_detection( + // wgpu::InstanceDescriptor::new_without_display_handle(), + // ) + // .await; + // match Self::try_request_device(&instance, None).await { + // Ok((adapter, device, queue)) => return Ok((instance, adapter, device, queue, None)), + // Err(_) => {} + // } let (gl_instance, adapter, device, queue, canvas) = Self::try_gl_fallback().await?; Ok((gl_instance, adapter, device, queue, Some(canvas))) }