GPU: wave64 compute the translator sized runs on 32-lane hosts (stacked on #1922 and #233) #2649

Open
Pierrot1398 wants to merge 30 commits from upstream-pr/2651 into main
Pierrot1398 commented 2026-11-25 17:34:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Pierrot1398 on 2026-11-25T17:34:33Z.


From a tester working with Claude (AI-assisted); measured on my own machine.

Stacked on #1922 and #233. The first commit merges both into current main (13f91ca); only the last commit is new. They are open separately and refuse each other's work when merged together, so this is the piece that makes them combine.

Problem

Together, #1922 and #233 drop a wave64 compute program that would run correctly:

  • #1922 refuses a console wave64 compute program on a host without 64-lane waves (NVIDIA: 32..32) unless its DXIL declares a wave size the host runs.
  • #233 translates console wave64 compute programs for 32-lane hosts. Programs whose lanes read the other half run as two halves or in the console flow, with WaveSize(32). Programs it found to read no lane of the other half get no wave size, because they run per lane at any size.

So #1922 refuses exactly the second kind, which #233 had shown to be safe.

On an RTX 5060 Ti with both PRs, one such program (052a2316a03b9ba1) was dropped on every loading frame ("dropped 1.0/frame without a host pipeline"), and the run ended at the title's watchdog +0x23cf683 (#1118) while the intro prestreamed.

Change

wave_lanes_unsupported (pipeline/host.rs): an unsized console wave64 compute program is kept on a host without 64-lane waves.

  • Mesh programs, which #233 does not analyse, are still refused.
  • VICTORY_WAVE64_STRICT=1 restores the refusal for compute too, in case a hang shows up. It's documented in the README's table.
  • #1922's tests now state the new rule.

The merge commit also resolves lower.rs against main:

  • main's new uniform_join and quad-helper comment sit next to #233's console_read_lane and console-flow note.
  • main's new lane-mask join propagates lane_bit's refusal, which #233 made fallible.
  • Two of main's new tests pass #233's lowering target and console_cf fields.

Measured

RTX 5060 Ti 8 GB, driver 621.24, Windows 11 26300, on a tree with the other open NVIDIA fixes:

  • 052a2316… runs ("dropped 0 without a host pipeline").
  • That run no longer stopped at +0x23cf683 before running out of host memory on this 13.9 GB machine.
  • translate --host-lanes 32-32: 2,330 of 2,679 compute programs and 8,765 of 8,765 mesh programs emitted.

On this branch alone:

  • cargo test -p victory-gpu --lib: 197 passed. The 2 failures are the capped-heap tests, which fail on main on this card (fixed by #1779, on current main in #2650).
  • cargo clippy -p victory-gpu -- -D warnings and cargo xtask policy are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_011f6R3kMoarujHzzA1AvSBb

<!-- greyfinch-sync:Marvisak/VIctory:issue:6610114722 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2651). Originally posted by [Pierrot1398](https://github.com/Pierrot1398) on 2026-11-25T17:34:33Z. --- *From a tester working with Claude (AI-assisted); measured on my own machine.* **Stacked on #1922 and #233.** The first commit merges both into current `main` (`13f91ca`); only the last commit is new. They are open separately and refuse each other's work when merged together, so this is the piece that makes them combine. ## Problem Together, #1922 and #233 drop a wave64 compute program that would run correctly: - #1922 refuses a console wave64 compute program on a host without 64-lane waves (NVIDIA: 32..32) unless its DXIL declares a wave size the host runs. - #233 translates console wave64 compute programs for 32-lane hosts. Programs whose lanes read the other half run as two halves or in the console flow, with `WaveSize(32)`. Programs it found to read **no lane of the other half** get no wave size, because they run per lane at any size. So #1922 refuses exactly the second kind, which #233 had shown to be safe. On an RTX 5060 Ti with both PRs, one such program (`052a2316a03b9ba1`) was dropped on every loading frame ("dropped 1.0/frame without a host pipeline"), and the run ended at the title's watchdog `+0x23cf683` (#1118) while the intro prestreamed. ## Change `wave_lanes_unsupported` (`pipeline/host.rs`): an unsized console wave64 **compute** program is kept on a host without 64-lane waves. - Mesh programs, which #233 does not analyse, are still refused. - `VICTORY_WAVE64_STRICT=1` restores the refusal for compute too, in case a hang shows up. It's documented in the README's table. - #1922's tests now state the new rule. The merge commit also resolves `lower.rs` against `main`: - `main`'s new `uniform_join` and quad-helper comment sit next to #233's `console_read_lane` and console-flow note. - `main`'s new lane-mask join propagates `lane_bit`'s refusal, which #233 made fallible. - Two of `main`'s new tests pass #233's lowering `target` and `console_cf` fields. ## Measured RTX 5060 Ti 8 GB, driver 621.24, Windows 11 26300, on a tree with the other open NVIDIA fixes: - `052a2316…` runs ("dropped 0 without a host pipeline"). - That run no longer stopped at `+0x23cf683` before running out of host memory on this 13.9 GB machine. - `translate --host-lanes 32-32`: 2,330 of 2,679 compute programs and 8,765 of 8,765 mesh programs emitted. On this branch alone: - `cargo test -p victory-gpu --lib`: 197 passed. The 2 failures are the capped-heap tests, which fail on `main` on this card (fixed by #1779, on current `main` in #2650). - `cargo clippy -p victory-gpu -- -D warnings` and `cargo xtask policy` are clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011f6R3kMoarujHzzA1AvSBb
Bj0rnis commented 2026-11-25 18:02:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Bj0rnis on 2026-11-25T17:40:51Z.


Independent Windows 11 + NVIDIA GeForce RTX 5070 Ti (32-lane Blackwell host) + WARP verification of #2651 at 59438221 (clean git merge-tree with origin/main 13f91cae, Rust 1.98.1 MSVC):

  • NVIDIA GeForce RTX 5070 Ti (victory-gpu): cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1 -> 200 passed, 2 failed, 1 ignored (2.74s; includes the 4 new tests, only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures also present on main 13f91cae).
  • WARP (VICTORY_D3D12_WARP=1): 202 passed, 0 failed, 1 ignored (1.71s).
  • Clippy (victory, victory-gpu, victory-shader): --all-targets --locked -- -D warnings -> 0 warnings across all three crates.
  • Asset policy: cargo xtask policy -> 185 files ok.
  • Note on victory-shader tests: hit the pre-existing 0xc0000005 (STATUS_ACCESS_VIOLATION) in emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index on RTX 5070 Ti, which reproduces identically on clean main 13f91cae.

Not tested: live game workload / victory bin tests.

AI-assisted test run and summary.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7169847594 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2651#issuecomment-7169847594). Originally posted by [Bj0rnis](https://github.com/Bj0rnis) on 2026-11-25T17:40:51Z. --- Independent Windows 11 + NVIDIA GeForce RTX 5070 Ti (32-lane Blackwell host) + WARP verification of #2651 at `59438221` (clean `git merge-tree` with `origin/main` `13f91cae`, Rust 1.98.1 MSVC): - **NVIDIA GeForce RTX 5070 Ti (`victory-gpu`):** `cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1` -> **200 passed, 2 failed, 1 ignored** (2.74s; includes the 4 new tests, only the 2 pre-existing #1744 NVIDIA 1M view-heap baseline failures also present on `main` `13f91cae`). - **WARP (`VICTORY_D3D12_WARP=1`):** **202 passed, 0 failed, 1 ignored** (1.71s). - **Clippy (`victory`, `victory-gpu`, `victory-shader`):** `--all-targets --locked -- -D warnings` -> **0 warnings** across all three crates. - **Asset policy:** `cargo xtask policy` -> **185 files ok**. - **Note on `victory-shader` tests:** hit the pre-existing `0xc0000005` (`STATUS_ACCESS_VIOLATION`) in `emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index` on RTX 5070 Ti, which reproduces identically on clean `main` `13f91cae`. Not tested: live game workload / `victory` bin tests. AI-assisted test run and summary.
kotekompotek commented 2026-11-25 18:02:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:54:11Z.


Reviewed (partial): the --host-lanes MIN-MAX flag + VICTORY_WAVE64_STRICT is the fuller version of what #2633 attempted (which still has committed merge-conflict markers in its README — this PR subsumes it cleanly). Stacking on #1922/#233 is honest about dependencies. CI green.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170159146 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2651#issuecomment-7170159146). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:54:11Z. --- Reviewed (partial): the `--host-lanes MIN-MAX` flag + `VICTORY_WAVE64_STRICT` is the fuller version of what #2633 attempted (which still has committed merge-conflict markers in its README — this PR subsumes it cleanly). Stacking on #1922/#233 is honest about dependencies. CI green.
pickles976 commented 2026-11-25 21:03:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-25T20:38:11Z.


Independent Linux/Wine + NVIDIA Ada validation of exact head 5943822168c6aa94440c5b1dd3e96708471ea323, before applying any local compatibility integrations.

RTX 4060 Laptop GPU (8 GB), NVIDIA 590.48.1, 16 GB system RAM, Wine 11.0, DXVK/vkd3d-proton, Rust 1.98.1 Windows-MSVC cross-build. VICTORY_ADAPTER=nvidia, DXVK_CONFIG='dxgi.hideNvidiaGpu = False'; no desktop display required for these offscreen tests.

Focused check Result
pipeline::host::tests::{emitted_wave_size_checked_against_host_range,wave_lanes_refusal_reports_emitted_and_host_ranges,dxil_wave_lanes_reads_psv0_bounds} 3 passed, 0 failed/ignored
emit::split_tests 12 passed, 0 failed/ignored, 11.56 s

The GPU cases actually dispatched on NVIDIA GeForce RTX 4060 Laptop GPU, not a hardware-absent early return: output reports exact results with split true for DPP row masks, the branch skipped by one half, v_readfirstlane, in-half reads (32/64/128 threads), lane 40 reads, the divergent loop, whole-mask counts (32/48/64 threads), saveexec SCC and all six 3-D layouts. These are numerical synthetic checks, not a pipeline-creation-only result.

Commands, with the usual Wine runner and NVIDIA ICD configured:

cargo +1.98.1 test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib -- --nocapture --test-threads=1 emitted_wave_size_checked_against_host_range wave_lanes_refusal_reports_emitted_and_host_ranges dxil_wave_lanes_reads_psv0_bounds
cargo +1.98.1 test --locked --target x86_64-pc-windows-msvc -p victory-shader --lib emit::split_tests -- --nocapture --test-threads=1

Limits: not a full-library run, title/world-entry test, runtime shader census, FPS measurement, or long-duration stability result. DXVK logged its CreateDXGIFactory2: Ignoring flags / unknown-interface warnings; this is not a warning-free-log claim. No code change proposed here; adding coverage for the Wine/NVIDIA path to the existing PR.

AI-assisted execution and report: omp / openai-codex/gpt-6-astra.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7173962703 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2651#issuecomment-7173962703). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-25T20:38:11Z. --- Independent **Linux/Wine + NVIDIA Ada** validation of exact head `5943822168c6aa94440c5b1dd3e96708471ea323`, before applying any local compatibility integrations. RTX 4060 Laptop GPU (8 GB), NVIDIA 590.48.1, 16 GB system RAM, Wine 11.0, DXVK/vkd3d-proton, Rust 1.98.1 Windows-MSVC cross-build. `VICTORY_ADAPTER=nvidia`, `DXVK_CONFIG='dxgi.hideNvidiaGpu = False'`; no desktop display required for these offscreen tests. | Focused check | Result | |---|---| | `pipeline::host::tests::{emitted_wave_size_checked_against_host_range,wave_lanes_refusal_reports_emitted_and_host_ranges,dxil_wave_lanes_reads_psv0_bounds}` | **3 passed**, 0 failed/ignored | | `emit::split_tests` | **12 passed**, 0 failed/ignored, 11.56 s | The GPU cases actually dispatched on **NVIDIA GeForce RTX 4060 Laptop GPU**, not a hardware-absent early return: output reports exact results with `split true` for DPP row masks, the branch skipped by one half, `v_readfirstlane`, in-half reads (32/64/128 threads), lane 40 reads, the divergent loop, whole-mask counts (32/48/64 threads), saveexec SCC and all six 3-D layouts. These are numerical synthetic checks, not a pipeline-creation-only result. Commands, with the usual Wine runner and NVIDIA ICD configured: ```sh cargo +1.98.1 test --locked --target x86_64-pc-windows-msvc -p victory-gpu --lib -- --nocapture --test-threads=1 emitted_wave_size_checked_against_host_range wave_lanes_refusal_reports_emitted_and_host_ranges dxil_wave_lanes_reads_psv0_bounds cargo +1.98.1 test --locked --target x86_64-pc-windows-msvc -p victory-shader --lib emit::split_tests -- --nocapture --test-threads=1 ``` **Limits:** not a full-library run, title/world-entry test, runtime shader census, FPS measurement, or long-duration stability result. DXVK logged its `CreateDXGIFactory2: Ignoring flags` / unknown-interface warnings; this is not a warning-free-log claim. No code change proposed here; adding coverage for the Wine/NVIDIA path to the existing PR. _AI-assisted execution and report: omp / openai-codex/gpt-6-astra._
Marvisak commented 2026-11-25 23:06:02 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

This PR no longer merges cleanly into main (f3578e3): apps/victory/src/main.rs and crates/victory-shader/src/emit/host.rs conflict with changes that landed on main. It will be reviewed once it is rebased.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176139324 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2651#issuecomment-7176139324). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:15:43Z. --- <!-- victory-triage v1 head=5943822168c6aa94440c5b1dd3e96708471ea323 verdict=needs-rebase at=2026-11-25T22:15:11Z --> Automated triage for the maintainers. This PR no longer merges cleanly into `main` (f3578e3): `apps/victory/src/main.rs` and `crates/victory-shader/src/emit/host.rs` conflict with changes that landed on `main`. It will be reviewed once it is rebased. --- _Generated by [Claude Code](https://claude.ai/code)_
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/2651:upstream-pr/2651'
git switch 'upstream-pr/2651'

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