shader(opt): update barrier state on Op::VolatileLoad #3106
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!3106
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3106"
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?
@RanoGames on GitHub · 2026-11-29 20:02 UTC · original
RanoGames:fix/opt-barriers-volatile-load→main· +47 −0 · 1 files · 1 commits · openWhat it changes
Fixes
BARRIERSpass handling ofOp::VolatileLoadincrates/victory-shader/src/emit/bitcode/opt.rs:Module::mergepreviously had no match arm forOp::VolatileLoad(ptr), so it fell through to_ => {}instead of updatingbarrierslikeOp::Load(ptr).barriers.adjwas not cleared acrossOp::VolatileLoad, an intervening volatile load between two barriers (such asbarrier(11); VolatileLoad(lds); barrier(9);) falsely triggered adjacent-barrier elimination and deleted the second barrier, whilebarriers.raralso missedSharedGloballoads andUnknownresets.Op::VolatileLoad(ptr)arm that traces the pointer and callsbarriers.on_load(root)whenBARRIERSis enabled (orbarriers.reset()otherwise), without participating inLOADSdeduplication.emit::bitcode::opt::tests::volatile_load_resets_barrier_adjacency_without_deduplicating.How it was tested
BARRIERSeliminatedbarrier(9)afterbarrier(11); Op::VolatileLoad(lds);.Op::VolatileLoadclearsbarriers.adjand updatesbarriers.rarwithout being deduplicated byLOADS.cargo testpassed for the crates it touches: yes (cargo test --locked -p victory-shader --libbarrier tests: 3 passed, 0 failed;cargo xtask policy --stagedpassed)Checked for overlap
VolatileLoad(0 PRs).@dyshay on GitHub · 2026-11-29 20:46 UTC · original
Merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branch
janus-prs). I read the full diff first: no network access, process spawning, binaries, build or dependency changes, or game data. It builds with--profile diag --features diagnostics, and the CPU tests of the touched crates pass. A run on an RTX 4090 is queued (Series S with ray tracing, DLSS Quality). Frame times will follow here.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.