shader: pin the opcode-name resolution with unit tests #480
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/480"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T21:59:15Z.
What this changes
Refs #477.
name(encoding, opcode)incrates/victory-shader/src/gfx10resolves an instruction's name, and three things read it:apps/victory's survey counts opcodes it cannot name, refusal messages quote names, and corpus comparisons compare them.opcodes.rshad one test; a table edit can rename an instruction with nothing failing.gfx10/opcodes_tests.rs(declared undercfg(test), so the build hash is unchanged) pins:0x140is RDNA2'sv_fma_legacy_f32(#321);No behaviour change, no new dependencies, synthetic opcodes only.
How it was tested
cargo test -p victory-shader: 405 passed, 0 failed, 3 ignored (the new module included).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: no warnings on this tree.cargo xtask policy: 398 files ok.Checklist
0x140case matches #321's finding, which is already marked in the tableVICTORY_*variable and documented: none addedImported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-27T22:19:03Z.
Closing as a duplicate of #498, which pins the same issue #477 with more: it walks every table entry rather than sampling one name per encoding, and it pins the sortedness
name()'s binary search depends on, which this PR did not cover. Everything this branch covered (one name per encoding, the VOP3 fixed bases, past-the-end opcodes resolving toNone) is covered there too, so nothing is lost.The branch stays as it is; reopen if #498 changes direction.
Pull request closed