Skip to content

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

Open
geiyiliyabumo wants to merge 1 commit into
Marvisak:mainfrom
geiyiliyabumo:test/gpu-pipeline-make
Open

geiyiliyabumo wants to merge 1 commit into
Marvisak:mainfrom
geiyiliyabumo:test/gpu-pipeline-make

Conversation

@geiyiliyabumo

Copy link
Copy Markdown
Contributor

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.

@Zipettte

Copy link
Copy Markdown

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

yourmomsbasement pushed a commit to yourmomsbasement/VIctory_Dev that referenced this pull request Nov 24, 2026
…ied together

Merges Marvisak#72 Marvisak#347 Marvisak#1000 Marvisak#358 Marvisak#352 Marvisak#626 Marvisak#1152 Marvisak#1129 Marvisak#1203 Marvisak#24 Marvisak#642 Marvisak#427 Marvisak#485
Marvisak#550 Marvisak#174 Marvisak#1279 onto main (ffe310e), each head unchanged, no conflicts.

One change of mine: three of the PRs each add a `mod tests` at the end of
pipeline/host.rs, so the merge defines `tests` three times (E0428). The
second and third are named `library_tests` and `blend_tests`; nothing else
changes.

cargo clippy --workspace --all-targets --locked -- -D warnings, with and
without --all-features, is clean and cargo test --workspace --locked passes
(367 passed, 6 ignored; main has 342 passed, 6 ignored).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
edsuuu referenced this pull request in edsuuu/VI-BR-PORT Nov 24, 2026
…ame wait bundle

Taken from the bundle: 64 MB stacks for pipeline workers (#1129), no
blending on integer render targets (#1152), root signature flag fallback
(#626), read-only depth read states (#485, on our stored rtvs/dsv and
bind_targets), enhanced texture barrier translation (#642, on our
recording_list so continuation segments get it), indirect mesh dispatch
(#24), the frame wait taking its tick before it sleeps (#174), and the
make.rs unit tests (#1203).

Kept from our side:
- pipeline/make.rs: early() starts every compute pipeline at creation
  (b4e8419); the per-pipeline wake pair, per-frame budget, wait_compute
  and copystat counters. The bundle's the_wait_budget_is_spent_once_per_frame
  test is dropped (written for its fixed BUDGET; our FrameBudget tests
  cover it); a_pipeline_is_made_once now holds the tests' serial lock.
- indirect.rs: our whole file (#40's overflow-safe clamp, DXC fallback for
  Wine, rectangle pass). #1279's structured-buffer clamp and its readback
  test (written for the old bound/done API) are left out.
- draw.rs: NOT_MADE counter, user_dword, typed table nulls
  (table_view_props, mirror_for_draw); the depth test calls readable()
  directly since our tables() needs a host pipeline.
- frame.rs: our `_tick` (the diagnostics log already names it).
- list.rs: execute_indirect's DISPATCH_SINGLE mapping in one place; our
  tests beside the bundle's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 24, 2026

Marvisak commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

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

@geiyiliyabumo

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor Author

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.

github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
github-actions Bot added a commit to KevinPratap/VIctory that referenced this pull request Nov 25, 2026
@Marvisak

Copy link
Copy Markdown
Owner

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. GPU diagnostics: skip host pipeline creation by shader hash #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants