shader/dxil: mark the title-memory page-directory load as a pure read #169
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!169
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-168"
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 20:50 UTC · original
SovietBearz0r:pure-page-dir-loads→main· +123 −19 · 6 files · 1 commits · openxmem #167: the title-memory page-directory (
SLOT_MEMORY) entry load is host-owned memory that no shader store can alias, so it should be marked as a pure read and reused across stores, barriers and loops.What
victory-dxil/src/bitcode.rs: widenedpure_readsdoc +mark_pure(); opt.rs already treatspure_readscall instructions asEffect::Pure.victory-shader/src/emit/lower/memory.rs:mark_pure(entry)on theSLOT_MEMORYdirectory entry load; a test asserts the lowering marks it.TRANSLATOR_VERSION20 -> 21 (the marking changes default translations; one-time cache invalidation).Not covered by default passes: main's
pure_readsonly gets constant-buffer raw reads, and the existingDOM_LOADSreuse is opt-in (DEFAULT = ALL & !(WIDE | DOM_LOADS)). Verified empirically: with the marking removed, the intersect test program reportspure_reads == 0.Verification
cargo test -p victory-dxil --lib: 22 passed;cargo test -p victory-shader --lib: 324 passed, 2 ignored; clippy forvictory-dxil/victory-shaderclean;cargo check -p victory; policy 442 files.victory shadersshould report the changed translations once; rendering unchanged except fewer directory loads.pure-reads-slots) both bumpTRANSLATOR_VERSION20->21 from the same base — merging both needs the second bump to 22 and a trivial conflict inlower/mod.rs/lib.rs.@SovietBearz0r on GitHub · 2026-12-05 21:48 UTC · original
In-game pass done (RX 9070 XT 16 GB, diag build, builtin:cruise): clean run, 0 errors / 0 device-removed / 0 bench errors,
shaders from the cache … hits=3886 misses=0after the first-use cache build (theTRANSLATOR_VERSIONbump translated during loading on this lap; no translation during the measured spots), frame pacing normal (cruise 37.4/40.4 fps in that lap). The new pure-read tests also pass in the full CI runs (Default 1895 / Diagnostics 1906). Log:data\ingame-verify\logs\pureloads.log.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.