Fix panic when EGL fails without reporting an error (#65329)

Pin `khronos-egl` to the Zed fork's defensive error-handling fix for
[FR-522](https://linear.app/zed-industries/issue/FR-522/zed-c82-called-optionunwrap-on-a-none-value).

An EGL call can fail while `eglGetError()` reports `EGL_SUCCESS`. The
binding currently unwraps the missing error, which caused the reported
panic during Wayland surface creation. The fork returns a distinct
`Error::Unreported` instead, preserves real EGL errors, and applies the
same rule consistently to failed-call wrappers.

- Fork commit:
[42214b3](42214b3634).
- Upstream PR:
[timothee-haudebourg/khronos-egl#37](https://github.com/timothee-haudebourg/khronos-egl/pull/37).
- This PR changes only `Cargo.toml` and `Cargo.lock`. Remove the
temporary fork patch once an upstream release includes the fix.

The new public error variant is source-breaking for exhaustive matches,
so the upstream PR explicitly leaves release/versioning to the
maintainer. This integration uses a controlled Git pin and has been
checked against the GLES downstream consumer.

Release Notes:

- [GPUI] Fixed a panic when EGL calls fail without reporting an error.
This commit is contained in:
Ben Brandt 2026-10-08 12:10:16 +00:00 • committed by GitHub
parent 34d68ec5e6
commit 19c69782eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

3
Cargo.lock generated
View file

@ -9378,8 +9378,7 @@ dependencies = [
[[package]]
name = "khronos-egl"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"
source = "git+https://github.com/zed-industries/khronos-egl?rev=42214b36347b108fd9630ca6254b96dde59e04fe#42214b36347b108fd9630ca6254b96dde59e04fe"
dependencies = [
"libc",
"libloading",

View file

@ -995,6 +995,9 @@ libwebrtc = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev =
notify = { git = "https://github.com/zed-industries/notify", rev = "d842f16b2716bd60f09caf3ae3a894237ab38f54" }
notify-types = { git = "https://github.com/zed-industries/notify", rev = "d842f16b2716bd60f09caf3ae3a894237ab38f54" }
webrtc-sys = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "0a1c519cfce9b365229026b55de9b9dbdb6fed3c" }
# Avoid panicking when a failed EGL call reports EGL_SUCCESS.
# https://github.com/timothee-haudebourg/khronos-egl/pull/37
khronos-egl = { git = "https://github.com/zed-industries/khronos-egl", rev = "42214b36347b108fd9630ca6254b96dde59e04fe" }
# corgi runs build.rs/proc-macros in a sandbox with no write access outside the
# action's own OUT_DIR. Upstream `scratch` bakes its build-time OUT_DIR in via