Shaders: console wave64 compute on 32-lane hosts (split waves) #1890

Open
github-bot wants to merge 4 commits from github-bot/gh-1890 into main AGit
Owner

@⁠beamdotdev on GitHub · 2026-11-25 00:11 UTC · original
beamdotdev:shader/split-wave64 → main · +2653 −1336 · 19 files · 4 commits · open

Problem

A compute program that depends on its lane layout (cross-lane reads, lane masks read as numbers, LDS shared within one wave) declares the console's wave size. On a device without 64-lane waves (NVIDIA: WaveLaneCountMin = Max = 32), every wave64 one is refused by CreateComputePipelineState with E_INVALIDARG ("Shader wants wave lane count of 64 but maximum wave lane count for device is 32"), and its dispatches are dropped.

What this does

Such a program now runs split: it declares WaveSize(32), and each console wave runs as two host waves, its low and high half (console lanes 0-31 and 32-63). Thread ids, lane numbers and masks stay the console's.

  • Within a half, nothing extra: DPP, ds_swizzle and v_permlanex16 stay within 32 lanes; v_mbcnt, v_writelane and lane bits of masks use the console lane.
  • Exact where the group runs together: ballots of masks read as data, v_readlane, v_readfirstlane of a varying value, and whole-wave reductions and prefix sums combine the two halves' parts through a few group-shared dwords between two thread-group barriers. A barrier needs the whole group, so this happens only in blocks no lane branch decides whether (or how often) a lane reaches (emit::split::convergent, a post-dominator pass): with one console wave per group, outside any lane branch's region; with several waves, before the first branch.
  • Per half elsewhere: in divergent code each half works over its own 32 lanes, as pixel and vertex programs already do over the host's wave (MaskData::Host). This is right for what that code mostly does (wave-aggregated atomics, scalarization loops) and wrong where the code needs one value for all 64 lanes; it is marked shortcut: in lower.rs.
  • v_readfirstlane of a value that is the same in every lane (scalar arithmetic in VGPRs) needs no exchange, so it works in divergent code too.
  • One-wave groups get the LDS barriers the console compiler leaves out (after writes, and at joins after divergent code).
  • Refused when split: 16-bit wave reductions and ds_bpermute_b32 (both would need the other half's lanes), and programs whose LDS leaves no room for the exchange dwords in 32 KiB.

The device's width reaches the translator when victory-gpu creates the device (a run now creates it before its first translation), and when the offline victory translate --pipelines and the warm-up translate --cache do (both print host waves up to N lanes first). The shader cache keys on it and now opens on its first translation, after the device: before, it opened at start-up with the width still unset, so its key always said 64, and the warm-up cached WaveSize(64) translations that a run on a 32-lane host then took from the cache (found by a second session testing the warm-up: 395 pipelines still refused). VICTORY_HOST_WAVE_MAX=32 translates split on any device. Devices with 64-lane waves translate exactly as before.

Measured

Windows 11, RTX 3070 (32-lane waves only), Series X 1.0.2.1 files, victory translate --pipelines (before the port onto current main; the shader code is the same):

translated host pipelines created
compute 1,439 of 2,582 1,439
vertex/pixel 12,243 of 14,039 12,243
mesh 8,214 of 8,713 8,214

Every compute program that translates gets a pipeline. The same files on a 64-lane host translate 1,441 compute programs; the 2 not translated split are vfx_triangleClip programs with no group-shared memory left for the exchange. Without this change, all ~320 programs that need 64-lane waves are refused on the 3070.

The title ran with it on the 3070 to the first mission's title card ("Vice City, two years ago") at about 1 fps, then the host device was removed after a 7 s submission (the world hang the README describes, also seen on AMD). That submission held about 8 split programs among 69 pipelines, so this run does not show whether they are involved; a run with them skipped is the next check.

Tests

  • emit::split_tests (new, GPU): a wave64 program of one console wave checking per lane a mask count across both halves (s_bcnt1_i32_b64), the lane index (v_mbcnt), a read of high-half lane 45 (v_readlane), v_readfirstlane, and s_ff1_i32_b64 of a high-lanes-only mask, built for 64-lane and for 32-lane hosts; and a v_readlane inside a lane branch, which reads within its half. Both pass on the RTX 3070 (the 64-lane build is skipped there, and WARP, at 4 lanes, skips both).
  • emit::split::tests: post-dominators of an if and a loop.
  • cargo clippy --workspace --all-targets --locked -- -D warnings and with --all-features: clean.
  • cargo test --workspace --locked --no-fail-fast: 474 passed, 5 failed, 7 ignored. The 5 failures (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views, two stride_tests, gathers_at_a_level_match_the_hardware) fail on main without this change on the same machine.

Relation to #189 / #1589 / #1638

#189 (bundled in #1589 and #1638) solves the same problem with the same layout (two 32-lane waves per console wave, group-shared memory between barriers) and more besides: a barrier-free path for groups of 32 threads or fewer, an Emulate mode without a declared wave size, which also covers WARP, and SGPR spills to lanes 32 and up. Those bundles are stacked on other open pull requests. This is a smaller change written against current main; if #189 is taken instead, the GPU tests here can check it.

The wave-wide loop exit (Atom::WaveAny) is not on main; when it lands, a split program needs it exchanged as well.

AI-assisted (Claude Code); no game data is used or committed.

🤖 Generated with Claude Code

**@⁠beamdotdev** on GitHub · 2026-11-25 00:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890) `beamdotdev:shader/split-wave64` → `main` · +2653 −1336 · 19 files · 4 commits · open ### Problem A compute program that depends on its lane layout (cross-lane reads, lane masks read as numbers, LDS shared within one wave) declares the console's wave size. On a device without 64-lane waves (NVIDIA: `WaveLaneCountMin = Max = 32`), every wave64 one is refused by `CreateComputePipelineState` with `E_INVALIDARG` ("Shader wants wave lane count of 64 but maximum wave lane count for device is 32"), and its dispatches are dropped. ### What this does Such a program now runs **split**: it declares `WaveSize(32)`, and each console wave runs as two host waves, its low and high half (console lanes 0-31 and 32-63). Thread ids, lane numbers and masks stay the console's. - **Within a half, nothing extra:** DPP, `ds_swizzle` and `v_permlanex16` stay within 32 lanes; `v_mbcnt`, `v_writelane` and lane bits of masks use the console lane. - **Exact where the group runs together:** ballots of masks read as data, `v_readlane`, `v_readfirstlane` of a varying value, and whole-wave reductions and prefix sums combine the two halves' parts through a few group-shared dwords between two thread-group barriers. A barrier needs the whole group, so this happens only in blocks no lane branch decides whether (or how often) a lane reaches (`emit::split::convergent`, a post-dominator pass): with one console wave per group, outside any lane branch's region; with several waves, before the first branch. - **Per half elsewhere:** in divergent code each half works over its own 32 lanes, as pixel and vertex programs already do over the host's wave (`MaskData::Host`). This is right for what that code mostly does (wave-aggregated atomics, scalarization loops) and wrong where the code needs one value for all 64 lanes; it is marked `shortcut:` in `lower.rs`. - `v_readfirstlane` of a value that is the same in every lane (scalar arithmetic in VGPRs) needs no exchange, so it works in divergent code too. - One-wave groups get the LDS barriers the console compiler leaves out (after writes, and at joins after divergent code). - **Refused when split:** 16-bit wave reductions and `ds_bpermute_b32` (both would need the other half's lanes), and programs whose LDS leaves no room for the exchange dwords in 32 KiB. The device's width reaches the translator when `victory-gpu` creates the device (a run now creates it before its first translation), and when the offline `victory translate --pipelines` and the warm-up `translate --cache` do (both print `host waves up to N lanes` first). The shader cache keys on it and now opens on its first translation, after the device: before, it opened at start-up with the width still unset, so its key always said 64, and the warm-up cached WaveSize(64) translations that a run on a 32-lane host then took from the cache (found by a second session testing the warm-up: 395 pipelines still refused). `VICTORY_HOST_WAVE_MAX=32` translates split on any device. Devices with 64-lane waves translate exactly as before. ### Measured Windows 11, **RTX 3070** (32-lane waves only), Series X 1.0.2.1 files, `victory translate --pipelines` (before the port onto current `main`; the shader code is the same): | | translated | host pipelines created | |---|---|---| | compute | 1,439 of 2,582 | 1,439 | | vertex/pixel | 12,243 of 14,039 | 12,243 | | mesh | 8,214 of 8,713 | 8,214 | Every compute program that translates gets a pipeline. The same files on a 64-lane host translate 1,441 compute programs; the 2 not translated split are `vfx_triangleClip` programs with no group-shared memory left for the exchange. Without this change, all ~320 programs that need 64-lane waves are refused on the 3070. The title ran with it on the 3070 to the first mission's title card ("Vice City, two years ago") at about 1 fps, then the host device was removed after a 7 s submission (the world hang the README describes, also seen on AMD). That submission held about 8 split programs among 69 pipelines, so this run does not show whether they are involved; a run with them skipped is the next check. ### Tests - `emit::split_tests` (new, GPU): a wave64 program of one console wave checking per lane a mask count across both halves (`s_bcnt1_i32_b64`), the lane index (`v_mbcnt`), a read of high-half lane 45 (`v_readlane`), `v_readfirstlane`, and `s_ff1_i32_b64` of a high-lanes-only mask, built for 64-lane and for 32-lane hosts; and a `v_readlane` inside a lane branch, which reads within its half. Both pass on the RTX 3070 (the 64-lane build is skipped there, and WARP, at 4 lanes, skips both). - `emit::split::tests`: post-dominators of an if and a loop. - `cargo clippy --workspace --all-targets --locked -- -D warnings` and with `--all-features`: clean. - `cargo test --workspace --locked --no-fail-fast`: 474 passed, 5 failed, 7 ignored. The 5 failures (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`, two `stride_tests`, `gathers_at_a_level_match_the_hardware`) fail on `main` without this change on the same machine. ### Relation to #189 / #1589 / #1638 #189 (bundled in #1589 and #1638) solves the same problem with the same layout (two 32-lane waves per console wave, group-shared memory between barriers) and more besides: a barrier-free path for groups of 32 threads or fewer, an `Emulate` mode without a declared wave size, which also covers WARP, and SGPR spills to lanes 32 and up. Those bundles are stacked on other open pull requests. This is a smaller change written against current `main`; if #189 is taken instead, the GPU tests here can check it. The wave-wide loop exit (`Atom::WaveAny`) is not on `main`; when it lands, a split program needs it exchanged as well. AI-assisted (Claude Code); no game data is used or committed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A compute program that depends on its lane layout declares the console's
wave size, so on a device without 64-lane waves (NVIDIA: WaveLaneCountMax
32) every wave64 one was refused by CreateComputePipelineState. Such a
program now runs split: it declares WaveSize(32), and each console wave
runs as two host waves, its low and high half, with the console's thread
ids, lane numbers and masks.

