Use the test adapter's wave width for offline pipeline checks #76

Open
dervoxx wants to merge 1 commit from upstream-pr/76 into main
dervoxx commented 2026-11-24 21:16:29 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by dervoxx on 2026-11-24T21:16:29Z.


A 32-lane adapter can reject a compute pipeline during offline validation even when the runtime's wave-width selection can build it. The runtime queries D3D12 options on startup. The offline checker previously required a width override to make the same choice.

This change reads WaveLaneCountMax from the device already opened for translate --pipelines and sets the translator's limit before workers start. Explicit VICTORY_HOST_MAX_WAVE and VICTORY_HOST_WAVE settings retain precedence in that order. Translation without pipeline creation continues to work without an adapter. If the query fails or returns zero, the translator keeps its existing default.

Verification

Compared clean main 4e17478 with 25e40e2 on Windows, RTX 5080, driver 32.0.16.2101. Both builds received the same four private compute inputs and translate --validate --pipelines. With VICTORY_WAVE_WIDE=1, all four inputs passed DXIL validation in every case.

Configuration Pipelines created on main Pipelines created with patch
Automatic width 0/4 2/4
Explicit 32 lanes 2/4 (MAX_WAVE) 2/4 (HOST_WAVE)

On the patched build, setting MAX_WAVE to 64 alongside HOST_WAVE=32 selected 64 and reproduced 0/4. Without the wide-wave opt-in both automatic configurations created 0/4 for this sample. The two remaining pipeline refusals are unresolved. The measured improvement concerns the offline checker's agreement with an explicit 32-lane target. Frame rate and gameplay were outside this comparison.

Both workspace Clippy configurations passed with warnings denied, and the staged asset policy passed. Only source changes are included. AI-assisted implementation and testing with Codex.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6591581392 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/76). Originally posted by [dervoxx](https://github.com/dervoxx) on 2026-11-24T21:16:29Z. --- A 32-lane adapter can reject a compute pipeline during offline validation even when the runtime's wave-width selection can build it. The runtime queries D3D12 options on startup. The offline checker previously required a width override to make the same choice. This change reads `WaveLaneCountMax` from the device already opened for `translate --pipelines` and sets the translator's limit before workers start. Explicit `VICTORY_HOST_MAX_WAVE` and `VICTORY_HOST_WAVE` settings retain precedence in that order. Translation without pipeline creation continues to work without an adapter. If the query fails or returns zero, the translator keeps its existing default. ### Verification Compared clean main `4e17478` with `25e40e2` on Windows, RTX 5080, driver 32.0.16.2101. Both builds received the same four private compute inputs and `translate --validate --pipelines`. With `VICTORY_WAVE_WIDE=1`, all four inputs passed DXIL validation in every case. | Configuration | Pipelines created on main | Pipelines created with patch | | --- | ---: | ---: | | Automatic width | 0/4 | 2/4 | | Explicit 32 lanes | 2/4 (MAX_WAVE) | 2/4 (HOST_WAVE) | On the patched build, setting MAX_WAVE to 64 alongside HOST_WAVE=32 selected 64 and reproduced 0/4. Without the wide-wave opt-in both automatic configurations created 0/4 for this sample. The two remaining pipeline refusals are unresolved. The measured improvement concerns the offline checker's agreement with an explicit 32-lane target. Frame rate and gameplay were outside this comparison. Both workspace Clippy configurations passed with warnings denied, and the staged asset policy passed. Only source changes are included. AI-assisted implementation and testing with Codex.
adriaespii commented 2026-11-24 22:07:36 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by adriaespii on 2026-11-24T21:43:59Z.


Independent test run on commit 25e40e2 (AMD RDNA4):

  • Hardware: AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (x86_64-pc-windows-msvc)
  • cargo clippy --workspace --all-targets -- -D warnings: 0 warnings
  • cargo test --workspace: 496 passed, 0 failed, 7 ignored (victory-shader: 210 passed, 0 failed, 2 ignored; victory-gpu: 110 passed, 0 failed, 1 ignored)
  • Not tested: offline retail shader pack run (no game files on this machine)

AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7145315703 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/76#issuecomment-7145315703). Originally posted by [adriaespii](https://github.com/adriaespii) on 2026-11-24T21:43:59Z. --- Independent test run on commit `25e40e2` (AMD RDNA4): - **Hardware:** AMD Radeon RX 9070 (driver 32.0.32015.7029), AMD Ryzen 5 7600, Windows 11 Pro, Rust 1.98.1 (`x86_64-pc-windows-msvc`) - `cargo clippy --workspace --all-targets -- -D warnings`: 0 warnings - `cargo test --workspace`: 496 passed, 0 failed, 7 ignored (`victory-shader`: 210 passed, 0 failed, 2 ignored; `victory-gpu`: 110 passed, 0 failed, 1 ignored) - **Not tested:** offline retail shader pack run (no game files on this machine) *AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report.*
arminkhaleghirod commented 2026-11-25 00:10:08 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by arminkhaleghirod on 2026-11-24T23:31:31Z.


RTX 4080, Windows 11. Ran translate --validate --pipelines over the full title on main 90228a7 + #61, with and without this PR:

Compute pipelines created Refused (The parameter is incorrect)
without 2,328 of 2,720 392
with this PR 2,694 of 2,718 24

So most of the offline refusals were the wave-width mismatch, not the translation. With the real 32-lane width, translation changes slightly, as it does in the game: +3 a first-lane read where not every lane runs, and 2 a wave sum of 16-bit floats … become 1 a lane mask exchanged …. Vertex/pixel and mesh are unchanged (all pipelines created).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7147497420 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/76#issuecomment-7147497420). Originally posted by [arminkhaleghirod](https://github.com/arminkhaleghirod) on 2026-11-24T23:31:31Z. --- RTX 4080, Windows 11. Ran `translate --validate --pipelines` over the full title on main 90228a7 + #61, with and without this PR: | | Compute pipelines created | Refused (`The parameter is incorrect`) | |---|---|---| | without | 2,328 of 2,720 | 392 | | with this PR | 2,694 of 2,718 | 24 | So most of the offline refusals were the wave-width mismatch, not the translation. With the real 32-lane width, translation changes slightly, as it does in the game: +3 `a first-lane read where not every lane runs`, and 2 `a wave sum of 16-bit floats …` become 1 `a lane mask exchanged …`. Vertex/pixel and mesh are unchanged (all pipelines created).
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/76:upstream-pr/76'
git switch 'upstream-pr/76'

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/76'
git switch 'upstream-pr/76'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/76'
git switch 'upstream-pr/76'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/76'
git switch 'main'
git merge --squash 'upstream-pr/76'
git switch 'main'
git merge --ff-only 'upstream-pr/76'
git switch 'main'
git merge 'upstream-pr/76'
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
fxceless/victory-fork!76
No description provided.