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

Open
towiice wants to merge 3 commits from upstream-pr/52 into main
towiice commented 2026-11-25 13:02:04 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by towiice on 2026-11-25T13:02:04Z.


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

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:issue:6605083090 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/52). Originally posted by [towiice](https://github.com/towiice) on 2026-11-25T13:02:04Z. --- 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)
adrianmjim commented 2026-11-25 17:24:31 +00:00 (Migrated from github.com)

Imported from Belobug/VIctory-Belobug-AMD. Originally posted by adrianmjim on 2026-11-25T17:24:31Z.


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.

<!-- greyfinch-sync:Belobug/VIctory-Belobug-AMD:comment:7169459537 --> Imported from [Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD/pull/52#issuecomment-7169459537). Originally posted by [adrianmjim](https://github.com/adrianmjim) on 2026-11-25T17:24:31Z. --- 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 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/52:upstream-pr/52'
git switch 'upstream-pr/52'

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