DPP, ds_swizzle and v_permlanex16 stay within 32 lanes. Ballots,
v_readlane, v_readfirstlane of a varying value, and whole-wave
reductions and prefix sums combine the halves through group-shared dwords
between barriers, exactly, where the whole group runs together
(emit::split::convergent); elsewhere each half works over its own lanes,
as pixel and vertex programs do over the host's wave. One-wave groups
also get the LDS barriers the console compiler leaves out.

The device's width reaches the translator when victory-gpu (and the
offline `translate --pipelines`) creates the device; the shader cache
keys on it, and VICTORY_HOST_WAVE_MAX=32 translates split on any device.
16-bit wave reductions and ds_bpermute_b32 are refused when split.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cache's folder is named by its key, which includes the host's widest
wave; it was opened at start-up, before any device had set the width, so
its key always said 64. The warm-up (`translate --cache`) also translated
before making a device, so on a 32-lane host it cached WaveSize(64)
translations that a run then took from the cache and the host refused.

The cache now opens on its first translation, and a run creates its
device before translating; the warm-up makes one before it starts, so
both translate for the device and key the cache the same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:47:46 +00:00
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 00:29 UTC · original

Ran on the kind of device this is for: RTX 3070 (Ampere, WaveLaneCountMin = Max = 32), driver 616.56, Windows 11, debug, at d047e12.

  • cargo test -p victory-shader --locked: 209 passed, 3 failed, 2 ignored. The 3 are #1744's NVIDIA failures on main. Both new split tests run and pass here: a_split_wave64_gives_the_consoles_lanes_masks_and_reads and a_split_lane_read_in_a_lane_branch_reads_within_its_half.
  • cargo test -p victory-gpu --locked: 76 passed, with the two NVIDIA heap-cap failures main also has.

