test(shader): cover separated parked-mask lane restores #34

Open
grat78 wants to merge 2 commits from upstream-pr/34 into main
grat78 commented 2026-11-25 05:09:07 +00:00 (Migrated from github.com)
First-time contributor

Imported from Zettrox/ztrx. Originally posted by grat78 on 2026-11-25T04:20:42Z.


added some stuff idk

<!-- greyfinch-sync:Zettrox/ztrx:issue:6597132788 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/pull/34). Originally posted by [grat78](https://github.com/grat78) on 2026-11-25T04:20:42Z. --- added some stuff idk
futurepro62 commented 2026-11-25 07:06:30 +00:00 (Migrated from github.com)
Author
First-time contributor

Imported from Zettrox/ztrx. Originally posted by futurepro62 on 2026-11-25T06:38:34Z.


Full-suite run on Windows. Tested exact head 4f68a78 (on its base 90b529f). One of the two new tests fails, and I think it's the test's expectation rather than ir.rs.

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (rust-toolchain.toml), DXC + dxil.dll 1.9.2602.17, debug.
  • cargo test --workspace --locked --no-fail-fast: 496 passed, 2 failed, 7 ignored (main 90b529f on this machine: 496 passed, 0 failed, 7 ignored).
    • parked_wave64_mask_pair_restores_across_independent_instructions fails: parked register code 108 (tests/parked_mask.rs:66).
    • inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset also failed once in this run. It's outside this PR's diff, passes on main, and passed 3 of 3 solo reruns at this head, so I'm treating it as a flake under load.
  • parked_pair_is_not_combined_across_a_read_of_the_second_scalar passes.
  • Both cargo clippy ... -D warnings passes (with and without --all-features): passed.

Why 108

  • The pairing itself works: both s_mov_b64 moves are there, and the save's width and source match. Only assert!(parked >= PARKED) fails.
  • unspill's doc comment in ir.rs says each (VGPR, lane) gets a code the program doesn't use, "the trap temporaries first, then SGPRs it never names, then codes from PARKED up". The synthetic program doesn't use any trap temporaries, so the pair gets 108 (ttmp0). Checking that the code isn't one the program names, or isn't an SGPR the program uses, may be closer to what's intended than >= PARKED.

Two stray files

  • crates/victory-shader/src/ir.rs_TEST_INSERT.txt (80 lines with use super::*;, not compiled) and crates/victory-shader/tests/.parked_mask_marker (a doc-comment line) look left over from writing the test. Nothing references either.

Not tested

  • AMD (ztrx targets NVIDIA), a release build, the game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Zettrox/ztrx:comment:7155005494 --> Imported from [Zettrox/ztrx](https://github.com/Zettrox/ztrx/pull/34#issuecomment-7155005494). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-25T06:38:34Z. --- Full-suite run on Windows. Tested exact head `4f68a78` (on its base `90b529f`). One of the two new tests fails, and I think it's the test's expectation rather than `ir.rs`. **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (`rust-toolchain.toml`), DXC + dxil.dll 1.9.2602.17, debug. - `cargo test --workspace --locked --no-fail-fast`: **496 passed, 2 failed, 7 ignored** (main `90b529f` on this machine: 496 passed, 0 failed, 7 ignored). - `parked_wave64_mask_pair_restores_across_independent_instructions` fails: `parked register code 108` (`tests/parked_mask.rs:66`). - `inplace::tests::warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset` also failed once in this run. It's outside this PR's diff, passes on main, and passed 3 of 3 solo reruns at this head, so I'm treating it as a flake under load. - `parked_pair_is_not_combined_across_a_read_of_the_second_scalar` passes. - Both `cargo clippy ... -D warnings` passes (with and without `--all-features`): passed. **Why 108** - The pairing itself works: both `s_mov_b64` moves are there, and the save's width and source match. Only `assert!(parked >= PARKED)` fails. - `unspill`'s doc comment in `ir.rs` says each (VGPR, lane) gets a code the program doesn't use, "the trap temporaries first, then SGPRs it never names, then codes from `PARKED` up". The synthetic program doesn't use any trap temporaries, so the pair gets 108 (`ttmp0`). Checking that the code isn't one the program names, or isn't an SGPR the program uses, may be closer to what's intended than `>= PARKED`. **Two stray files** - `crates/victory-shader/src/ir.rs_TEST_INSERT.txt` (80 lines with `use super::*;`, not compiled) and `crates/victory-shader/tests/.parked_mask_marker` (a doc-comment line) look left over from writing the test. Nothing references either. **Not tested** - AMD (ztrx targets NVIDIA), a release build, the game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/34:upstream-pr/34'
git switch 'upstream-pr/34'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/34'
git switch 'upstream-pr/34'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/34'
git switch 'upstream-pr/34'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/34'
git switch 'main'
git merge --squash 'upstream-pr/34'
git switch 'main'
git merge --ff-only 'upstream-pr/34'
git switch 'main'
git merge 'upstream-pr/34'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Zettrox/ztrx!34
No description provided.