Shaders: discover irreducible loops with iterative SCC decomposition #1838
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1840"
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 Marvisak/VIctory. Originally posted by VlREX on 2026-11-24T23:11:21Z.
Replace repeated CFG reachability searches with iterative Kosaraju SCC decomposition. Preserve original loop selection semantics. Independent Python models matched on 24,096 graph cases. Synthetic 2,048-block graph traversal reduced from 4,194,308 to 4,098 edge examinations. Three Rust regression tests included. Native Rust compilation and real shader benchmarks pending. No proprietary data used. AI-assisted (ChatGPT).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:52:15Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae), cargo test -p victory-shader --locked → 121 passed, 0 failed. GPU execution tests are #[cfg(all(test, windows))] and run only on Windows.Irreducible loops discovered via iterative SCC decomposition: control-flow analysis improvement for loops without natural headers.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-24T23:16:58Z.
NVIDIA run: RTX 3070 8 GB, driver 616.56, plus WARP, Windows 11, debug,
7811cf9(onmain70564ae).cargo test -p victory-shader --locked: 209 passed, 3 failed, 2 ignored. The 3 are #1744's NVIDIA heap-cap failures onmain, so the new loop discovery changes no test result here, the waterfall and loop tests included.AI-assisted (Claude Code). Synthetic tests only.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T07:25:23Z.
Automated triage for the maintainers.
Needs work. The head (
f813235) hasn't changed since the last review, so the verdict stays.On your reply: thanks for the regression run and the benchmark table. Every number in it comes from synthetic CFGs, though, and your own note says real shader-pack timing is still needed. That is the open point. The rewrite of
multi_entry_loop(cyclic_componentsincrates/victory-shader/src/ir.rs) still looks behaviour-preserving, and the outside runs (RTX 3070, and the full-packtranslate --validatewith no count change) back that up. The reason to take 230 lines is still missing.split_irreducibleonly reaches this path afterirreducible_edgefinds an irreducible edge, so please show one of these on the real pack:translatewall time over the pack before and after, ormulti_entry_loop, and the time spent there.If real shaders hardly reach this path, the simpler existing search is better kept.
CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T12:14:56Z.
Offline measurement on a retail dump
Result: no count change against
main.I merged head
7811cf9bontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-25T20:26:05Z.
VIREX - Local regression and performance report
Hardware: Ryzen 5 3600X, Radeon RX 5700 XT
OS: Windows 10 Pro (19045)
Rust: 1.98.1
Regression testing
Identical 63 failing tests on both revisions.
No new observed regressions.
All three additional SCC tests passed.
SM 6.6 availability remains a local limitation.
Release benchmark
2048-block multi-entry scenarios:
All 12 synthetic configurations matched the reference.
Seven alternating-order measurements per configuration,
using median execution times.
Baseline:
70564aePR head:
f813235Benchmark source:
github.com/VlREX/VIREX@b561b22e51These are synthetic algorithm benchmarks, not game FPS.
The acyclic case does not represent the guarded production
call path. Real shader-pack timing remains necessary.
AI-assisted development (ChatGPT).
Benchmarks executed locally using VIREX Test Studio.
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.