Shaders: worklist register liveness with 96 independent synthetic CFG… #1846
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!1846
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1846"
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:19 UTC · original
VlREX:perf/worklist-liveness-corpus→main· +181 −16 · 2 files · 1 commits · openReplace repeated full-CFG register liveness sweeps with a predecessor worklist. Includes 96 independent synthetic regression fixtures across 12 graph families. Old sweep, new worklist and path-search models agreed on all 4,192 cases. Synthetic block visits decreased by 47.88%. 100 files, 1,965 additions, no new dependencies. Native Rust tests and real shader benchmarks pending. No proprietary game data. AI-assisted (ChatGPT).
@upipibi on GitHub · 2026-11-24 23:23 UTC · original
NVIDIA run: RTX 3070 8 GB, driver 616.56, plus WARP, Windows 11, debug,
5d4445d(onmain70564ae).cargo test -p victory-shader --locked: 302 passed, 3 failed, 2 ignored. The 96 new CFG cases pass, and the 3 failures are #1744's NVIDIA heap-cap failures onmain.AI-assisted (Claude Code). Synthetic tests only.
@Marvisak on GitHub · 2026-11-25 01:37 UTC · original · edited 2026-11-26 00:22 UTC
Automated triage for the maintainers.
Merge candidate. The head (
fc589db) hasn't changed since the last review.solve_livenessincrates/victory-shader/src/ir.rsreplaces the round-robin fixed point with a predecessor worklist and keeps the transfer function (uses | out & !defs).ir/liveness_tests.rschecks it against a separate path-to-first-use oracle on generated CFGs. The diff is two files and 181 added lines.On your reply: thanks for the measurements. A 1.9x to 2.7x speed-up of the solver on 2,048-block synthetic CFGs, with identical live sets, supports the change. A timing on a large real shader would still be the stronger number, but it doesn't block this.
CI: passing (
check).Generated by Claude Code
@VlREX on GitHub · 2026-11-25 20:42 UTC · original
Local performance validation
Ryzen 5 3600X / RX 5700 XT / Windows 10
Rust 1.98.1
2048-block synthetic CFG results:
All 12 configurations were faster and produced
identical live-in and live-out sets.
Maximum execution time reduction: 62.4%.
PR tested:
fc589dbBenchmark source:
github.com/VlREX/VIREX@1627eaa3bbSeven alternating-order samples per configuration.
Synthetic solver benchmark, not end-to-end shader
translation or game FPS.
AI-assisted development (ChatGPT).
Native local measurements.
@catminou4 on GitHub · 2026-11-24 23:52 UTC · original · approved these changes
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae), cargo test -p victory-shader --locked → 214 passed, 0 failed. GPU execution tests are #[cfg(all(test, windows))] and run only on Windows.Worklist register liveness with 96 independent synthetic tests: 214 macOS tests green (biggest suite in the repo now) — strong verification of the new liveness worklist.
@fuzeofficlal on GitHub · 2026-11-26 19:24 UTC · original · approved these changes
Verified locally merged onto
origin/main(63bcca43, Windows 11 x64, Rust 1.98.1 MSVC):cargo test --locked -p victory-shader --lib ir::— 11 passed, 0 failed (includingduplicate_edges_and_unreachable_predecessorsandgenerated_control_flow_matches_path_oracle, which checks 192 synthetic CFGs againstreaches_use)cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default and--all-features) — 0 warningscargo xtask policy— ok (192 files ok)Review notes
solve_livenessand the prior round-robin loop:link()keepspredssynced withExit::successors()(including aftersplit_irreducible),live_out[b]is stored on every pop even whenlive_in[b]does not change,queued[b]is cleared before evaluation so self-loops re-enqueue cleanly, and unreachable blocks stay zeroed under!reachable[p].rustfmt --edition 2024 --checkflags threeExit::Branchstruct literals incrates/victory-shader/src/ir/liveness_tests.rs(around lines 93, 123, and 129).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.