shader(opt): update barrier state on Op::VolatileLoad #3106
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by RanoGames on 2026-11-29T20:02:43Z.
What 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).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T20:46:52Z.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.