Skip to content

Commit 1301d02

Browse files
committed
fix: wasm WebGL only until WebGPU is fixed
1 parent f5f31b4 commit 1301d02

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

rust/crates/gpu/src/context.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,17 @@ impl GpuContext {
184184
),
185185
GpuError,
186186
> {
187-
let instance = wgpu::util::new_instance_with_webgpu_detection(
188-
wgpu::InstanceDescriptor::new_without_display_handle(),
189-
)
190-
.await;
191-
192-
match Self::try_request_device(&instance, None).await {
193-
Ok((adapter, device, queue)) => return Ok((instance, adapter, device, queue, None)),
194-
Err(_) => {}
195-
}
196-
187+
// Temporary fix: force the wasm renderer onto the WebGL backend even when
188+
// WebGPU is available while a WebGPU bug is being investigated.
189+
// let instance = wgpu::util::new_instance_with_webgpu_detection(
190+
// wgpu::InstanceDescriptor::new_without_display_handle(),
191+
// )
192+
// .await;
193+
194+
// match Self::try_request_device(&instance, None).await {
195+
// Ok((adapter, device, queue)) => return Ok((instance, adapter, device, queue, None)),
196+
// Err(_) => {}
197+
// }
197198
let (gl_instance, adapter, device, queue, canvas) = Self::try_gl_fallback().await?;
198199
Ok((gl_instance, adapter, device, queue, Some(canvas)))
199200
}

0 commit comments

Comments
 (0)