Iter 23: Fix scalar code bounds panic in ir::unspill #8
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T02:07:53Z.
Summary
Ports
fxceless/victory-forkcommit2f3f399(8ddcf35, PR #1495backport/shader-scalar-code-bounds) intocrates/victory-shader/src/ir.rs:usedinunspill()from[false; 128]to[false; 256]so scalar destination codes>= 128(constants / special codes) do not panic with index-out-of-bounds during scalar parking.ir::tests::scalar_codes_past_the_registers_do_not_paniccovering both wave64 and wave32 opcodes.Rig Specs Tested On
33,304,932KiB)10.0.26300/ NVIDIA Driver32.0.16.2124Run Settings & Profile
feat/iter23-ir-unspill-scalar-bounds(source-level shader IR panic fix; no runtime gameplay playtest conducted for this single-file IR fix)VICTORY_*Overrides: N/AMeasurements & Verification
0(ir::tests::scalar_codes_past_the_registers_do_not_panicpassed)cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policycargo +1.98.1-x86_64-pc-windows-gnu test -p xtaskcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warningscargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warningscargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader -- ir::testsImported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T02:11:19Z.
Verification complete for PR #8 (
2628b0f):Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T03:02:45Z.
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingReview Summary
Clean, minimal panic fix in
crates/victory-shader/src/ir.rswith CI passing.ir::unspill): Atir.rs:336,Reg::S(c) => used[usize::from(c)] = trueindexesusedwith anyu8scalar code emitted byeffects()/operand()(which allows codes>= 128, e.g., constants/special codes or>= PARKED). Expandingusedfrom[false; 128]to[false; 256]prevents an index-out-of-bounds panic for all possibleu8codes.usedis only read atir.rs:544-546for indices(0..105).chain(108..=123), so programs that did not previously panic produce identical IR and shader output.ir::tests::scalar_codes_past_the_registers_do_not_panic, exercisingv_writelane_b32parking alongside wave64 and wave32 instructions with scalar codes past 127.Automated triage review; not a formal maintainer approval.
Generated with Antigravity CLI (
agy).