GPU: expand synthetic unit tests for pipeline/make.rs (1 -> 9/12 tests) #1203

Open
geiyiliyabumo wants to merge 1 commit from upstream-pr/1203 into main
geiyiliyabumo commented 2026-11-24 16:25:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:25:03Z.


Summary

Closes #1051

Full verification details and change notes are documented in #1051 (commit 76291ef, based on main ffe310e).

 crates/victory-gpu/src/pipeline/make.rs | 427 +++++++++++++++++++++++++++++++-
 1 file changed, 421 insertions(+), 6 deletions(-)

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check on edited files: PASS
  • cargo xtask policy: PASS (zero game files/data)
  • cargo clippy --all-targets --locked -- -D warnings (default + --features diagnostics where applicable): PASS
  • Targeted & crate unit/GPU tests: PASS

AI-assisted; synthetic tests only, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586452812 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1203). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-24T16:25:03Z. --- ### Summary Closes #1051 Full verification details and change notes are documented in #1051 (commit `76291ef`, based on `main` `ffe310e`). ```text crates/victory-gpu/src/pipeline/make.rs | 427 +++++++++++++++++++++++++++++++- 1 file changed, 421 insertions(+), 6 deletions(-) ``` ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check` on edited files: **PASS** - `cargo xtask policy`: **PASS** (zero game files/data) - `cargo clippy --all-targets --locked -- -D warnings` (default + `--features diagnostics` where applicable): **PASS** - Targeted & crate unit/GPU tests: **PASS** *AI-assisted; synthetic tests only, no game files.*
Zipettte commented 2026-11-24 18:06:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:11Z.


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 76291ef: cargo test -p victory-gpu passes, 58 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140014709 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1203#issuecomment-7140014709). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:00:11Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 76291ef: `cargo test -p victory-gpu` passes, 58 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Marvisak commented 2026-11-25 02:05:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:18:28Z.


Automated triage for the maintainers.

Needs rebase. main has moved since the last triage, and this PR no longer merges cleanly into it (conflict in crates/victory-gpu/src/pipeline/make.rs). It will be reviewed again once it is rebased onto current main. The second-look comment above lists what to change while rebasing (bounded waits, and the third Pending::new parameter in diagnostics builds).

Previous verdict for this head: merge candidate.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149413975 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1203#issuecomment-7149413975). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T01:18:28Z. --- <!-- victory-triage v1 head=f38bd8fbc2459ee426fcd64f0b4c109c79945fc0 verdict=needs-rebase at=2026-11-25T22:22:30Z --> Automated triage for the maintainers. **Needs rebase.** `main` has moved since the last triage, and this PR no longer merges cleanly into it (conflict in `crates/victory-gpu/src/pipeline/make.rs`). It will be reviewed again once it is rebased onto current `main`. The second-look comment above lists what to change while rebasing (bounded waits, and the third `Pending::new` parameter in diagnostics builds). Previous verdict for this head: merge candidate. --- _Generated by [Claude Code](https://claude.ai/code)_
geiyiliyabumo commented 2026-11-25 03:03:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T02:22:42Z.


Rebased cleanly onto \main\ (\ccfb029), updating the two early-start tests to match \main's mark-used-on-first-draw semantics. \cargo test -p victory-gpu --locked pipeline::make::tests\ (10 passed, 0 failed), \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7150644764 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1203#issuecomment-7150644764). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-25T02:22:42Z. --- Rebased cleanly onto \main\ (\ccfb029\), updating the two early-start tests to match \main\'s mark-used-on-first-draw semantics. \cargo test -p victory-gpu --locked pipeline::make::tests\ (10 passed, 0 failed), \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings\, and \cargo xtask policy\ all pass.
geiyiliyabumo commented 2026-11-25 04:07:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-25T03:56:19Z.


Updated per triage feedback: reverted the unrelated \wait\ reformat (diff is now strictly confined to \mod tests), dropped \ he_wait_budget_is_spent_once_per_frame, and removed all wall-clock timing assertions while keeping the deterministic key and worker-completion tests. Rebased onto \main\ (\940d32f); \cargo test -p victory-gpu --locked pipeline::make::tests\ (9 passed, 0 failed), \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings, and \cargo xtask policy\ all pass.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7152379220 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1203#issuecomment-7152379220). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-25T03:56:19Z. --- Updated per triage feedback: reverted the unrelated \wait\ reformat (diff is now strictly confined to \mod tests\), dropped \ he_wait_budget_is_spent_once_per_frame\, and removed all wall-clock timing assertions while keeping the deterministic key and worker-completion tests. Rebased onto \main\ (\940d32f\); \cargo test -p victory-gpu --locked pipeline::make::tests\ (9 passed, 0 failed), \cargo clippy -p victory-gpu --all-targets --locked -- -D warnings\, and \cargo xtask policy\ all pass.
Marvisak commented 2026-11-25 22:04:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:01:28Z.


Automated triage for the maintainers, second look (a review against main, with the PR built and tested).

The key-completeness tests are worth having, and this can be merged after two changes in crates/victory-gpu/src/pipeline/make.rs mod tests.

  1. Bound the waits. p.made.wait() and idle()'s while waiting() > 0 loop are unbounded and replace the 10 s bound that first_use_is_made_by_a_worker had, so a regression would hang CI instead of failing. Please give every wait a deadline that panics (10 s, say): idle(), and the made.wait() calls in first_use_is_made_by_a_worker, queueing_once_leaves_nothing_waiting, a_pipeline_whose_shaders_do_not_translate_is_refused_once and a_refused_pipeline_is_marked_used_on_first_use. One helper such as made_within(&p, Duration) serves all of them.
  2. Rebase onto main. #1320, merged today, gave Pending::new a third parameter in diagnostics builds, so each Pending::new call here needs #[cfg(feature = "diagnostics")] &[], or the --all-features test build fails.

Push the change and it will be reviewed again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175838444 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1203#issuecomment-7175838444). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:01:28Z. --- Automated triage for the maintainers, second look (a review against `main`, with the PR built and tested). The key-completeness tests are worth having, and this can be merged after two changes in `crates/victory-gpu/src/pipeline/make.rs` `mod tests`. 1. Bound the waits. `p.made.wait()` and `idle()`'s `while waiting() > 0` loop are unbounded and replace the 10 s bound that `first_use_is_made_by_a_worker` had, so a regression would hang CI instead of failing. Please give every wait a deadline that panics (10 s, say): `idle()`, and the `made.wait()` calls in `first_use_is_made_by_a_worker`, `queueing_once_leaves_nothing_waiting`, `a_pipeline_whose_shaders_do_not_translate_is_refused_once` and `a_refused_pipeline_is_marked_used_on_first_use`. One helper such as `made_within(&p, Duration)` serves all of them. 2. Rebase onto `main`. #1320, merged today, gave `Pending::new` a third parameter in diagnostics builds, so each `Pending::new` call here needs `#[cfg(feature = "diagnostics")] &[]`, or the `--all-features` test build fails. Push the change and it will be reviewed again. Thank you for the contribution.
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/1203:upstream-pr/1203'
git switch 'upstream-pr/1203'

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/1203'
git switch 'upstream-pr/1203'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1203'
git switch 'upstream-pr/1203'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1203'
git switch 'main'
git merge --squash 'upstream-pr/1203'
git switch 'main'
git merge --ff-only 'upstream-pr/1203'
git switch 'main'
git merge 'upstream-pr/1203'
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
Marvisak/VIctory!1203
No description provided.