Skip to content

The open-source CapCut alternative

fix: wasm WebGL only until WebGPU is fixed

Maze Winther1301d027e94e
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)))
}