[BUNDLE] Wave64 compute on 32-lane hosts: #189 merged onto the shader stack, stacked on #1511 #1588

Closed
MamaLeVrai wants to merge 104 commits from upstream-pr/1589 into main
MamaLeVrai commented 2026-11-24 19:31:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T19:31:01Z.


A merge resolution for one PR. #189 emulates Wave64 compute shaders on 32-lane and narrower hosts. The open issues from NVIDIA owners keep hitting that wall: compute pipelines refused because the shaders ask for wave size 64 and the device maximum is 32 (#1107, #1323, #1001). This is #189 merged onto the whole shader stack (#1319, #1402, #1492, #1504, #1511), where it conflicts and fails to compile in a few places. Every head is merged unchanged onto main plus #1511, and the result is built and tested together.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below, so one run covers all of it.

What is inside

PR Author Head Title
#189 alfycs 54b333fc5 Shaders: emulate Wave64 compute shaders on Wave32 and narrower hosts

Changes made while bundling

No change inside #189. Two things came up when merging it onto the stack:

  • One conflict in the tests of emit/lower.rs: a helper that builds Parts and calls lower. #189 adds an options field to Parts (options: TranslateOptions::default()); another PR of the stack reformatted the closing lines of the same call. Resolution: #189's field, in rustfmt's layout.
  • Three struct literals that fail to compile: tests added by other PRs of the stack (cube_image_get_lod_lowers from #1004 and image_atomics_64_bit_lower_with_typed_int64_flag from #305 in emit/lower.rs, and build in emit/root_view_tests.rs from #1056) build Parts without the new options field. Each now has options: super::TranslateOptions::default(), which is what #189 does in its own tests.

That is all of the merge: #189 does not conflict with the stack in the lowering itself.

Left out, and why

  • #233, #320 and #439: the series that #813 (group 13) lists as the competing design for wave64 compute on 32-lane hosts. They are not in this bundle; which design to take is the maintainer's choice, and this bundle only shows that #189 can sit on the stack and pass.
  • Measurements: none yet for this PR on the stack. justlovett0's stack on #1492 (RTX 3080, in the comment there) included #189 and reported a stable world for about 9 minutes with 0 device removals, which is his run, not this branch.
  • Overlap with the GPU bundles: this bundle is built on the shader stack only. Merged together with #1426 and #1439 it conflicts in host.rs (#208's capability probe next to #189's recommended_wave64_mode) and in shader_cache.rs (#189's mode byte in the cache input, input[33..], next to #358's translated flag), and two tests of #358 then need the new Wave64Mode argument of cached(). The resolution is small and is in the merge commit on top of the branch bundle/all of MamaLeVrai/VIctory (clippy twice and 725 tests pass there); no bridge pull request, as the GPU bundles do not depend on this one.

Verification

Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 430 passed, 0 failed, 6 ignored (main: 342 passed, 6 ignored)

The title was not run, so this says nothing about in-game effect. No game data is used or committed.

Re-verify in one go

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/wave64-189
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

To confirm that no component PR moved since this was built, compare each Head above with gh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.

If this lands

The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.

AI-assisted (Claude Code); no game data.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6589753340 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T19:31:01Z. --- **A merge resolution for one PR.** #189 emulates Wave64 compute shaders on 32-lane and narrower hosts. The open issues from NVIDIA owners keep hitting that wall: compute pipelines refused because the shaders ask for wave size 64 and the device maximum is 32 (#1107, #1323, #1001). This is #189 merged onto the whole shader stack (#1319, #1402, #1492, #1504, #1511), where it conflicts and fails to compile in a few places. Every head is merged unchanged onto `main` plus #1511, and the result is built and tested together. > For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a `[BUNDLE]` PR. The re-verification commands are below, so one run covers all of it. ## What is inside | PR | Author | Head | Title | |---|---|---|---| | #189 | alfycs | `54b333fc5` | Shaders: emulate Wave64 compute shaders on Wave32 and narrower hosts | ## Changes made while bundling No change inside #189. Two things came up when merging it onto the stack: - **One conflict** in the tests of `emit/lower.rs`: a helper that builds `Parts` and calls `lower`. #189 adds an `options` field to `Parts` (`options: TranslateOptions::default()`); another PR of the stack reformatted the closing lines of the same call. Resolution: #189's field, in rustfmt's layout. - **Three struct literals that fail to compile**: tests added by other PRs of the stack (`cube_image_get_lod_lowers` from #1004 and `image_atomics_64_bit_lower_with_typed_int64_flag` from #305 in `emit/lower.rs`, and `build` in `emit/root_view_tests.rs` from #1056) build `Parts` without the new `options` field. Each now has `options: super::TranslateOptions::default()`, which is what #189 does in its own tests. That is all of the merge: #189 does not conflict with the stack in the lowering itself. ## Left out, and why - **#233**, **#320** and **#439**: the series that #813 (group 13) lists as the competing design for wave64 compute on 32-lane hosts. They are not in this bundle; which design to take is the maintainer's choice, and this bundle only shows that #189 can sit on the stack and pass. - Measurements: none yet for this PR on the stack. justlovett0's stack on #1492 (RTX 3080, in the comment there) included #189 and reported a stable world for about 9 minutes with 0 device removals, which is his run, not this branch. - **Overlap with the GPU bundles**: this bundle is built on the shader stack only. Merged together with #1426 and #1439 it conflicts in `host.rs` (#208's capability probe next to #189's `recommended_wave64_mode`) and in `shader_cache.rs` (#189's mode byte in the cache input, `input[33..]`, next to #358's `translated` flag), and two tests of #358 then need the new `Wave64Mode` argument of `cached()`. The resolution is small and is in the merge commit on top of the branch `bundle/all` of `MamaLeVrai/VIctory` (clippy twice and 725 tests pass there); no bridge pull request, as the GPU bundles do not depend on this one. ## Verification Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain): | Check | Result | |---|---| | `cargo clippy --workspace --all-targets --locked -- -D warnings` | clean | | `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` | clean | | `cargo test --workspace --locked` | 430 passed, 0 failed, 6 ignored (`main`: 342 passed, 6 ignored) | The title was not run, so this says nothing about in-game effect. No game data is used or committed. ## Re-verify in one go ```powershell git fetch https://github.com/MamaLeVrai/VIctory.git bundle/wave64-189 git checkout FETCH_HEAD cargo clippy --workspace --all-targets --locked -- -D warnings cargo clippy --workspace --all-targets --all-features --locked -- -D warnings cargo test --workspace --locked ``` To confirm that no component PR moved since this was built, compare each `Head` above with `gh pr view <n> --repo Marvisak/VIctory --json headRefOid`. If one differs, the branch needs a rebuild: merge the new head in the same order. ## If this lands The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above. AI-assisted (Claude Code); no game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot commented 2026-11-24 20:02:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T19:31:12Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:Marvisak/VIctory:review:6045966445 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589#pullrequestreview-6045966445). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/copilot-pull-request-reviewer%5Bbot%5D) on 2026-11-24T19:31:12Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Impre-visible commented 2026-11-24 20:03:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Impre-visible on 2026-11-24T19:53:03Z.


Test report for this bundle on a 32-lane host under Linux (not a code review).

Setup: Arch Linux, Wine from GE-Proton11-6 + vkd3d-proton (Proton Experimental), GTX 1660 6 GB (Turing, 32-lane waves only), NVIDIA 620.73.04, Series X mode, diagnostics build, empty shader cache, native d3dcompiler_47 in the prefix so indirect execution runs.

Tree: this bundle + #1077 #1175 #523 #530 #1040 #1406 #542 #1056 #1392 #1516 #1388 #1189 #1523 (all merge cleanly except #542, a small conflict in emit/lower.rs; #1407 conflicts in emit/lower.rs and is left out). cargo test -p victory-shader --lib: 153 passed, 0 failed, 1 ignored.

One run into the world, to frame 2073 (about 7 minutes):

without this bundle (#1511 stack, same extra PRs) with this bundle
compute pipelines made 477 474
compute pipelines refused by the host 111 0
device removed no no
shaders translated 1621 1475

So the refusals for WaveSize(64) are gone on this card.

Compute programs that now do not translate, by reason (distinct shaders warned about in this run): a lane mask holding lanes elsewhere read as data (67), v_readfirstlane in divergent control flow (64), a structured buffer of unknown stride (56), LDS accesses without a uniform LDS fence in split wave64 (40), a 64-lane wave ballot in divergent control flow (35), an address not from a root parameter (29).

By dropped work per frame the first one is LDS accesses without a uniform LDS fence in split wave64 (10 shaders actually dispatched).

The final image is still dark at frame 2048, and the title's stop of #1323 still comes at about frame 2000-2070. Runs differ in how many shaders they reach, so the two columns are one run each, not an exact A/B.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7142724028 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589#issuecomment-7142724028). Originally posted by [Impre-visible](https://github.com/Impre-visible) on 2026-11-24T19:53:03Z. --- Test report for this bundle on a 32-lane host under Linux (not a code review). **Setup:** Arch Linux, Wine from GE-Proton11-6 + vkd3d-proton (Proton Experimental), GTX 1660 6 GB (Turing, 32-lane waves only), NVIDIA 620.73.04, Series X mode, diagnostics build, empty shader cache, native `d3dcompiler_47` in the prefix so indirect execution runs. **Tree:** this bundle + #1077 #1175 #523 #530 #1040 #1406 #542 #1056 #1392 #1516 #1388 #1189 #1523 (all merge cleanly except #542, a small conflict in `emit/lower.rs`; #1407 conflicts in `emit/lower.rs` and is left out). `cargo test -p victory-shader --lib`: 153 passed, 0 failed, 1 ignored. **One run into the world, to frame 2073 (about 7 minutes):** | | without this bundle (#1511 stack, same extra PRs) | with this bundle | |---|---|---| | compute pipelines made | 477 | 474 | | **compute pipelines refused by the host** | **111** | **0** | | device removed | no | no | | shaders translated | 1621 | 1475 | So the refusals for `WaveSize(64)` are gone on this card. **Compute programs that now do not translate, by reason (distinct shaders warned about in this run):** a lane mask holding lanes elsewhere read as data (67), `v_readfirstlane` in divergent control flow (64), a structured buffer of unknown stride (56), LDS accesses without a uniform LDS fence in split wave64 (40), a 64-lane wave ballot in divergent control flow (35), an address not from a root parameter (29). By dropped work per frame the first one is `LDS accesses without a uniform LDS fence in split wave64` (10 shaders actually dispatched). The final image is still dark at frame 2048, and the title's stop of #1323 still comes at about frame 2000-2070. Runs differ in how many shaders they reach, so the two columns are one run each, not an exact A/B.
MamaLeVrai commented 2026-11-24 21:03:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T20:09:33Z.


Thank you, Impre-visible: 111 compute pipelines refused by the host down to 0 on a 32-lane card is the number this PR is for, and the list of walls that remain (lane mask holding lanes elsewhere, v_readfirstlane in divergent flow, unknown stride, split wave64 LDS fence, wave ballot in divergent flow, address not from a root parameter) is the useful next map. I see #1407 conflicts with #189 in emit/lower.rs in your tree; I am building your whole tree as one branch on top of this PR (the list you ran, with #1523, and #1407 resolved against #189 if it can be), and will post it here and on #1495 with the checks. AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7143123113 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589#issuecomment-7143123113). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T20:09:33Z. --- Thank you, Impre-visible: 111 compute pipelines refused by the host down to 0 on a 32-lane card is the number this PR is for, and the list of walls that remain (lane mask holding lanes elsewhere, `v_readfirstlane` in divergent flow, unknown stride, split wave64 LDS fence, wave ballot in divergent flow, address not from a root parameter) is the useful next map. I see #1407 conflicts with #189 in `emit/lower.rs` in your tree; I am building your whole tree as one branch on top of this PR (the list you ran, with #1523, and #1407 resolved against #189 if it can be), and will post it here and on #1495 with the checks. AI-assisted (Claude Code); no game data.
MamaLeVrai commented 2026-11-24 21:03:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T20:17:19Z.


Impre-visible: your tree is now one branch, #1638, stacked on this PR: #189 as merged here plus #1077 #1175 #523 #530 #1040 #1406 #1392 #1516 #1388 #1189 #1523 #542 (#1056 is already in #1319). Clippy (both runs) and cargo test --workspace pass on it (461 passed, two runs). #1407 is left out for the reason you found: it rewrites the lane-mask ballot in the same function as #189 (mask_dword), and I did not try to join two different rewrites. What it took beyond your list is described in #1638: the one-line keep_dynamic change after #1388, root_uavs in four test literals, the duplicate RENDER_TARGET constant between #1523 and #1040, #542's bound applied to the stack's raw-view branch, and a fix of #1040's test (it assumed every adapter refuses a typed UAV on B5G5R5A1; an RX 6950 XT accepts it). If your counts differ on that branch (MamaLeVrai/VIctory, bundle/nvidia-stack), I would like to know. AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7143310111 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589#issuecomment-7143310111). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T20:17:19Z. --- Impre-visible: your tree is now one branch, #1638, stacked on this PR: #189 as merged here plus #1077 #1175 #523 #530 #1040 #1406 #1392 #1516 #1388 #1189 #1523 #542 (#1056 is already in #1319). Clippy (both runs) and `cargo test --workspace` pass on it (461 passed, two runs). #1407 is left out for the reason you found: it rewrites the lane-mask ballot in the same function as #189 (`mask_dword`), and I did not try to join two different rewrites. What it took beyond your list is described in #1638: the one-line `keep_dynamic` change after #1388, `root_uavs` in four test literals, the duplicate `RENDER_TARGET` constant between #1523 and #1040, #542's bound applied to the stack's raw-view branch, and a fix of #1040's test (it assumed every adapter refuses a typed UAV on B5G5R5A1; an RX 6950 XT accepts it). If your counts differ on that branch (`MamaLeVrai/VIctory`, `bundle/nvidia-stack`), I would like to know. AI-assisted (Claude Code); no game data.
MamaLeVrai commented 2026-11-24 21:03:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MamaLeVrai on 2026-11-24T20:30:34Z.


Impre-visible: the unknown-stride wall (56 shaders in your list) has its own PR now, #1644 (#704 on #193, on top of #1511; branch bundle/stride-stack). Clippy (both runs) and 412 tests pass here; I did not run the title. It is built on #1511, not on #1589 or on your tree, so it does not change your wave64 numbers by itself.

I tried merging it onto your tree (#1638): 11 files and 28 conflict hunks (emit/lower.rs 6, emit/shader.rs 6, emit/mod.rs 4, pipeline/host.rs 3, shader_cache.rs 3, one in each of the other six), among them the root-UAV and wave64 changes. That is not a mechanical merge and I have not built it. If you want #1589 and the stride stack in one tree to run now, bundle/all has both (751 tests; it does not have your world-run list). The other walls in your list are not touched by it.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7143654173 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589#issuecomment-7143654173). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-24T20:30:34Z. --- Impre-visible: the unknown-stride wall (56 shaders in your list) has its own PR now, #1644 (#704 on #193, on top of #1511; branch `bundle/stride-stack`). Clippy (both runs) and 412 tests pass here; I did not run the title. It is built on #1511, not on #1589 or on your tree, so it does not change your wave64 numbers by itself. I tried merging it onto your tree (#1638): 11 files and 28 conflict hunks (`emit/lower.rs` 6, `emit/shader.rs` 6, `emit/mod.rs` 4, `pipeline/host.rs` 3, `shader_cache.rs` 3, one in each of the other six), among them the root-UAV and wave64 changes. That is not a mechanical merge and I have not built it. If you want #1589 and the stride stack in one tree to run now, `bundle/all` has both (751 tests; it does not have your world-run list). The other walls in your list are not touched by it. AI-assisted (Claude Code); no game data.
upstream-sync closed this pull request 2026-11-25 01:06:54 +00:00
Marvisak commented 2026-11-25 01:08:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:42:55Z.


Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged.

If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148799792 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1589#issuecomment-7148799792). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:42:55Z. --- Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.

Pull request closed

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!1588
No description provided.