Not run: a title.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 00:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7148555957) Ran on the kind of device this is for: RTX 3070 (Ampere, `WaveLaneCountMin = Max = 32`), driver 616.56, Windows 11, debug, at `d047e12`. - `cargo test -p victory-shader --locked`: 209 passed, 3 failed, 2 ignored. The 3 are #1744's NVIDIA failures on `main`. Both new split tests run and pass here: `a_split_wave64_gives_the_consoles_lanes_masks_and_reads` and `a_split_lane_read_in_a_lane_branch_reads_within_its_half`. - `cargo test -p victory-gpu --locked`: 76 passed, with the two NVIDIA heap-cap failures `main` also has. Not run: a title. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:37 UTC · original · edited 2026-11-25 03:18 UTC

Automated triage for the maintainers.

The current head (73ee4dd) still conflicts with main, in crates/victory-gpu/src/shader_cache.rs, crates/victory-shader/src/emit/host.rs, lower.rs, mod.rs and several *_tests.rs files under crates/victory-shader/src/emit/. It will be reviewed once it is rebased onto current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7149771366) · edited 2026-11-25 03:18 UTC <!-- victory-triage v1 head=73ee4dd0c01b204c3b94f4268cf7cd8b48b197cb verdict=needs-rebase at=2026-11-25T03:21:30Z --> Automated triage for the maintainers. The current head (`73ee4dd`) still conflicts with `main`, in `crates/victory-gpu/src/shader_cache.rs`, `crates/victory-shader/src/emit/host.rs`, `lower.rs`, `mod.rs` and several `*_tests.rs` files under `crates/victory-shader/src/emit/`. It will be reviewed once it is rebased onto current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠KainanP on GitHub · 2026-11-25 18:17 UTC · original

On a 16-lane Intel iGPU (UHD 8086:a78b, WaveLaneCount 16..16), host_wave_max = 16 still splits and declares WaveSize(32), which that driver refuses at pipeline creation. a_split_wave64_gives_the_consoles_lanes_masks_and_reads then fails with no device ran the program; it fails the same way with VICTORY_WARP=1. On the RTX 4060 both split tests pass. Details and table: #2220

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.

**@⁠KainanP** on GitHub · 2026-11-25 18:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7170696879) On a 16-lane Intel iGPU (UHD `8086:a78b`, `WaveLaneCount` 16..16), `host_wave_max` = 16 still splits and declares `WaveSize(32)`, which that driver refuses at pipeline creation. `a_split_wave64_gives_the_consoles_lanes_masks_and_reads` then fails with `no device ran the program`; it fails the same way with `VICTORY_WARP=1`. On the RTX 4060 both split tests pass. Details and table: https://git.gtahub.st/github/Marvisak--VIctory/issues/2220 _AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this._
Author
Owner

@⁠steven-seagull27 on GitHub · 2026-11-26 02:21 UTC · original

I found a first-lane mismatch in a converged 64-thread workgroup on 73ee4dd. The guest computes v5 = 100 + tid, narrows EXEC with a vector compare and s_and_saveexec_b64, reads v_readfirstlane_b32 s14, v5, restores EXEC, and writes s14 to all 64 outputs. The whole shader is one basic block. The five masks select first lane 0, 7, 39, 63, or no lanes (which should return lane 0's value, 100).

Wrong output dwords out of 320 PR head Elect inside guest EXEC in each host wave¹ Also choose the participating half
RTX 5080, split Wave32 192 128 0
WARP 1.0.22, split Wave32 192 128 0
WARP 1.0.22, native Wave64 192 0 0

¹ For the middle column I ported only the physical-wave ballot/election from #2830 onto this head. That fixes lane 7. For lane 39, each split Wave32 dispatch still returned 100 in all 64 outputs, where 139 was expected. EXEC's entire low word is zero in this case. Built-in WARP advertises only Wave4 here, so neither pipeline ran.

Commit 6cfdabb adds the regression and elects across halves with the existing two-dword exchange. Each half supplies its value and whether it has a participating lane. When both are empty, the lower half supplies lane zero. The three split tests passed on the RTX and the shader crate passed Clippy with warnings denied. The commit is based directly on this PR head for use during the rebase.

git fetch https://github.com/steven-seagull27/VIctory.git codex/pr1890-masked-first-lane
git cherry-pick 6cfdabb
cargo test -p victory-shader --lib emit::split_tests:: -- --nocapture
**@⁠steven-seagull27** on GitHub · 2026-11-26 02:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7180720630) I found a first-lane mismatch in a converged 64-thread workgroup on `73ee4dd`. The guest computes `v5 = 100 + tid`, narrows EXEC with a vector compare and `s_and_saveexec_b64`, reads `v_readfirstlane_b32 s14, v5`, restores EXEC, and writes s14 to all 64 outputs. The whole shader is one basic block. The five masks select first lane 0, 7, 39, 63, or no lanes (which should return lane 0's value, 100). | Wrong output dwords out of 320 | PR head | Elect inside guest EXEC in each host wave¹ | Also choose the participating half | |---|---:|---:|---:| | RTX 5080, split Wave32 | 192 | 128 | 0 | | WARP 1.0.22, split Wave32 | 192 | 128 | 0 | | WARP 1.0.22, native Wave64 | 192 | 0 | 0 | ¹ For the middle column I ported only the physical-wave ballot/election from #2830 onto this head. That fixes lane 7. For lane 39, each split Wave32 dispatch still returned 100 in all 64 outputs, where 139 was expected. EXEC's entire low word is zero in this case. Built-in WARP advertises only Wave4 here, so neither pipeline ran. [Commit 6cfdabb](https://github.com/steven-seagull27/VIctory/commit/6cfdabb121d148377986e6a3524efd956f8f060f) adds the regression and elects across halves with the existing two-dword exchange. Each half supplies its value and whether it has a participating lane. When both are empty, the lower half supplies lane zero. The three split tests passed on the RTX and the shader crate passed Clippy with warnings denied. The commit is based directly on this PR head for use during the rebase. ```sh git fetch https://github.com/steven-seagull27/VIctory.git codex/pr1890-masked-first-lane git cherry-pick 6cfdabb cargo test -p victory-shader --lib emit::split_tests:: -- --nocapture ```
Author
Owner

@⁠luciano-repetti on GitHub · 2026-11-26 13:30 UTC · original

Tested on two GPUs this PR hasn't been run on yet, both with 32-lane waves at most: NVIDIA RTX 3050 6GB Laptop (Ampere, driver 566.07) and Intel Arc iGPU (Meteor Lake, Core Ultra 9 185H, driver 32.0.101.6127). Windows 11 26200, MSVC 2022, Rust 1.98.1 (pinned), debug, cargo test -p victory-shader --locked, PR head 73ee4dd against its base 70564ae. No game files, so only the unit and GPU tests. Each GPU was made the default adapter for the test executable through the Windows per-app GPU preference.

RTX 3050 (Ampere) Arc (Meteor Lake)
base 70564ae 206 passed, 3 failed 202 passed, 7 failed
PR 73ee4dd 209 passed, 3 failed 205 passed, 7 failed
  • emit::split_tests (both tests) pass on both GPUs on the 32-lane path; the 64-lane builds are refused there and skipped, as expected.
  • No regressions in the existing suite: the failing tests are the same set at the base and at the PR head on each GPU. This says nothing about the v_readfirstlane_b32 mismatch reported above, which these tests don't cover; I haven't run that case.
  • RTX 3050 failures (same as the RTX 3070 run above, #1744): stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros, synthetic_tests::gathers_at_a_level_match_the_hardware.
  • Arc failures, also on the base (not from this PR), in case they're useful elsewhere:
    • semantics_tests::arithmetic_matches_the_hardware: v_mad_f32 / v_mac_f32 mismatch the model on 102 of 14,440 inputs (WARP 0), e.g. in [00800000, 80800000, 00000000] want 00000000 got 80000000 (sign of a zero from an underflowing product).
    • bvh_tests::intersections_* (3 tests): hit distance off by 1 ULP (1118671093 vs 1118671094).
    • valu_tests::fspx_programs_run_with_the_hardwares_dot_products: 2147483504 vs 2147483312.
    • valu_tests::image_atomics_of_64_bits and stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros: E_INVALIDARG creating the pipeline / dispatching.

AI-assisted.

**@⁠luciano-repetti** on GitHub · 2026-11-26 13:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7193437888) Tested on two GPUs this PR hasn't been run on yet, both with 32-lane waves at most: NVIDIA RTX 3050 6GB Laptop (Ampere, driver 566.07) and Intel Arc iGPU (Meteor Lake, Core Ultra 9 185H, driver 32.0.101.6127). Windows 11 26200, MSVC 2022, Rust 1.98.1 (pinned), debug, `cargo test -p victory-shader --locked`, PR head `73ee4dd` against its base `70564ae`. No game files, so only the unit and GPU tests. Each GPU was made the default adapter for the test executable through the Windows per-app GPU preference. | | RTX 3050 (Ampere) | Arc (Meteor Lake) | |---|---|---| | base `70564ae` | 206 passed, 3 failed | 202 passed, 7 failed | | PR `73ee4dd` | 209 passed, 3 failed | 205 passed, 7 failed | - `emit::split_tests` (both tests) pass on both GPUs on the 32-lane path; the 64-lane builds are refused there and skipped, as expected. - No regressions in the existing suite: the failing tests are the same set at the base and at the PR head on each GPU. This says nothing about the `v_readfirstlane_b32` mismatch reported above, which these tests don't cover; I haven't run that case. - RTX 3050 failures (same as the RTX 3070 run above, #1744): `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`, `synthetic_tests::gathers_at_a_level_match_the_hardware`. - Arc failures, also on the base (not from this PR), in case they're useful elsewhere: - `semantics_tests::arithmetic_matches_the_hardware`: `v_mad_f32` / `v_mac_f32` mismatch the model on 102 of 14,440 inputs (WARP 0), e.g. in `[00800000, 80800000, 00000000]` want `00000000` got `80000000` (sign of a zero from an underflowing product). - `bvh_tests::intersections_*` (3 tests): hit distance off by 1 ULP (`1118671093` vs `1118671094`). - `valu_tests::fspx_programs_run_with_the_hardwares_dot_products`: `2147483504` vs `2147483312`. - `valu_tests::image_atomics_of_64_bits` and `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros`: `E_INVALIDARG` creating the pipeline / dispatching. AI-assisted.
Author
Owner

@⁠catminou4 on GitHub · 2026-11-25 00:32 UTC · original · reviewed

Mixed PR: shader/formats parts are macOS-tested in the batch; GPU/HLE parts are Windows-only statics.

Console wave64 compute on 32-lane hosts (split waves): apps+docs+gpu+shader mixed — the wave64 split is the riskiest shader change this wave; shader part tested in batch, GPU part Windows-only.

**@⁠catminou4** on GitHub · 2026-11-25 00:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#pullrequestreview-6049697304) · **reviewed** Mixed PR: shader/formats parts are macOS-tested in the batch; GPU/HLE parts are Windows-only statics. Console wave64 compute on 32-lane hosts (split waves): apps+docs+gpu+shader mixed — the wave64 split is the riskiest shader change this wave; shader part tested in batch, GPU part Windows-only.
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-26 14:16 UTC · original

I resolved the conflicts between 73ee4dd and current main (63bcca4) in ab0d7e8. It keeps both parents, including the current view-mark and shader-cache paths. e400c3f adds @⁠steven-seagull27's first-lane fix and regression with his Git authorship intact. The integration passes guest EXEC to source-lane election and keeps the scalar write unconditional.

On D3D12 Agility 1.620.2 / WARP 1.0.22 with DXIL validation, I ran the same five masks through split Wave32 and native Wave64 three times. The merge alone returned 384 wrong dwords out of 640 each time. With the fix all 640/640 matched each time. All three split tests passed. The full shader suite was 302 passed, 4 failed, 3 ignored. The same four tests failed on main in this WARP setup. Strict all-feature workspace Clippy and the repository asset-policy check passed.

@⁠beamdotdev, the integration branch can fast-forward the current PR head. A run of the new regression on a physical 32-lane adapter would complement the WARP results. The Intel 16-lane case reported above and the game were outside this run.

Please retain the Git authors when picking up the branch. If folding my integration into another commit, use Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-26 14:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7194546932) I resolved the conflicts between `73ee4dd` and current `main` (`63bcca4`) in [`ab0d7e8`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/ab0d7e8eaa532cebc5ad0d32c4669710e0464b46). It keeps both parents, including the current view-mark and shader-cache paths. [`e400c3f`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/e400c3fd685606319bbcbb094bc0807fb27f7d43) adds @⁠steven-seagull27's first-lane fix and regression with his Git authorship intact. The integration passes guest EXEC to source-lane election and keeps the scalar write unconditional. On D3D12 Agility 1.620.2 / WARP 1.0.22 with DXIL validation, I ran the same five masks through split Wave32 and native Wave64 three times. The merge alone returned **384 wrong dwords out of 640** each time. With the fix all **640/640** matched each time. All three split tests passed. The full shader suite was 302 passed, 4 failed, 3 ignored. The same four tests failed on `main` in this WARP setup. Strict all-feature workspace Clippy and the repository asset-policy check passed. @⁠beamdotdev, [the integration branch](https://github.com/andrewpozdnakov7-jpg/VIctory/tree/codex/pr1890-wave32-current-main) can fast-forward the current PR head. A run of the new regression on a physical 32-lane adapter would complement the WARP results. The Intel 16-lane case reported above and the game were outside this run. Please retain the Git authors when picking up the branch. If folding my integration into another commit, use `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
Author
Owner

@⁠Venom2054 on GitHub · 2026-11-26 14:24 UTC · original

Confirmed the integration on a physical RTX 5070 Ti. D3D12 reports 32 lanes for both the minimum and maximum. I ran the five masks from converged_first_lane_respects_both_exec_words three times per revision, with Windows SDK DXIL validation and GPU readback.

Revision Wrong dwords out of 320 per run (split Wave32)
ab0d7e8 192, 192, 192
e400c3f 0, 0, 0

The parent returned 100 where the three affected masks expected 107, 139, and 163. The full and empty masks returned the expected 100 on both revisions. Each run counts five 64-dword readbacks. The driver declined native Wave64 as expected on this adapter. This was a synthetic shader test.

**@⁠Venom2054** on GitHub · 2026-11-26 14:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7194765409) Confirmed the integration on a physical RTX 5070 Ti. D3D12 reports 32 lanes for both the minimum and maximum. I ran the five masks from `converged_first_lane_respects_both_exec_words` three times per revision, with Windows SDK DXIL validation and GPU readback. | Revision | Wrong dwords out of 320 per run (split Wave32) | | --- | --- | | `ab0d7e8` | 192, 192, 192 | | `e400c3f` | 0, 0, 0 | The parent returned 100 where the three affected masks expected 107, 139, and 163. The full and empty masks returned the expected 100 on both revisions. Each run counts five 64-dword readbacks. The driver declined native Wave64 as expected on this adapter. This was a synthetic shader test.
Distinguish two active halves from an empty low half and from an empty guest wave. Compare the selected value and the half's participation using the existing two-dword exchange. The regression checks five branch-free EXEC masks, including a nonzero lane-zero fallback.
Author
Owner

