diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-22 14:20:40 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-22 14:20:40 +0200 |
| commit | 1301d027e94effbf329f9c1e9b6e937f58aa1a81 (patch) | |
| tree | 9446ada311884d6beedd85065fd9df67340b8d4f /rust/crates/gpu/src/context.rs | |
| parent | f5f31b43df9ef46f1afdd63ba759b2f9bd80e7a3 (diff) | |
| download | opencut-1301d027e94effbf329f9c1e9b6e937f58aa1a81.tar.gz | |
fix: wasm WebGL only until WebGPU is fixed
Diffstat (limited to 'rust/crates/gpu/src/context.rs')
| -rw-r--r-- | rust/crates/gpu/src/context.rs | 19 |
1 files 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))) } |
