From cddb2f5d80dc0009b2ef6767635140cacf90a007 Mon Sep 17 00:00:00 2001 From: Sam <16504129+sagudev@users.noreply.github.com> Date: Tue, 15 Sep 2026 13:13:53 +0200 Subject: [PATCH] Ignore timeouts on wasm (#10348) Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- wgpu-core/src/instance.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs index 645408272..3340b64d9 100644 --- a/wgpu-core/src/instance.rs +++ b/wgpu-core/src/instance.rs @@ -880,6 +880,11 @@ impl Surface { Err(WaitIdleError::Device(_)) => { // we can ignore device lost errors here, since we are just cleaning up } + Err(WaitIdleError::Timeout) if cfg!(target_arch = "wasm32") => { + // On wasm, you cannot actually successfully wait for the surface. + // However WebGL does not actually require you do this, so ignoring + // the failure is totally fine. See https://github.com/gfx-rs/wgpu/issues/7363 + } Err(WaitIdleError::Timeout) => { unreachable!("wait_indefinitely() should never timeout") }