Blacksite/docs/adr/0019-local-bevy-render-timeout-patch.md
Rbanh 3e053a81ab
Some checks are pending
CI / Format, lint, test, build (push) Waiting to run
Expand asset browser subasset workflow
2026-06-06 01:38:27 -04:00

1.0 KiB

Status: Accepted

Context

The editor targets Linux desktop sessions where transient swapchain acquire timeouts can occur during heavy GPU work, compositor stalls, or driver hiccups. In upstream bevy_render 0.18.1, prepare_windows treats wgpu::SurfaceError::Timeout as a fatal path. That can crash the editor even though the next frame can often recover.

Decision

Patch bevy_render locally through [patch.crates-io] and vendor the scoped crate copy under third_party/bevy_render. The patch is limited to transient surface acquire timeouts in prepare_windows: log the timeout and skip the frame instead of panicking. Other surface errors remain on their existing paths.

Consequences

The editor is more tolerant of transient Linux swapchain stalls while preserving the current Bevy API surface for the rest of the workspace.

The vendor patch must be reviewed during every Bevy upgrade and removed once upstream behavior is sufficient. Keep the diff narrow; do not use the vendored crate for unrelated render changes.