Ignore timeouts on wasm (#10348)

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Sam authored and GitHub committed 2026-09-15 11:13:53 +00:00
1 parent 044e926650
commit cddb2f5d80
1 file changed
+5
+5
View File
@@ -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")
}