mirror of
https://github.com/zed-industries/zed.git
synced 2026-10-28 08:55:27 +08:00
gpui_wgpu: Fix WebGL surface reconfiguration panics (#66190)
## Summary Advance wgpu from `3b3506e` to `cddb2f5` to adopt gfx-rs/wgpu#10348 (reported in gfx-rs/wgpu#10341). Keep the shader-validation Naga dependency at the same revision. The lockfile changes only the sources of the 13 wgpu-family packages; package versions and other dependency selections are unchanged. WebGL fence waits use a zero timeout because browsers do not support an indefinite client wait. A fence can therefore legitimately time out while GPU work is pending. The old surface reconfiguration path treats that timeout as unreachable and traps; the upstream fix handles it without weakening the native teardown behavior. This revision also retains the Vulkan teardown fix that required the existing Git dependency. ## Verification - `cargo test --locked -p gpui_wgpu --lib valid_wgsl`: all three shader validation tests pass. - `cargo tree --locked -p gpui_wgpu --target all --depth 1`: runtime wgpu and shader-validation Naga resolve to the same revision. - Minimal real Chromium/SwiftShader Wasm reproduction: the original dependency traps at `wgpu-core/src/instance.rs:884` during repeated present/reconfigure operations; the fixed dependency completes all 20 iterations. - Downstream optimized Wasm build and Chromium WebGPU/WebGL start-and-resize smoke tests passed using this exact Zed branch commit. - Negative control: forcing the old wgpu dependency in the same app makes the retained WebGL smoke test fail; the browser trace starts with the exact `instance.rs:884:25` / `wait_indefinitely() should never timeout` panic. Restoring the fixed dependency makes both backend cases pass again. ## Review status Draft only; do not land automatically. The repository-required README review marker is intentionally left for human removal. This branch starts at the downstream consumer's existing Zed pin, so its eventual dependency update need not include unrelated intervening changes. Release Notes: - [GPUI] Fixed WebGL surface reconfiguration panics when resizing while GPU work is pending. --------- Co-authored-by: Tom Houlé <tom@tomhoule.com>
This commit is contained in:
1 parent
e4a3732b94
commit
24a2823456
3 files changed
+16
-16
No files matched your search
Generated
+13
-13
@@ -11096,7 +11096,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a"
|
||||
[[package]]
|
||||
name = "naga"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set 0.11.1",
|
||||
@@ -11121,7 +11121,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "naga-types"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"hashbrown 0.17.1",
|
||||
"indexmap 2.14.0",
|
||||
@@ -20477,7 +20477,7 @@ checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3"
|
||||
[[package]]
|
||||
name = "wgpu"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags 2.13.1",
|
||||
@@ -20505,7 +20505,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-core"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bit-set 0.11.1",
|
||||
@@ -20540,7 +20540,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-apple"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
@@ -20548,7 +20548,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-emscripten"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
@@ -20556,7 +20556,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-linux-android-bsd"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
@@ -20564,7 +20564,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-wasm"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
@@ -20572,7 +20572,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-core-deps-windows"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"wgpu-hal",
|
||||
]
|
||||
@@ -20580,7 +20580,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-hal"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"arrayvec",
|
||||
@@ -20632,7 +20632,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-naga-bridge"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"naga",
|
||||
"wgpu-types",
|
||||
@@ -20641,7 +20641,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-sync"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"lock_api",
|
||||
@@ -20654,7 +20654,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "wgpu-types"
|
||||
version = "30.0.0"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=3b3506ea31154edc04de64debda0e780cba2639c#3b3506ea31154edc04de64debda0e780cba2639c"
|
||||
source = "git+https://github.com/gfx-rs/wgpu?rev=cddb2f5d80dc0009b2ef6767635140cacf90a007#cddb2f5d80dc0009b2ef6767635140cacf90a007"
|
||||
dependencies = [
|
||||
"bitflags 2.13.1",
|
||||
"bytemuck",
|
||||
|
||||
+2
-2
@@ -999,8 +999,8 @@ web-sys = "0.3"
|
||||
web-time = "1.1.0"
|
||||
webpki-roots = "1.0.10"
|
||||
webrtc-sys = "0.3.23"
|
||||
# 30.0.1 lacks the Vulkan surface-drop panic fix: https://github.com/gfx-rs/wgpu/pull/10230.
|
||||
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "3b3506ea31154edc04de64debda0e780cba2639c", default-features = false }
|
||||
# 30.0.1 lacks the Vulkan surface-drop fix (wgpu#10230) and WebGL resize fix (wgpu#10348).
|
||||
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "cddb2f5d80dc0009b2ef6767635140cacf90a007", default-features = false }
|
||||
which = "8"
|
||||
windows-core = "0.62"
|
||||
windows-registry = "0.6.0"
|
||||
|
||||
@@ -56,7 +56,7 @@ criterion.workspace = true
|
||||
gpui = { workspace = true, features = ["bench-support"] }
|
||||
image.workspace = true
|
||||
# Validate shaders with the same Naga revision that wgpu uses at runtime.
|
||||
naga = { git = "https://github.com/gfx-rs/wgpu", rev = "3b3506ea31154edc04de64debda0e780cba2639c", features = ["wgsl-in"] }
|
||||
naga = { git = "https://github.com/gfx-rs/wgpu", rev = "cddb2f5d80dc0009b2ef6767635140cacf90a007", features = ["wgsl-in"] }
|
||||
|
||||
[[bench]]
|
||||
name = "layout_line"
|
||||
|
||||
Reference in new issue
Block a user