@⁠beamdotdev on GitHub · 2026-11-26 15:15 UTC · original

Thanks @⁠andrewpozdnakov7-jpg. I fast-forwarded the PR branch to your integration branch, so the head is now e400c3f (from 73ee4dd). Nothing was rewritten: you stay the author of the merge ab0d7e8, and @⁠steven-seagull27 stays the author of the first-lane fix. If this is squash-merged, GitHub will add Co-authored-by lines for both of you.

Before pushing I ran the split tests on a physical 32-lane adapter (RTX 4060) at e400c3f. All three passed, including the new regression:

emit::split_tests::a_split_wave64_gives_the_consoles_lanes_masks_and_reads ... ok
emit::split_tests::converged_first_lane_respects_both_exec_words ... ok
emit::split_tests::a_split_lane_read_in_a_lane_branch_reads_within_its_half ... ok

I didn't run the full shader suite this time. The 16-lane Intel case is still open.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this.

**@⁠beamdotdev** on GitHub · 2026-11-26 15:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/1890#issuecomment-7196017790) Thanks @⁠andrewpozdnakov7-jpg. I fast-forwarded the PR branch to your integration branch, so the head is now `e400c3f` (from `73ee4dd`). Nothing was rewritten: you stay the author of the merge `ab0d7e8`, and @⁠steven-seagull27 stays the author of the first-lane fix. If this is squash-merged, GitHub will add `Co-authored-by` lines for both of you. Before pushing I ran the split tests on a physical 32-lane adapter (RTX 4060) at `e400c3f`. All three passed, including the new regression: ``` emit::split_tests::a_split_wave64_gives_the_consoles_lanes_masks_and_reads ... ok emit::split_tests::converged_first_lane_respects_both_exec_words ... ok emit::split_tests::a_split_lane_read_in_a_lane_branch_reads_within_its_half ... ok ``` I didn't run the full shader suite this time. The 16-lane Intel case is still open. _AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this._
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1890/head:github-bot/gh-1890'
git switch 'github-bot/gh-1890'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1890'
git switch 'github-bot/gh-1890'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1890'
git switch 'github-bot/gh-1890'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1890'
git switch 'main'
git merge --squash 'github-bot/gh-1890'
git switch 'main'
git merge --ff-only 'github-bot/gh-1890'
git switch 'main'
git merge 'github-bot/gh-1890'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1890
No description provided.