Shaders: discover irreducible loops with iterative SCC decomposition #1840
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1840
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@VlREX on GitHub · 2026-11-24 23:11 UTC · original
VlREX:perf/shader-scc-loop-discovery→main· +233 −37 · 1 files · 2 commits · openReplace 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).
@upipibi on GitHub · 2026-11-24 23:16 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 07:25 UTC · original · edited 2026-11-26 00:22 UTC
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
@sinan-cmyk on GitHub · 2026-11-25 12:14 UTC · original
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).
@VlREX on GitHub · 2026-11-25 20:26 UTC · original
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.