shader/emit: mark the SLOT_STRIDES/VIEW_SIZES loads as pure reads #162
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!162
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-161"
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?
@SovietBearz0r on GitHub · 2026-12-05 19:10 UTC · original
SovietBearz0r:pure-reads-slots→main· +38 −4 · 4 files · 1 commits · openThe default-on
pure_readsfix split out of #122 so that PR can stay purely opt-in, per the review there.What
The host's per-view tables (
SLOT_STRIDES,VIEW_SIZES) are immutable for the whole shader invocation, so stores and barriers cannot invalidate those loads for CSE.Lower::slot_dwordnow marks therawBufferLoadof those tables as pure reads:TRANSLATOR_VERSIONgoes 20 → 21 because this changes default translation and the version is part of the shader-cache key (one-time cache invalidation).Verification
cargo test -p victory-shader --lib: 324 passed, 0 failed, 2 ignored (main 323 + the newthe_host_table_loads_are_marked_pure_reads; the test fails with the hunk removed and passes with it).cargo check -p victory;cargo xtask policy442 files;cargo clippy -p victory-shader --all-targets -- -D warnings.DEFAULT = 63and an unchangedTRANSLATOR_VERSION; itsmemory.rs/lib.rsare now byte-identical to main).Source: MiniVI
20be1548(via the longroad/InstCombine lineage).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.