perf(gpu): lock-free has_pending fast path in Shadow::nothing_new and writes_pending #1134
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1134"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by adwen-007 on 2026-11-28T13:51:34Z.
Problem
Shadow::nothing_newandShadow::writes_pendingare called thousands of times per frame on the hot refresh path and unconditionally acquiredself.pending.lock()even when no shader writes were pending for that shadow buffer.Fix
Track pending state with an
AtomicBool(has_pending, updated alongsideself.pendingunder its mutex) sonothing_newandwrites_pendingskip locking the mutex in the common empty case.Verification
cargo check -p victory-gpupasses cleanly onv2026.11.28.01(63b902f).