Main green again: unwind_copy only with diagnostics, the lane-read GPU test returns with no hardware device #2019

Open
101Leafy wants to merge 5 commits from upstream-pr/2019 into main
101Leafy commented 2026-11-29 07:36:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 101Leafy on 2026-11-29T07:36:09Z.


Main's check fails on clippy before any test runs: function unwind_copy is never used in crates/victory-loader/src/crash.rs. Its only caller is the stack sampler in stacks.rs, which is built with the diagnostics feature only, so the plain clippy step sees a dead function. It now carries #[cfg(feature = "diagnostics")] too. Nothing changes in either build.

nv05d1_native_readlane_gpu_reference panicked on runners with no GPU ("NV05D1 requires hardware GPU readback"). It now returns when there is no device, the same as the other tests in wave64_tests.rs. With a GPU it runs and checks as before.

The checked_div half of the earlier version is in main already, so it dropped out with the merge. With this in, every open PR rebased on main can go green again.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5548679504 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2019). Originally posted by [101Leafy](https://github.com/101Leafy) on 2026-11-29T07:36:09Z. --- Main's `check` fails on clippy before any test runs: `function unwind_copy is never used` in crates/victory-loader/src/crash.rs. Its only caller is the stack sampler in stacks.rs, which is built with the diagnostics feature only, so the plain clippy step sees a dead function. It now carries `#[cfg(feature = "diagnostics")]` too. Nothing changes in either build. nv05d1_native_readlane_gpu_reference panicked on runners with no GPU ("NV05D1 requires hardware GPU readback"). It now returns when there is no device, the same as the other tests in wave64_tests.rs. With a GPU it runs and checks as before. The checked_div half of the earlier version is in main already, so it dropped out with the merge. With this in, every open PR rebased on main can go green again.
ANDREANIADS commented 2026-11-29 07:43:09 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ANDREANIADS on 2026-11-29T07:43:09Z.


The return added in de0bbd4 exits the seven-case loop on the first missing readback. In the earlier control-flow reproduction, only the first case reached IR/lowering. The remaining six also miss optional DXIL validation.

Could all seven CPU checks run on a runner without a suitable device, with an explicit skip for the hardware comparison? dispatched_words also returns None when an initialized device rejects pipeline creation. Reporting that error with its wave/lane would preserve the hardware check. A no-device fixture could assert seven CPU cases and zero readback comparisons.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252647079 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2019#issuecomment-7252647079). Originally posted by [ANDREANIADS](https://github.com/ANDREANIADS) on 2026-11-29T07:43:09Z. --- The `return` added in `de0bbd4` exits the seven-case loop on the first missing readback. In the [earlier control-flow reproduction](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1968#issuecomment-7251915926), only the first case reached IR/lowering. The remaining six also miss optional DXIL validation. Could all seven CPU checks run on a runner without a suitable device, with an explicit skip for the hardware comparison? `dispatched_words` also returns `None` when an initialized device rejects pipeline creation. Reporting that error with its wave/lane would preserve the hardware check. A no-device fixture could assert seven CPU cases and zero readback comparisons.
Yoshi-233 commented 2026-11-29 10:20:59 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-29T10:20:59Z.


I reproduced the loader failure on main at 829188e96. Applying the full diff of this PR at 8c57474dc clears unwind_copy and lets the default check reach victory-gpu. The Windows job for this PR reports 28 library diagnostics and 25 for the test build, with overlap.

I also checked main and the exact Actions merge commits for #1995, #2138 and #2156. Each had its own initially empty Cargo target directory. I used Rust 1.98.1 from WSL, targeting x86_64-pc-windows-msvc, with cargo clippy --workspace --all-targets --locked --keep-going and -D warnings.

Patches applied to each checkout Features Distinct GPU diagnostics in each checkout
This PR default 30
This PR and #2048 all 36

For each row the four checkouts matched by lint, message and source location, including the repeated reports from the test build. In the default row, 16 of the 30 are unused items. In the all-features build #2048 also clears the missing mb helper and shadowed timing calls. The remaining diagnostics give a separate list to work through after the loader fix.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7254374515 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2019#issuecomment-7254374515). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-29T10:20:59Z. --- I reproduced the loader failure on main at `829188e96`. Applying the full diff of this PR at `8c57474dc` clears `unwind_copy` and lets the default check reach `victory-gpu`. The [Windows job for this PR](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46248076888/job/141299694865) reports 28 library diagnostics and 25 for the test build, with overlap. I also checked main and the exact Actions merge commits for #1995, #2138 and #2156. Each had its own initially empty Cargo target directory. I used Rust 1.98.1 from WSL, targeting `x86_64-pc-windows-msvc`, with `cargo clippy --workspace --all-targets --locked --keep-going` and `-D warnings`. | Patches applied to each checkout | Features | Distinct GPU diagnostics in each checkout | | --- | --- | ---: | | This PR | default | 30 | | This PR and #2048 | all | 36 | For each row the four checkouts matched by lint, message and source location, including the repeated reports from the test build. In the default row, 16 of the 30 are unused items. In the all-features build #2048 also clears the missing `mb` helper and shadowed `timing` calls. The remaining diagnostics give a separate list to work through after the loader fix.
fainty0 commented 2026-11-29 14:45:03 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by fainty0 on 2026-11-29T14:45:03Z.

Review: CHANGES_REQUESTED


Review: Request changes

The early return in crates/victory-shader/src/emit/wave64_tests.rs:2665 hides pipeline creation failures and skips six headless cases. Please run all seven lowering checks and skip only the readback on confirmed unsupported hardware. The diagnostics gating of unwind_copy in crates/victory-loader/src/crash.rs:804 is correct without suppression. No style or asset-policy concerns.

Compared with the alternatives: #1290 has a merge conflict, a missing trait import and a policy regression; #1566 has five conflicts and adds nothing once merged. I'd take this PR over both once the skip is narrowed.

Windows Clippy: main fails both gates; this PR fixes the five named lints and adds no new diagnostics. Windows tests not run (no Windows).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:review:6103361871 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2019#pullrequestreview-6103361871). Originally posted by [fainty0](https://github.com/fainty0) on 2026-11-29T14:45:03Z. **Review:** CHANGES_REQUESTED --- ## Review: Request changes The early return in `crates/victory-shader/src/emit/wave64_tests.rs:2665` hides pipeline creation failures and skips six headless cases. Please run all seven lowering checks and skip only the readback on confirmed unsupported hardware. The diagnostics gating of `unwind_copy` in `crates/victory-loader/src/crash.rs:804` is correct without suppression. No style or asset-policy concerns. Compared with the alternatives: #1290 has a merge conflict, a missing trait import and a policy regression; #1566 has five conflicts and adds nothing once merged. I'd take this PR over both once the skip is narrowed. **Windows Clippy:** main fails both gates; this PR fixes the five named lints and adds no new diagnostics. Windows tests not run (no Windows).
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/2019:upstream-pr/2019'
git switch 'upstream-pr/2019'

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