fix(gpu): never downgrade Shadow::watched from GUARDED in update_free and preserve SPARE sort order in send::memory #3947
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3947
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3947"
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?
@qlfu on GitHub · 2026-11-30 12:36 UTC · original
qlfu:pr/fix-shadow-watched-cas-and-send-spare-order→main· +7 −3 · 2 files · 1 commits · closed without mergingSummary
Two small concurrency/invariant bugfixes:
crates/victory-gpu/src/shadow.rs(Shadow::update_free): replace the unconditionalself.watched.store(next, Relaxed)with acompare_exchange(0, 1)whennext == 1, preventing a concurrent thread whose blocks are momentarily resting from downgradingGUARDEDback to1(which would breakShadow::asked_ahead()).crates/victory-gpu/src/host/send.rs(send::memory): usespare.remove(i)instead ofspare.swap_remove(i)soSPAREpreserves its descending-by-size invariant assumed bytrim()andgive_back()(which evict index0/ the largest block).Verification
cargo check -p victory-gpu --all-targets --all-features --locked: exit 0.cargo test -p victory-gpu --lib --locked -- shadow:: host::send:: --test-threads=1: passed (0 failed).git merge-tree --write-tree 41adb551 HEAD: clean merge.@trustno1-coder on GitHub · 2026-12-01 18:47 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed