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

Closed
opened 2026-11-24 08:22:57 +00:00 by BastienRodz · 4 comments
BastienRodz commented 2026-11-24 08:22:57 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-24T08:22:57Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6577634714 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/719). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-24T08:22:57Z. --- `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).
LAKSHYA-cmd-tech commented 2026-11-24 09:06:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by LAKSHYA-cmd-tech on 2026-11-24T08:26:52Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7126145392 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7126145392). Originally posted by [LAKSHYA-cmd-tech](https://github.com/LAKSHYA-cmd-tech) on 2026-11-24T08:26:52Z. --- 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
Conrage commented 2026-11-24 10:03:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Conrage on 2026-11-24T09:54:16Z.


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?

<!-- greyfinch-sync:Marvisak/VIctory:comment:7128046339 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7128046339). Originally posted by [Conrage](https://github.com/Conrage) on 2026-11-24T09:54:16Z. --- 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?
BastienRodz commented 2026-11-24 10:03:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-24T09:55:22Z.


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

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7128070554 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7128070554). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-24T09:55:22Z. --- Fixed on `main` in 8e79c80 (`lowers(&words, 0)` in `scalar_bit_tests_lower`), so closing. Thanks. AI-assisted (Claude Code).
0xmp3 commented 2026-11-24 10:03:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by 0xmp3 on 2026-11-24T09:57:27Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7128117713 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/719#issuecomment-7128117713). Originally posted by [0xmp3](https://github.com/0xmp3) on 2026-11-24T09:57:27Z. --- 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).
Sign in to join this conversation.
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
Marvisak/VIctory#719
No description provided.