dxil: opt-in LICM, barrier dedup, mask recipes, first-lane uniformity (default off) #126
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!126
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-125"
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 13:29 UTC · original
SovietBearz0r:sixmoon-shader-opt→main· +1310 −35 · 11 files · 2 commits · closed without mergingPort sixmoon/Darner's translator improvements as opt-in, default-off switches (existing output and cache keys unchanged; no
TRANSLATOR_VERSIONbump).What
VICTORY_SHADER_OPTbits:opt::LICM = 256(natural-loop detection, dominance/preheader, conditional-entry split; never moves loads — main lacks a volatile tag/in-bounds proof; effect instructions break the chain) andopt::BARRIERS = 512(in-block barrier-state machine: adjacent covered barriers across pure ALU, group-only barrier dropped between LDS read phases bounded by group+TGSM barriers/return, tail-before-ret; loads classified by main's own pointer tracing).DEFAULTstays 63; enable e.g.VICTORY_SHADER_OPT=831(defaults + both).VICTORY_LICM_CBUF: 1 = default — LICM only constant-buffer rows at constant indices; 2 also descriptor handles; 0 neither.VICTORY_MASK_RECIPES=1(off): structure recipes recorded and used by boolean lowering, with cost/decision accounting and acfg(test)equivalence assertion.VICTORY_FIRSTLANE_UNIFORM=1(off): lane-uniform set for exchange-less programs;v_readfirstlanereturns the lane's own VGPR value.VICTORY_LEGACY_FINITE=<bits>(0): assumed-finite bits for legacy-multiply guards (cbuffer/texture/buffer reads, sums+products, joins), applied only in the RDNA legacy-product form.Ported from sixmoon
4480e169(passes credited there to Darner). Skipped: sixmoon'sDEFAULT=ALL(switches theWIDEload lowering on for everyone; main keepsWIDEopt-in and documents no gain on RX 7900 XTX), and its enhanced LOADS/FOLD/finite-data analysis (main has its ownVICTORY_LEGACY_MUL=data).Verification (private target dir — shared one can serve stale cross-worktree binaries)
cargo test -p victory-dxil: 25 passed (3 new: LICM fire/no-fire, BARRIERS coverage + must-not-fire + LDS read-after-read, assumed-finite bits; random-program all-passes equivalence still passes).cargo test -p victory-shader --lib: 321 passed, 2 ignored (~3.5 min), and again withVICTORY_SHADER_OPT=831 VICTORY_MASK_RECIPES=1 VICTORY_FIRSTLANE_UNIFORM=1: 321 passed — end-to-end evidence the non-default paths translate the whole suite identically.cargo check -p victory,cargo xtask policy(439 files), clippy: no warnings in touched code (only main's pre-existing lints).Source: srmooon/sixmoon
4480e169(Darner's passes).@ReTerryDavis on GitHub · 2026-12-05 17:38 UTC · original
Marking this as draft for now. This bundles 5 separate unverified default-off DXIL passes (
+1,492lines across 12 files — LICM, barrier dedup, mask recipes, first-lane uniformity, and the unsoundVICTORY_LEGACY_FINITEassumption) with no in-game visual soak or ReVIctory perf measurements yet, and conflicts directly with #122 inopt.rs. Once individual passes are soaked in-game with real A/B results (ideally split cleanly), happy to take another look.@SovietBearz0r on GitHub · 2026-12-05 19:31 UTC · original
Split cleanly per this review, into four default-off PRs (each rebased on current
main, each independently tested):VICTORY_SHADER_OPTbit 256 (=319= defaults + LICM), sub-switchVICTORY_LICM_CBUF=575), no sub-switchVICTORY_MASK_RECIPES=1VICTORY_FIRSTLANE_UNIFORM=1Also dropped the piece you called out as unsound:
VICTORY_LEGACY_FINITE(the "reads/sums/phis are finite" assumption) is deleted from all four branches and from this umbrella branch. No branch bumpsTRANSLATOR_VERSION;DEFAULTstays 63; only the non-default switches are appended to the shader-cache key.Closing #126 in favour of the four split PRs. Each one's description lists exactly the in-game A/B data you'd need (route/scene, ≥3 runs, avg FPS, 1% low, p50/p95/p99, GPU busy, visual equality, RDNA3/4 + NVIDIA, cold+warm cache; plus per-pass specifics like barriers dropped, i1 delta, lane-read elisions). No in-game data can be produced in this environment.
Pull request closed