mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix: wasm WebGL only until WebGPU is fixed
This commit is contained in:
@@ -184,16 +184,17 @@ impl GpuContext {
|
|||||||
),
|
),
|
||||||
GpuError,
|
GpuError,
|
||||||
> {
|
> {
|
||||||
let instance = wgpu::util::new_instance_with_webgpu_detection(
|
// Temporary fix: force the wasm renderer onto the WebGL backend even when
|
||||||
wgpu::InstanceDescriptor::new_without_display_handle(),
|
// WebGPU is available while a WebGPU bug is being investigated.
|
||||||
)
|
// let instance = wgpu::util::new_instance_with_webgpu_detection(
|
||||||
.await;
|
// wgpu::InstanceDescriptor::new_without_display_handle(),
|
||||||
|
// )
|
||||||
match Self::try_request_device(&instance, None).await {
|
// .await;
|
||||||
Ok((adapter, device, queue)) => return Ok((instance, adapter, device, queue, None)),
|
|
||||||
Err(_) => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 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?;
|
let (gl_instance, adapter, device, queue, canvas) = Self::try_gl_fallback().await?;
|
||||||
Ok((gl_instance, adapter, device, queue, Some(canvas)))
|
Ok((gl_instance, adapter, device, queue, Some(canvas)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user