Repository navigation
Conversation
|
Verified
AI-assisted. |
|
Tested
|
…ction translates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mercuryVM
left a comment
There was a problem hiding this comment.
Tested 6e6d3fc on Windows 11, RTX 5070, MSVC: the workspace passes (170 outside victory-shader; victory-shader --lib single-threaded: 58; older base). victory translate <title exe> --validate --pipelines gives the same counts before and after: 12 of 12 programs emitted, 12 validated, 12 pipelines.
An empty preheader only when some flow targets offset 0 is the standard fix. It gives the header's phis a distinct entry edge, and leaves block numbering unchanged for every other program. Shifting through block_at and the partition_point mapping keeps all jump targets consistent. The new test checks the shape (entry → header, header preds [0, 1]). Removing the old refusal is safe, since block 0 can no longer have preds.
No issues found.
AI-assisted (Claude Code).
… the entry instruction translates Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…isak#306 Marvisak#333 Marvisak#105 Marvisak#288 Marvisak#343 Marvisak#353 Marvisak#326 Marvisak#259 Marvisak#179 Marvisak#176 Marvisak#226 Marvisak#286) Conflicts: - emit/lower.rs: shader-opcodes and shader-tracking each keyed heap handles by the resource properties (a tuple vs two flattened words); the same key, shader-tracking's form and comment kept. Lowered's test-only fields, test imports and tests of both sides kept. - emit/wave.rs: tests of both sides kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nstruction translates
…nstruction translates
…nstruction translates
|
Automated triage for the maintainers. Merge candidate. CI: no check runs on the head commit. Generated by Claude Code |
…nstruction translates
What
Accept shader loops whose back edge targets byte offset zero. The IR builder now puts an empty entry block before the code when the first instruction is a jump or branch target, so the loop header has one edge for the initial register values and one for the loop-carried values.
Why
A valid shader whose first instruction is also its loop header was rejected with
Unsupported { offset: 0, what: "a branch to the program entry" }, because block 0 was both the entry and a loop header and SSA had no edge to carry the initial values into its phis. Every other loop shape already works. Only the entry-block handling changes. Block indices shift by one only when the program branches to offset 0.Tested
Linux x86_64 only, synthetic shader words only (no game files):
cargo test -j4 -p victory-shader ir::tests::loops_can_branch_to_offset_zeroon origin/main plus only the new test: FAILED withUnsupported { offset: 0, what: "a branch to the program entry" }.structure::structureaccepts the result.cargo test -j4 -p victory-shader: 52 passed, 0 failed.cargo clippy -j4 -p victory-shader --tests: no warnings in ir.rs; the 2 existing warnings elsewhere are unchanged.rustfmt --check --edition 2024 crates/victory-shader/src/ir.rs: clean.Not run: Windows runtime and any GPU execution. The emit path was not run on a real shader, only the IR and structuring steps.