Repository navigation
Conversation
…32_b16 These decode and are tracked in ir.rs but the lowering had no case for them, so any shader using one failed to translate with Unsupported.
|
Verified
AI-assisted. |
|
Tested
|
|
RDNA2 hardware check of the new scalar instructions: all match, including Setup. AMD Radeon iGPU of a Ryzen 7 9800X3D, gfx1036 (RDNA2), AMD driver 32.0.21042.62, Windows 11 Pro 26200. Hand-written instructions in a HIP kernel (assembled by the AMD driver's amd_comgr). RDNA2 desktop silicon, not the console's. No game data. 141 operand pairs: all pairs of
AI use: Claude Code (Claude Opus 5.5) wrote the probes, ran them on the GPU above and drafted this comment; the numbers come from the hardware run. |
mercuryVM
left a comment
There was a problem hiding this comment.
Tested cb40cdc on Windows 11, RTX 5070, MSVC: the workspace passes (186 outside victory-shader; victory-shader --lib single-threaded: 69). victory translate <title exe> --validate --pipelines gives the same counts before and after: 12 of 12 programs emitted, 12 validated, 12 pipelines.
Checked against the GFX10 ISA:
s_absdiff_i32:|a − b|of the wrapping difference, with SCC = result ≠ 0.s_sext_i32_i8/i16: shift left, then arithmetic shift right.s_pack_llgives{b.lo, a.lo},s_pack_lhgives{b.hi, a.lo}, ands_pack_hhgives{b.hi, a.hi}, written high:low.
SCC is only written where the decoder says the instruction writes it (inst.write(Reg::Scc)), so sext and pack correctly leave SCC alone.
No issues found.
AI-assisted (Claude Code).
…i32_i8/i16 and s_pack_ll/lh/hh_b32_b16 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged onto Checked with CI's steps (both clippy runs with |
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
What
s_absdiff_i32(|a - b| of the wrapped difference, SCC = result != 0),s_sext_i32_i8,s_sext_i32_i16, ands_pack_ll_b32_b16,s_pack_lh_b32_b16,s_pack_hh_b32_b16(halves picked as in the GFX10 ISA).Why
sop()rejected them, so any shader using one failed to translate withUnsupported.Tested
cargo test -j4 -p victory-shader scalar_packwith the lowering disabled (test only): fails withUnsupported { offset: 16, what: "s_absdiff_i32" }.cargo test -j4 -p victory-shaderafter the change: 56 passed (origin/main 237f2e8), 0 failed (the new test included).cargo clippy -j4 -p victory-shader --tests: no new warnings (existing: dead_codeconstant_colorin emit/mod.rs, a boolean-simplification note in resource.rs).rustfmt --edition 2024 --checkon lower.rs: clean.lowers()helper in the tests module.