shader: pin the GFX10 operand-field decode rules with unit tests #305

Manually merged
github merged 1 commit from github-bot/gh-305 into main 2026-11-27 12:02:38 +00:00 AGit
Owner

@⁠AnastasisKon on GitHub · 2026-11-27 10:49 UTC · original
AnastasisKon:vibe/gfx10-field-tests-f18f96 → main · +577 −0 · 2 files · 1 commits · merged 2026-11-27 11:54 UTC

fields.rs had no tests of its own; its rules were only exercised indirectly through whole-program lowering tests. Add gfx10/fields_tests.rs (declared under cfg(test), so the build hash is unchanged) pinning Instruction::fields on hand-assembled words: source codes and the literal, per-opcode dword counts, wave64 lane-mask sizing, the madmk/madak literal positions, the SDWA and DPP16/DPP8 forms, VOP3 source counts and the VOP3B carry-out, and the SMEM/MUBUF/MIMG/DS/VINTRP/EXP field layouts.

What this changes

How it was tested

  • cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory
  • cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings
  • Ran the game (say how far it got), or not needed

Checklist

  • No game files, game code, disassembly listings or SDK files are included
  • Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md
  • New diagnostics are behind a VICTORY_* variable and documented
**@⁠AnastasisKon** on GitHub · 2026-11-27 10:49 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/305) `AnastasisKon:vibe/gfx10-field-tests-f18f96` → `main` · +577 −0 · 2 files · 1 commits · merged 2026-11-27 11:54 UTC fields.rs had no tests of its own; its rules were only exercised indirectly through whole-program lowering tests. Add gfx10/fields_tests.rs (declared under cfg(test), so the build hash is unchanged) pinning Instruction::fields on hand-assembled words: source codes and the literal, per-opcode dword counts, wave64 lane-mask sizing, the madmk/madak literal positions, the SDWA and DPP16/DPP8 forms, VOP3 source counts and the VOP3B carry-out, and the SMEM/MUBUF/MIMG/DS/VINTRP/EXP field layouts. ## What this changes <!-- One change per pull request. Name the issue you claimed for it: Refs #123 (or Closes #123). --> ## How it was tested - [ ] `cargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory` - [ ] `cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings` - [ ] Ran the game (say how far it got), or not needed ## Checklist - [ ] No game files, game code, disassembly listings or SDK files are included - [ ] Guesses about undocumented console behaviour are marked in the code and in docs/native-host.md - [ ] New diagnostics are behind a `VICTORY_*` variable and documented
fields.rs had no tests of its own; its rules were only exercised
indirectly through whole-program lowering tests. Add gfx10/fields_tests.rs
(declared under cfg(test), so the build hash is unchanged) pinning
Instruction::fields on hand-assembled words: source codes and the literal,
per-opcode dword counts, wave64 lane-mask sizing, the madmk/madak literal
positions, the SDWA and DPP16/DPP8 forms, VOP3 source counts and the VOP3B
carry-out, and the SMEM/MUBUF/MIMG/DS/VINTRP/EXP field layouts.

Co-authored-by: AnastasisKon <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 10:54:21 +00:00
github manually merged commit d1ba51ed44 into main 2026-11-27 12:02:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.