v0.30.28 — unified resource lifecycle (ADR-056, Rust wgpu parity)
Fixed
-
Resource lifecycle: BindGroup/Pipeline Release() bypasses ref-counting —
Release()calleddq.Defer(lastSubmissionIndex)directly, ignoring the
ResourceRefref-counting system. On shared encoder path, this caused
use-after-free: HAL resource destroyed while GPU still processing commands.
NowRelease()callsref.Drop()— HAL destruction deferred until ALL
refs (user + GPU) are dropped. Matches Rust wgpuArc<BindGroup>pattern.
Applied to: BindGroup, RenderPipeline, ComputePipeline. (#287) -
DestroyQueue deadlock: Triage → onZero → Defer re-entry —
Triage()held mutex while executing callbacks. WhenonZerofired and
calledDefer(), it tried to acquire the same mutex → deadlock. Now
callbacks execute outside the lock. Same fix applied toFlushAll().
Tests
- 6 new lifecycle tests: refcount transitions, Release-before-Submit,
Release-without-Clone, mixed-resource TrackedSubmission, buffer binding scenario