NVIDIA test failures, and victory-gpu clean with clippy -D warnings #52

Open
github-bot wants to merge 3 commits from github-bot/gh-52 into main AGit
Owner

@⁠towiice on GitHub · 2026-11-25 13:02 UTC · original
towiice:nvidia-and-clippy → main · +77 −57 · 14 files · 3 commits · open

Fixes the test failures I get on an NVIDIA card (apart from xmem, see #14 / #16, and the xtask size policy) and the Clippy errors CI would reach after #3.

Depends on #3 for Clippy to get past victory-shader.

What is in it (three commits)

  • descriptor/host.rs: on a host that caps the view heap at 1,000,000, the heap got 933,440 title slots even when fewer were asked for, so dynamic_slots_are_held_until_released failed (also reported in #4). It now keeps min(asked, 933,440). A request for 1,245,184 is unchanged, so this does not fix the short view heap of #9 / #15.
  • valu_tests.rs: the four wave64 lane-count tests skip, saying why, on a host without 64-lane waves or without a GPU. They still run wherever the host reports 64 lanes, so the RDNA2 failures in #2 are not hidden.
  • Clippy in victory-gpu and one test-only lint in victory-hle: automatic fixes, SAFETY comments, allows for type complexity and argument count; removes the unused test_queue and RSP.

Tested (GTX 1650 SUPER, driver 32.0.16.1088, Windows 11 build 26300, Rust 1.98.1 MSVC, debug)
With #3 and #16 merged locally:

  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean (also with #14 instead of #16)
  • victory-gpu lib: 109 passed, 0 failed, 4 ignored. victory-hle lib: 103 passed (104 with #14), 0 failed, 1 ignored
  • victory-shader lib: 266 passed, 0 failed, 6 ignored. Without the valu_tests.rs change: 262 passed, 4 failed
  • cargo test --workspace --locked --no-fail-fast: the remaining failure is repository_passes_policy (lower.rs over the size limit, listed in the README). In that run the victory-shader tests hung (one core busy, GPU idle) and I killed them after about 10 minutes; a second run of that library alone also hit my 8-minute limit. The groups I then ran alone passed, and the next full run of the library finished in 168 s. I have not found the cause, nor shown that it happens without this change.

Not tested: AMD, Intel, a machine without a GPU, the game.

AI use: Claude Code (Claude Sonnet 5.5) wrote the changes, ran the tests and wrote this description.

🤖 Generated with Claude Code

**@⁠towiice** on GitHub · 2026-11-25 13:02 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/52) `towiice:nvidia-and-clippy` → `main` · +77 −57 · 14 files · 3 commits · open Fixes the test failures I get on an NVIDIA card (apart from `xmem`, see #14 / #16, and the `xtask` size policy) and the Clippy errors CI would reach after #3. Depends on #3 for Clippy to get past `victory-shader`. **What is in it** (three commits) - `descriptor/host.rs`: on a host that caps the view heap at 1,000,000, the heap got 933,440 title slots even when fewer were asked for, so `dynamic_slots_are_held_until_released` failed (also reported in #4). It now keeps `min(asked, 933,440)`. A request for 1,245,184 is unchanged, so this does **not** fix the short view heap of #9 / #15. - `valu_tests.rs`: the four wave64 lane-count tests skip, saying why, on a host without 64-lane waves or without a GPU. They still run wherever the host reports 64 lanes, so the RDNA2 failures in #2 are not hidden. - Clippy in `victory-gpu` and one test-only lint in `victory-hle`: automatic fixes, SAFETY comments, `allow`s for type complexity and argument count; removes the unused `test_queue` and `RSP`. **Tested** (GTX 1650 SUPER, driver 32.0.16.1088, Windows 11 build 26300, Rust 1.98.1 MSVC, debug) With #3 and #16 merged locally: - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean (also with #14 instead of #16) - `victory-gpu` lib: 109 passed, 0 failed, 4 ignored. `victory-hle` lib: 103 passed (104 with #14), 0 failed, 1 ignored - `victory-shader` lib: 266 passed, 0 failed, 6 ignored. Without the `valu_tests.rs` change: 262 passed, 4 failed - `cargo test --workspace --locked --no-fail-fast`: the remaining failure is `repository_passes_policy` (`lower.rs` over the size limit, listed in the README). In that run the `victory-shader` tests hung (one core busy, GPU idle) and I killed them after about 10 minutes; a second run of that library alone also hit my 8-minute limit. The groups I then ran alone passed, and the next full run of the library finished in 168 s. I have not found the cause, nor shown that it happens without this change. **Not tested:** AMD, Intel, a machine without a GPU, the game. **AI use:** Claude Code (Claude Sonnet 5.5) wrote the changes, ran the tests and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A host that caps the view heap at 1,000,000 got 933,440 title slots even
when fewer were asked for, which fails
dynamic_slots_are_held_until_released there. No change for a request
larger than that.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Also one test-only lint in victory-hle. Needs the victory-shader fixes
of #3 for CI to get this far. Removes the unused test_queue helper and
RSP constant; elsewhere automatic fixes, SAFETY comments and allows.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:34:35 +00:00
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-25 17:24 UTC · original

The descriptor/host.rs part of this (24c3128) can be checked on a GPU that is not capped. On a branch based on 01aadd1, I added a test-only thread-local cap to the create closure in HostHeap::new: above it (PORTABLE_VIEWS), creating a shader-visible view heap returns E_INVALIDARG. Two tests set the cap:

  • a 4-slot view heap on the simulated capped host: (count, spare) == (4, DYNAMIC_CAPPED), then the dynamic_slots_are_held_until_released checks;
  • a PORTABLE_VIEWS-slot request: 933,440 title slots, DYNAMIC_CAPPED dynamic slots, in a 1,000,000-slot heap.

On an RX 7900 XT (not capped; Windows 11 26300, Rust 1.98.1), the first test fails on main with (933440, 65536) vs (4, 65536), the count reported in #4, and both pass with this PR's capped branch. The second also passes on main, so it only guards the capped path.

I also checked the old lost field. With a tracing subscriber installed, main panics in a debug build with "attempt to subtract with overflow" for a 4-slot heap. With this PR's saturating_sub it does not.

If useful, I can post the hook and tests as a patch here or open them as a PR on top of this one. Not tested on an NVIDIA card or with the game.

**@⁠adrianmjim** on GitHub · 2026-11-25 17:24 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/52#issuecomment-7169459537) The `descriptor/host.rs` part of this (24c3128) can be checked on a GPU that is not capped. On a branch based on `01aadd1`, I added a test-only thread-local cap to the `create` closure in `HostHeap::new`: above it (`PORTABLE_VIEWS`), creating a shader-visible view heap returns `E_INVALIDARG`. Two tests set the cap: - a 4-slot view heap on the simulated capped host: `(count, spare) == (4, DYNAMIC_CAPPED)`, then the `dynamic_slots_are_held_until_released` checks; - a `PORTABLE_VIEWS`-slot request: 933,440 title slots, `DYNAMIC_CAPPED` dynamic slots, in a 1,000,000-slot heap. On an RX 7900 XT (not capped; Windows 11 26300, Rust 1.98.1), the first test fails on `main` with `(933440, 65536)` vs `(4, 65536)`, the count reported in #4, and both pass with this PR's capped branch. The second also passes on `main`, so it only guards the capped path. I also checked the old `lost` field. With a tracing subscriber installed, `main` panics in a debug build with "attempt to subtract with overflow" for a 4-slot heap. With this PR's `saturating_sub` it does not. If useful, I can post the hook and tests as a patch here or open them as a PR on top of this one. Not tested on an NVIDIA card or with the game.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
  • crates/victory-gpu/src/pipeline.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/52/head:github-bot/gh-52'
git switch 'github-bot/gh-52'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-52'
git switch 'github-bot/gh-52'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-52'
git switch 'github-bot/gh-52'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-52'
git switch 'main'
git merge --squash 'github-bot/gh-52'
git switch 'main'
git merge --ff-only 'github-bot/gh-52'
git switch 'main'
git merge 'github-bot/gh-52'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.