GPU tests: verify indirect::bound clamping and budget on the GPU #1812

Closed
n-romanovich wants to merge 1 commit from upstream-pr/1813 into main
n-romanovich commented 2026-11-24 22:56:56 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by n-romanovich on 2026-11-24T22:56:56Z.


Adds GPU execution tests in crates/victory-gpu/src/indirect.rs for indirect::bound and indirect::done, verifying alignment rejection, DRAW/DISPATCH/MESH argument clamping, 3D dispatch overflow zeroing, and deterministic per-list BUDGET exhaustion across sequential bound() calls.

AI-assisted; verified with cargo test -p victory-gpu --locked (52 passed, 1 ignored) and cargo clippy -p victory-gpu --all-targets --locked on Windows 11 / RTX 5060 Ti, plus independent subagent review.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6593082668 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1813). Originally posted by [n-romanovich](https://github.com/n-romanovich) on 2026-11-24T22:56:56Z. --- Adds GPU execution tests in `crates/victory-gpu/src/indirect.rs` for `indirect::bound` and `indirect::done`, verifying alignment rejection, `DRAW`/`DISPATCH`/`MESH` argument clamping, 3D dispatch overflow zeroing, and deterministic per-list `BUDGET` exhaustion across sequential `bound()` calls. AI-assisted; verified with `cargo test -p victory-gpu --locked` (52 passed, 1 ignored) and `cargo clippy -p victory-gpu --all-targets --locked` on Windows 11 / RTX 5060 Ti, plus independent subagent review.
catminou4 commented 2026-11-24 23:05:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:03:26Z.

Review: COMMENTED


Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.

GPU tests: indirect::bound clamping and budget verified on device: test-only addition (8.5K), good — exactly the kind of device-side coverage the indirect-buffer work (#1817) needs.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048801623 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1813#pullrequestreview-6048801623). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:03:26Z. **Review:** COMMENTED --- Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff. GPU tests: indirect::bound clamping and budget verified on device: test-only addition (8.5K), good — exactly the kind of device-side coverage the indirect-buffer work (#1817) needs.
DesertGamer commented 2026-11-24 23:06:05 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:57:21Z.


VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7146841252 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1813#issuecomment-7146841252). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-24T22:57:21Z. --- ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Melow-code commented 2026-11-25 00:06:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Melow-code on 2026-11-24T23:07:59Z.

Review: APPROVED


Indirect clamping and budget tests are solid. The early-return on no GPU host is the standard pattern in this module.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048847685 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1813#pullrequestreview-6048847685). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-24T23:07:59Z. **Review:** APPROVED --- Indirect clamping and budget tests are solid. The early-return on no GPU host is the standard pattern in this module.
Marvisak commented 2026-11-25 07:03:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:27:40Z.


Automated triage for the maintainers.

Merge candidate. New host-GPU tests in crates/victory-gpu/src/indirect.rs for bound and the argument-clamp shader. bound refuses an unaligned address or stride. The clamp leaves normal draws and dispatches alone, clamps oversized counts, and zeroes a record once the list's shared budget (BUDGET, 2^27) is spent, as well as dispatches over the group limit. The expectations follow the clamp's own documented contract in the module header and the HLSL source. This is our own code's design rather than console behaviour, so testing against it is the right reference. The tests skip without a host GPU.

CI: check passing (CI has no GPU, so these tests return early there).


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154813313 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1813#issuecomment-7154813313). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:27:40Z. --- <!-- victory-triage v1 head=29c142781f7433a0bf316a1a3ea828d8e1b5dccf verdict=merge-candidate at=2026-11-25T07:05:30Z --> Automated triage for the maintainers. **Merge candidate.** New host-GPU tests in `crates/victory-gpu/src/indirect.rs` for `bound` and the argument-clamp shader. `bound` refuses an unaligned address or stride. The clamp leaves normal draws and dispatches alone, clamps oversized counts, and zeroes a record once the list's shared budget (`BUDGET`, 2^27) is spent, as well as dispatches over the group limit. The expectations follow the clamp's own documented contract in the module header and the HLSL source. This is our own code's design rather than console behaviour, so testing against it is the right reference. The tests skip without a host GPU. CI: `check` passing (CI has no GPU, so these tests return early there). --- _Generated by [Claude Code](https://claude.ai/code)_
Marvisak commented 2026-11-25 22:04:44 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because the tests target the clamp as it was before 315cea18. bound now takes three arguments, returns the list's own argument buffer and never writes the title's copy, so merged onto main the test build fails with six errors. main already covers the budget's order, rejected records, a spent budget and the per-dimension dispatch clamp. The cases that are new here (alignment rejection, draws keeping their other words, the group overflow, mesh y/z clamped to 1) would be welcome rewritten for the new API.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175871167 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1813#issuecomment-7175871167). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:03:01Z. --- Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing because the tests target the clamp as it was before 315cea18. `bound` now takes three arguments, returns the list's own argument buffer and never writes the title's copy, so merged onto `main` the test build fails with six errors. `main` already covers the budget's order, rejected records, a spent budget and the per-dimension dispatch clamp. The cases that are new here (alignment rejection, draws keeping their other words, the group overflow, mesh y/z clamped to 1) would be welcome rewritten for the new API. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
upstream-sync closed this pull request 2026-11-25 23:03:11 +00:00

Pull request closed

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!1812
No description provided.