victory-shader tests do not compile on main: the s_bitcmp test calls lowers() without rsrc2 #719

Closed
opened 2026-11-26 04:13:52 +00:00 by github-bot · 4 comments
Owner

@⁠BastienRodz on GitHub · 2026-11-24 08:22 UTC · original

cargo test -p victory-shader does not compile on main (cf0bb43):

error[E0061]: this function takes 2 arguments but 1 argument was supplied
    --> crates\victory-shader\src\emit\lower.rs:6954:13
6954 |             lowers(&words).unwrap();
     |             ^^^^^^-------- argument #2 of type `u32` is missing

Two merges crossed. #432 (25b0f88) gave the test helper lowers() an rsrc2 argument and updated the callers it knew about. #117 (3c86053) added the s_bitcmp test with a call of the old form. The helper used rsrc2: 0 before, so the fix is one argument:

-            lowers(&words).unwrap();
+            lowers(&words, 0).unwrap();

With it (cross-built with cargo xwin, run under Wine), cargo xwin test -p victory-shader gives 76 passed and 12 failed. The 12 are all emit::valu_tests::*, which need an SM 6.6 device. Clippy is clean.

I had the fix ready as a PR (branch BastienRodz:fix/bitcmp-test-lowers-arg, commit 4628759), but PR creation is now limited to collaborators, so I'm filing it here instead. It is also a separate commit in #568, which needs it to run the shader tests after rebasing.

No game data used. AI-assisted (Claude Code).

**@⁠BastienRodz** on GitHub · 2026-11-24 08:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/719) `cargo test -p victory-shader` does not compile on `main` (`cf0bb43`): ``` error[E0061]: this function takes 2 arguments but 1 argument was supplied --> crates\victory-shader\src\emit\lower.rs:6954:13 6954 | lowers(&words).unwrap(); | ^^^^^^-------- argument #2 of type `u32` is missing ``` Two merges crossed. #432 (`25b0f88`) gave the test helper `lowers()` an `rsrc2` argument and updated the callers it knew about. #117 (`3c86053`) added the `s_bitcmp` test with a call of the old form. The helper used `rsrc2: 0` before, so the fix is one argument: ```diff - lowers(&words).unwrap(); + lowers(&words, 0).unwrap(); ``` With it (cross-built with `cargo xwin`, run under Wine), `cargo xwin test -p victory-shader` gives 76 passed and 12 failed. The 12 are all `emit::valu_tests::*`, which need an SM 6.6 device. Clippy is clean. I had the fix ready as a PR (branch `BastienRodz:fix/bitcmp-test-lowers-arg`, commit `4628759`), but PR creation is now limited to collaborators, so I'm filing it here instead. It is also a separate commit in #568, which needs it to run the shader tests after rebasing. No game data used. AI-assisted (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:52 +00:00
Author
Owner

@⁠LAKSHYA-cmd-tech on GitHub · 2026-11-24 08:26 UTC · original

Verified on Windows 11 MSVC (Rust 1.98.1):
Passing
src2: 0\ to \lowers(&words, 0)\ at line 6963 fixes the test suite build.
All 89 unit tests in \ ictory-shader\ pass cleanly (\ est result: ok. 89 passed; 0 failed; 1 ignored), \cargo clippy\ passes without warnings, and \cargo xtask policy\ is clean.

Branch ready on fork:
https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/bitcmp-test-lowers-arg

**@⁠LAKSHYA-cmd-tech** on GitHub · 2026-11-24 08:26 UTC · [original](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7126145392) Verified on Windows 11 MSVC (Rust 1.98.1): Passing \ src2: 0\ to \lowers(&words, 0)\ at line 6963 fixes the test suite build. All 89 unit tests in \ ictory-shader\ pass cleanly (\ est result: ok. 89 passed; 0 failed; 1 ignored\), \cargo clippy\ passes without warnings, and \cargo xtask policy\ is clean. Branch ready on fork: https://github.com/LAKSHYA-cmd-tech/VIctory/tree/fix/bitcmp-test-lowers-arg
Author
Owner

@⁠Conrage on GitHub · 2026-11-24 09:54 UTC · original

This looks fixed on main now: as of 8e79c80 the s_bitcmp test calls lowers(&words, 0) (crates/victory-shader/src/emit/lower.rs:6963). Can this be closed?

**@⁠Conrage** on GitHub · 2026-11-24 09:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7128046339) This looks fixed on main now: as of 8e79c80 the s_bitcmp test calls `lowers(&words, 0)` (`crates/victory-shader/src/emit/lower.rs:6963`). Can this be closed?
Author
Owner

@⁠BastienRodz on GitHub · 2026-11-24 09:55 UTC · original

Fixed on main in 8e79c80 (lowers(&words, 0) in scalar_bit_tests_lower), so closing. Thanks.

AI-assisted (Claude Code).

**@⁠BastienRodz** on GitHub · 2026-11-24 09:55 UTC · [original](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7128070554) Fixed on `main` in 8e79c80 (`lowers(&words, 0)` in `scalar_bit_tests_lower`), so closing. Thanks. AI-assisted (Claude Code).
Author
Owner

@⁠0xmp3 on GitHub · 2026-11-24 09:57 UTC · original

Fixed on main — this no longer reproduces at 8e79c80.

cargo test --workspace compiles and passes on Windows 11 (Rust 1.98.1, MSVC, RX 9070 XT): 311 passed, 0 failed, 0 ignored. Both call sites already take the rsrc2 argument (lower.rs:6851 and lower.rs:6963), so the s_bitcmp test no longer needs the argument added by hand.

Posting it because the issue is still open and people are rebasing around a break that is gone; no action needed if you are already tracking it.

AI-assisted (Hermes Agent).

**@⁠0xmp3** on GitHub · 2026-11-24 09:57 UTC · [original](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7128117713) Fixed on main — this no longer reproduces at `8e79c80`. `cargo test --workspace` compiles and passes on Windows 11 (Rust 1.98.1, MSVC, RX 9070 XT): **311 passed, 0 failed, 0 ignored**. Both call sites already take the `rsrc2` argument (`lower.rs:6851` and `lower.rs:6963`), so the `s_bitcmp` test no longer needs the argument added by hand. Posting it because the issue is still open and people are rebasing around a break that is gone; no action needed if you are already tracking it. AI-assisted (Hermes Agent).
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#719
No description provided.