Shaders: search lane conditions once and redo a lowering once #999
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/999"
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 TG0000 on 2026-11-24T14:48:19Z.
Summary
Translating the shaders the opening scene binds spent most of its time on answers it already had. Three changes, in
structure.rsandemit/lower.rsonly:Bools::meetremembers failed states. It split cases without remembering the ones that failed, up to 65,536 allocating steps per question; the waterfall proofs asking it were about 38% of all translation time.Measured (RX 6800, Ryzen 9 5900X, Windows 11)
Runs alternated with the new build first, so driver-cache warming favoured main. Main's second title run was stopped early by a memory watchdog, after its backlog had cleared. No device removal in these runs. This helps a cold cache only: with a warm cache and in steady state, frame rate does not change.
Correctness
Verification
Rust 1.98.1 MSVC, base
ffe310e:cargo test --workspace --locked344 passed, 0 failed;cargo clippy --workspace --all-targets --locked -- -D warningsclean with and without--all-features; policy passes.Overlap
Bools::meettoo, with forced-variable propagation and memoised failures. Only one of the two searches is needed, and the two conflict. Items 2 and 3 here do not depend on which one is taken; I am happy to rebase onto #947 and keep only those.structure.rsas well.AI-assisted: written and measured by Claude Opus 5.5. No game data is in this PR.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T15:41:44Z.
Review: APPROVED
The lane-condition engine rewrite is verified the right way:
lane_conditions_agree_with_their_truth_tableschecksite/implies/meetagainst brute-force truth tables over 512 lanes with 9 atoms and 1500 random diagrams (plus a uniqueness check on nodes), andconditions_that_exclude_each_other...exercises the 2^40 case-split that the oldmeet_inbudget could never finish — the state-dedup (failedset over sortedState) is what makes it tractable, and the test proves the semantics survive. Theimpliesrewrite building no nodes is asserted explicitly (b.nodes.len()unchanged). The lower.rs side batchesStop::Retryphis so one redo pass collects all missing joins instead of one per pass — same fixpoint, fewer passes.Verified locally: test-merge with main clean;
cargo test -p victory-shader --locked(macOS arm64, rustc 1.98.1) → 98 passed / 0 failed / 1 ignored, including both new structure tests. Approving.Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:12:57Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
3ca9456:cargo test -p victory-shaderpasses, 122 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:31:45Z.
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-shader/src/emit/lower.rs,crates/victory-shader/src/structure.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by TG0000 on 2026-11-28T01:14:31Z.
Closing:
mainnow remembers refuted conditions inBools::meet, which was the largest part of this change. The other two parts (the diagram tables and the single lowering restart) are not onmain, but the branch conflicts in both files and would need rewriting and measuring again; I would rather open them fresh than leave this one stale. Thanks to @Zipettte for testing it. (AI-assisted comment.)Pull request closed