shader: static Wave32 LDS alias & lane-private analysis for native Wave32 compute #1137

Open
Vladimir-Human wants to merge 1 commit from upstream-pr/1140 into main
Vladimir-Human commented 2026-11-25 21:26:36 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Vladimir-Human on 2026-11-25T21:26:36Z.


Summary

AI-assisted port of static Wave32 LDS alias/hazard proof analysis (crates/victory-shader/src/emit/lds.rs) onto fxceless/victory-fork main, unlocking native Wave32 execution on NVIDIA/32-wide GPUs for compute shaders whose LDS (ds_*) operations live inside control flow or use disjoint/lane-private addressing, while preserving wave64 fallback whenever safety cannot be statically proven.

Key Details & Soundness Guarantees

  • Refinement A (Disjoint constant byte ranges): Verifies shared group-uniform bases with disjoint byte footprints within non-wrapping MAX_OFFSET = 1 MiB 32-bit bounds (<4-byte unaligned vs >=4-byte dword collision guard, zero RMWs, acyclic !all regions, symmetric RAW/WAR/WAW).
  • Refinement B (Injective per-lane private slots): Proves lane-private slots are injective across active workgroup dimensions and paired v_mbcnt console_lane (group <= 64), aligned, sub-array split, non-wrapping, and cross-cluster disjoint.
  • Safety checks:
    • Primary 1-dword dst verification (is_primary_sop_dst/is_primary_valu_dst) prevents VOP3B v.carry / Reg::Scc misidentification as group-uniform values.
    • Tightened SGPR uniformity (c < cs.user_sgprs() + Input::GroupId, refusing scratch_wave_offset and uninitialized SGPRs).
    • Refuses refinement when !all regions contain s_barrier or non-inline special SOP constants (c != 253).
    • Existing Wave32/Wave64 lowering and wave64_tests preserved intact.

Verification (86e93bb1c)

  • Clean git merge-tree --write-tree origin/main HEAD against latest main (c36971b2).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: exit 0, 0 warnings.
  • VICTORY_REQUIRE_HW_GPU=1 cargo test -p victory-shader --lib emit::wave64_tests::lds_ -- --nocapture: 4 passed; 0 failed on hardware D3D12 (no skip).
  • cargo test -p victory-shader --all-targets: 233 passed; 0 failed; 3 ignored (14/14 emit::lds::tests::*).

Co-Authored-By: AI Assistant

<!-- greyfinch-sync:fxceless/victory-fork:issue:5499451221 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-25T21:26:36Z. --- ## Summary AI-assisted port of static Wave32 LDS alias/hazard proof analysis (`crates/victory-shader/src/emit/lds.rs`) onto `fxceless/victory-fork` `main`, unlocking native Wave32 execution on NVIDIA/32-wide GPUs for compute shaders whose LDS (`ds_*`) operations live inside control flow or use disjoint/lane-private addressing, while preserving `wave64` fallback whenever safety cannot be statically proven. ### Key Details & Soundness Guarantees - **Refinement A (Disjoint constant byte ranges)**: Verifies shared group-uniform bases with disjoint byte footprints within non-wrapping `MAX_OFFSET = 1 MiB` 32-bit bounds (`<4`-byte unaligned vs `>=4`-byte dword collision guard, zero RMWs, acyclic `!all` regions, symmetric RAW/WAR/WAW). - **Refinement B (Injective per-lane private slots)**: Proves lane-private slots are injective across active workgroup dimensions and paired `v_mbcnt` `console_lane` (`group <= 64`), aligned, sub-array split, non-wrapping, and cross-cluster disjoint. - **Safety checks**: - Primary 1-dword `dst` verification (`is_primary_sop_dst`/`is_primary_valu_dst`) prevents VOP3B `v.carry` / `Reg::Scc` misidentification as group-uniform values. - Tightened SGPR uniformity (`c < cs.user_sgprs()` + `Input::GroupId`, refusing `scratch_wave_offset` and uninitialized SGPRs). - Refuses refinement when `!all` regions contain `s_barrier` or non-inline special SOP constants (`c != 253`). - Existing Wave32/Wave64 lowering and `wave64_tests` preserved intact. ### Verification (`86e93bb1c`) - Clean `git merge-tree --write-tree origin/main HEAD` against latest `main` (`c36971b2`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: exit 0, 0 warnings. - `VICTORY_REQUIRE_HW_GPU=1 cargo test -p victory-shader --lib emit::wave64_tests::lds_ -- --nocapture`: **4 passed; 0 failed** on hardware D3D12 (no skip). - `cargo test -p victory-shader --all-targets`: **233 passed; 0 failed; 3 ignored** (14/14 `emit::lds::tests::*`). Co-Authored-By: AI Assistant
GDKAYKY commented 2026-11-25 22:07:23 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by GDKAYKY on 2026-11-25T21:28:47Z.


does this have improvement on frametime,fps or VRAM usage?

<!-- greyfinch-sync:fxceless/victory-fork:comment:7175130859 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7175130859). Originally posted by [GDKAYKY](https://github.com/GDKAYKY) on 2026-11-25T21:28:47Z. --- does this have improvement on frametime,fps or VRAM usage?
Vladimir-Human commented 2026-11-26 00:06:07 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Vladimir-Human on 2026-11-25T23:10:02Z.


@GDKAYKY Target and effect summary:

  • Target hardware: Wave32-only GPUs (such as NVIDIA) running console Wave64 compute shaders whose LDS (ds_*) operations sit inside control flow or per-lane offsets.
  • Frametime / FPS: Removes the Wave64 two-wave software emulation path (extra LDS ballot/shuffle traffic and doubled workgroup barriers) whenever static alias/injectivity analysis (emit/lds.rs) proves native Wave32 execution produces identical results. The exact full-frame FPS delta depends on how many active compute shaders in a given scene hit that Wave64 LDS fallback path, and hasn't been measured in a live title run yet.
  • VRAM: Neutral (no persistent GPU buffer or heap allocation changes; slightly lower register/groupshared pressure on qualifying compute shaders).
<!-- greyfinch-sync:fxceless/victory-fork:comment:7177221082 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7177221082). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-25T23:10:02Z. --- @GDKAYKY Target and effect summary: - **Target hardware**: Wave32-only GPUs (such as NVIDIA) running console Wave64 compute shaders whose LDS (`ds_*`) operations sit inside control flow or per-lane offsets. - **Frametime / FPS**: Removes the Wave64 two-wave software emulation path (extra LDS ballot/shuffle traffic and doubled workgroup barriers) whenever static alias/injectivity analysis (`emit/lds.rs`) proves native Wave32 execution produces identical results. The exact full-frame FPS delta depends on how many active compute shaders in a given scene hit that Wave64 LDS fallback path, and hasn't been measured in a live title run yet. - **VRAM**: Neutral (no persistent GPU buffer or heap allocation changes; slightly lower register/groupshared pressure on qualifying compute shaders).
HAL9000RELOADED commented 2026-11-26 10:06:46 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by HAL9000RELOADED on 2026-11-26T09:29:29Z.


RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2, 86e93bb on main 32b31f7 + #402 (Agility, WARP skips here).

  • With the PR: victory-shader 234 passed, 0 failed; the 18 new tests pass, including the three *_execute_wave32_on_hardware runs on the card.
  • PR tests on the base without the fix: 4 fail, all at the wave-size checks before execution (lds_*_execute_wave32_on_hardware get 64 instead of 32, lds_shared_returning_atomic_stays_wave64 gets 32 instead of 64).

AI-assisted (Claude Code): tests run on my machine, text drafted with Claude.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7188061492 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7188061492). Originally posted by [HAL9000RELOADED](https://github.com/HAL9000RELOADED) on 2026-11-26T09:29:29Z. --- RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2, `86e93bb` on main `32b31f7` + #402 (Agility, WARP skips here). - With the PR: `victory-shader` 234 passed, 0 failed; the 18 new tests pass, including the three `*_execute_wave32_on_hardware` runs on the card. - PR tests on the base without the fix: 4 fail, all at the wave-size checks before execution (`lds_*_execute_wave32_on_hardware` get 64 instead of 32, `lds_shared_returning_atomic_stays_wave64` gets 32 instead of 64). _AI-assisted (Claude Code): tests run on my machine, text drafted with Claude._
Vladimir-Human commented 2026-11-26 10:06:47 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Vladimir-Human on 2026-11-26T09:46:59Z.


Pushed follow-up commit d12852c incorporating live 32-lane NVIDIA review findings and diagnostic improvements:

  1. 32-lane opt-in VICTORY_LDS_WRITE_ONLY_OK=1 + has_plain_read (emit/lds.rs):

    • Tracks has_plain_read strictly on Kind::Read (ds_read*), distinct from Kind::Rmw (LDS atomics).
    • Strictly gated on host_max_wave() == 32 and VICTORY_LDS_WRITE_ONLY_OK=1 (off by default, always disabled on 64-lane hosts). When enabled on 32-lane hosts, !all write-only regions and !all LDS atomic regions with no plain ds_read* are accepted for native Wave32, while divergent s_barrier, unhandled DS instructions, and mixed regions with an explicit plain ds_read* remain refused.
  2. Specific VICTORY_WAVE_WHY=1 refusal diagnostics (emit/lds.rs, emit/lower.rs):

    • Added typed lds::Refusal variants via lds::analyze(...) so VICTORY_WAVE_WHY=1 accurately distinguishes overlapping plain writes, atomics with no plain LDS read, mixed regions with an explicit plain ds_read*, divergent barriers, unhandled DS ops, and cyclic shared writes.
  3. Note on @GDKAYKY's question (frame pacing / NVIDIA skinning shaders):

    • On Wave32-only GPUs (NVIDIA), any compute shader that falls back to WaveSize(64) is rejected by D3D12 CreateComputePipelineState (E_INVALIDARG), which drops those dispatches (including skinning compute passes) or forces slower fallback paths. Proving more branched-LDS compute shaders safe for native Wave32 keeps those pipelines compiling and executing cleanly on 32-lane hardware without Wave64 software emulation overhead, directly helping frame pacing and rendering completeness on NVIDIA.
  4. Verification:

    • Added unit tests covering shared atomics with/without plain ds_read*, 32-lane vs 64-lane host gating, the 4-kernel lowering matrix (same-dword write-only, separate writes, overlapping read+write, disjoint read + writes), negative s_barrier/ds_nop checks, and VICTORY_WAVE_WHY reason strings.
    • cargo test -p victory-shader -- --test-threads=4: 235 passed; 0 failed; 3 ignored (including the 3 hardware D3D12 Wave32 LDS execution tests).
    • cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7188463505 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7188463505). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-26T09:46:59Z. --- Pushed follow-up commit `d12852c` incorporating live 32-lane NVIDIA review findings and diagnostic improvements: 1. **32-lane opt-in `VICTORY_LDS_WRITE_ONLY_OK=1` + `has_plain_read` (`emit/lds.rs`):** - Tracks `has_plain_read` strictly on `Kind::Read` (`ds_read*`), distinct from `Kind::Rmw` (LDS atomics). - Strictly gated on `host_max_wave() == 32` **and** `VICTORY_LDS_WRITE_ONLY_OK=1` (off by default, always disabled on 64-lane hosts). When enabled on 32-lane hosts, `!all` write-only regions and `!all` LDS atomic regions with no plain `ds_read*` are accepted for native Wave32, while divergent `s_barrier`, unhandled DS instructions, and mixed regions with an explicit plain `ds_read*` remain refused. 2. **Specific `VICTORY_WAVE_WHY=1` refusal diagnostics (`emit/lds.rs`, `emit/lower.rs`):** - Added typed `lds::Refusal` variants via `lds::analyze(...)` so `VICTORY_WAVE_WHY=1` accurately distinguishes overlapping plain writes, atomics with no plain LDS read, mixed regions with an explicit plain `ds_read*`, divergent barriers, unhandled DS ops, and cyclic shared writes. 3. **Note on @GDKAYKY's question (frame pacing / NVIDIA skinning shaders):** - On Wave32-only GPUs (NVIDIA), any compute shader that falls back to `WaveSize(64)` is rejected by D3D12 `CreateComputePipelineState` (`E_INVALIDARG`), which drops those dispatches (including skinning compute passes) or forces slower fallback paths. Proving more branched-LDS compute shaders safe for native Wave32 keeps those pipelines compiling and executing cleanly on 32-lane hardware without Wave64 software emulation overhead, directly helping frame pacing and rendering completeness on NVIDIA. 4. **Verification:** - Added unit tests covering shared atomics with/without plain `ds_read*`, 32-lane vs 64-lane host gating, the 4-kernel lowering matrix (same-dword write-only, separate writes, overlapping read+write, disjoint read + writes), negative `s_barrier`/`ds_nop` checks, and `VICTORY_WAVE_WHY` reason strings. - `cargo test -p victory-shader -- --test-threads=4`: **235 passed; 0 failed; 3 ignored** (including the 3 hardware D3D12 Wave32 LDS execution tests). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: **0 warnings**.
Dathinel commented 2026-11-26 20:16:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Dathinel on 2026-11-26T20:16:04Z.


At c629faf, the CPU-side LDS analysis accepts a cross-lane byte alias in a partial workgroup. I compiled the PR's region_lane_private, injective_lane_disp and ranges_may_overlap functions in isolation with Rust and supplied two synthetic Access records. No GPU or game input is needed.

Use threads = [n, 1, 1], no uniforms, uniform_tz = 32, console_lane = 0. The write has width 1, tid = [1,0,0], off = 0. The read has width 1, tid = [0,0,0], off = n-1. Thread n-1 writes the byte that every thread reads. The two accesses therefore cannot be proven lane-private.

n region_lane_private
32 false
33 true
63 true
64 false

For n=33 the aggregate write footprint is [0,33). The cross-cluster check passes 33 as an instruction width to ranges_may_overlap, which rounds the upper bound down to 32 on the aligned path. The final byte disappears. Compare the already-computed half-open footprint bounds directly at this call site, retaining the existing alignment guard, and add the 33-thread case as a regression. This reproduces the analyzer decision only. AI-assisted review.

CPU check of the proposed change: I compiled both versions of region_lane_private and enumerated byte writes at initial + stride * tid.x and a uniform byte read at offset r. Parameters were n=32..65 inclusive, stride in {1,2,4}, initial=0..3, and r=0..n*stride+4 inclusive. The oracle enumerated all n write addresses and checked whether any equaled r. Every thread reads r, so a match is cross-thread sharing.

Across 48,212 inputs the original accepted 442 sharing cases as private. Replacing only the cross-cluster ranges_may_overlap call with (a.min_lo < b.max_hi && b.min_lo < a.max_hi) reduced that count to zero. Conservative rejections of genuinely disjoint cases changed from 26,282 to 25,840, including 170 safe cases newly rejected. Bounding intervals can include holes between strided writes. These results cover byte accesses in this family only.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7202476824 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7202476824). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-26T20:16:04Z. --- At c629faf, the CPU-side LDS analysis accepts a cross-lane byte alias in a partial workgroup. I compiled the PR's region_lane_private, injective_lane_disp and ranges_may_overlap functions in isolation with Rust and supplied two synthetic Access records. No GPU or game input is needed. Use threads = [n, 1, 1], no uniforms, uniform_tz = 32, console_lane = 0. The write has width 1, tid = [1,0,0], off = 0. The read has width 1, tid = [0,0,0], off = n-1. Thread n-1 writes the byte that every thread reads. The two accesses therefore cannot be proven lane-private. | n | region_lane_private | |---|---| | 32 | false | | 33 | true | | 63 | true | | 64 | false | For n=33 the aggregate write footprint is [0,33). The cross-cluster check passes 33 as an instruction width to ranges_may_overlap, which rounds the upper bound down to 32 on the aligned path. The final byte disappears. Compare the already-computed half-open footprint bounds directly at this call site, retaining the existing alignment guard, and add the 33-thread case as a regression. This reproduces the analyzer decision only. AI-assisted review. CPU check of the proposed change: I compiled both versions of region_lane_private and enumerated byte writes at initial + stride * tid.x and a uniform byte read at offset r. Parameters were n=32..65 inclusive, stride in {1,2,4}, initial=0..3, and r=0..n*stride+4 inclusive. The oracle enumerated all n write addresses and checked whether any equaled r. Every thread reads r, so a match is cross-thread sharing. Across 48,212 inputs the original accepted 442 sharing cases as private. Replacing only the cross-cluster ranges_may_overlap call with (a.min_lo < b.max_hi && b.min_lo < a.max_hi) reduced that count to zero. Conservative rejections of genuinely disjoint cases changed from 26,282 to 25,840, including 170 safe cases newly rejected. Bounding intervals can include holes between strided writes. These results cover byte accesses in this family only.
Vladimir-Human commented 2026-11-27 07:10:33 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Vladimir-Human on 2026-11-27T07:10:33Z.


Thank you @Dathinel for isolating this bug and verifying the oracle bounds.

Updated in 40ca614 (and cleanly rebased onto main 9a9091d, preserving VICTORY_LDS_FLAGS / lds_flag_region and all_lane_blocks_with_loop_exits):

  1. Soundness fix (emit/lds.rs, region_lane_private): Replaced the cross-cluster ranges_may_overlap(a.min_lo, a.max_hi - a.min_lo, ...) call with direct half-open interval comparison (a.min_lo < b.max_hi && b.min_lo < a.max_hi), retaining the existing ((a.max_width >= 4 || b.max_width >= 4) && !align4) alignment guard so non-4-multiple aggregate footprints (e.g. partial workgroups n = 33..63) no longer truncate trailing bytes.
  2. Regression tests (emit/lds.rs):
    • partial_workgroup_byte_alias_is_refused: covers threads = [n, 1, 1] for n in [32, 33, 63, 64] (both access orders + disjoint off = n control) plus end-to-end lowering checks for n = 33 and n = 63.
    • exhaustive_byte_access_oracle_has_zero_false_accepts: enumerates n = 32..=65, stride in [1, 2, 4], initial in 0..4, r in 0..=n*stride+4 (48,212 cases, 0 false accepts).
  3. Verification (VICTORY_D3D12_DEBUG=1):
    • cargo clippy -p victory-shader --all-targets: 0 warnings in PR files.
    • cargo test -p victory-shader -- --test-threads=1: 274 passed; 0 failed; 19 ignored (all 18 emit::lds::tests::* and 4 emit::wave64_tests::lds_* tests passing).
<!-- greyfinch-sync:fxceless/victory-fork:comment:7212215422 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7212215422). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-27T07:10:33Z. --- Thank you @Dathinel for isolating this bug and verifying the oracle bounds. Updated in `40ca614` (and cleanly rebased onto `main` `9a9091d`, preserving `VICTORY_LDS_FLAGS` / `lds_flag_region` and `all_lane_blocks_with_loop_exits`): 1. **Soundness fix (`emit/lds.rs`, `region_lane_private`):** Replaced the cross-cluster `ranges_may_overlap(a.min_lo, a.max_hi - a.min_lo, ...)` call with direct half-open interval comparison `(a.min_lo < b.max_hi && b.min_lo < a.max_hi)`, retaining the existing `((a.max_width >= 4 || b.max_width >= 4) && !align4)` alignment guard so non-4-multiple aggregate footprints (e.g. partial workgroups `n = 33..63`) no longer truncate trailing bytes. 2. **Regression tests (`emit/lds.rs`):** - `partial_workgroup_byte_alias_is_refused`: covers `threads = [n, 1, 1]` for `n in [32, 33, 63, 64]` (both access orders + disjoint `off = n` control) plus end-to-end lowering checks for `n = 33` and `n = 63`. - `exhaustive_byte_access_oracle_has_zero_false_accepts`: enumerates `n = 32..=65`, `stride in [1, 2, 4]`, `initial in 0..4`, `r in 0..=n*stride+4` (`48,212` cases, `0` false accepts). 3. **Verification (`VICTORY_D3D12_DEBUG=1`):** - `cargo clippy -p victory-shader --all-targets`: 0 warnings in PR files. - `cargo test -p victory-shader -- --test-threads=1`: **274 passed; 0 failed; 19 ignored** (all 18 `emit::lds::tests::*` and 4 `emit::wave64_tests::lds_*` tests passing).
Filip722 commented 2026-11-27 14:25:31 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T14:25:31Z.


Independent Linux coverage on the current head 40ca6144f1111e471a931d24453eb924c219c002. Windows MSVC release tests ran through GE-Proton11-14 and vkd3d-proton cae8353ed7959c4+ on an RTX 5060 Laptop GPU (8 GiB, NVIDIA 615.78.08, Bazzite).

  • emit::lds::tests passed all 18 cases, including the partial-workgroup byte alias and exhaustive byte-access oracle.
  • emit::wave64_tests::lds_ passed all four cases with VICTORY_REQUIRE_HW_GPU=1. All three positive Wave32 cases executed on the NVIDIA device, including the returning-atomic fixture. The fourth asserted retention of Wave64 for the shared-atomic case.

These were synthetic tests. Gameplay and frame rate were outside this check.

Assisted by Codex (GPT-6.2-Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7220765752 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7220765752). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-27T14:25:31Z. --- Independent Linux coverage on the current head `40ca6144f1111e471a931d24453eb924c219c002`. Windows MSVC release tests ran through GE-Proton11-14 and vkd3d-proton `cae8353ed7959c4+` on an RTX 5060 Laptop GPU (8 GiB, NVIDIA 615.78.08, Bazzite). - `emit::lds::tests` passed all 18 cases, including the partial-workgroup byte alias and exhaustive byte-access oracle. - `emit::wave64_tests::lds_` passed all four cases with `VICTORY_REQUIRE_HW_GPU=1`. All three positive Wave32 cases executed on the NVIDIA device, including the returning-atomic fixture. The fourth asserted retention of Wave64 for the shared-atomic case. These were synthetic tests. Gameplay and frame rate were outside this check. Assisted by Codex (GPT-6.2-Sol High).
Vladimir-Human commented 2026-11-27 21:33:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Vladimir-Human on 2026-11-27T21:33:54Z.


@Filip722 Thank you for testing 40ca614 on the RTX 5060 Laptop and confirming the Wave32 fix!

Rebased cleanly onto latest main (2eade68) as shader/wave32-lds-disjoint (f2d68c9):

  • Kept all four commits (e9e0f58, e3de72b, d743bea, 40ca614), including the region_lane_private byte-footprint overlap fix, VOP3B carry / divergent-barrier guards, and VICTORY_LDS_WRITE_ONLY_OK / WAVE64-WHY diagnostics.
  • Preserved 2eade68 lds_order.unordered / unstable and water-light lowering paths, and keyed shader_cache on VICTORY_LDS_WRITE_ONLY_OK / VICTORY_LDS_FLAGS.
  • Verified locally after rebase: cargo xtask policy, cargo clippy (-p victory-shader -p victory-gpu, default & diagnostics, 0 warnings in PR files), emit::lds::tests, emit::wave64_tests, emit::water_tile_slots::tests, shader_cache::tests, and VICTORY_REQUIRE_HW_GPU=1 Wave32 LDS hardware tests.
<!-- greyfinch-sync:fxceless/victory-fork:comment:7228557649 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7228557649). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-27T21:33:54Z. --- @Filip722 Thank you for testing `40ca614` on the RTX 5060 Laptop and confirming the Wave32 fix! Rebased cleanly onto latest `main` (`2eade68`) as `shader/wave32-lds-disjoint` (`f2d68c9`): - Kept all four commits (`e9e0f58`, `e3de72b`, `d743bea`, `40ca614`), including the `region_lane_private` byte-footprint overlap fix, VOP3B carry / divergent-barrier guards, and `VICTORY_LDS_WRITE_ONLY_OK` / `WAVE64-WHY` diagnostics. - Preserved `2eade68` `lds_order.unordered` / `unstable` and water-light lowering paths, and keyed `shader_cache` on `VICTORY_LDS_WRITE_ONLY_OK` / `VICTORY_LDS_FLAGS`. - Verified locally after rebase: `cargo xtask policy`, `cargo clippy` (`-p victory-shader -p victory-gpu`, default & `diagnostics`, 0 warnings in PR files), `emit::lds::tests`, `emit::wave64_tests`, `emit::water_tile_slots::tests`, `shader_cache::tests`, and `VICTORY_REQUIRE_HW_GPU=1` Wave32 LDS hardware tests.
Dathinel commented 2026-11-27 22:10:52 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Dathinel on 2026-11-27T22:10:52Z.


Tested f2d68c9 on a physical RTX 3050 Laptop 4 GB (Windows D3D12, NVIDIA 610.62). All 18 LDS analysis tests passed. The five tests matching emit::wave64_tests::lds_ passed with VICTORY_REQUIRE_HW_GPU=1. Three of those tests dispatched six times and matched all 896 expected 32-bit values: disjoint ranges (3 × 128), dual/128-bit accesses (128), and lane-private returning atomics (2 × 192). The shared returning atomic control kept Wave64.

I built the focused Rust test executable from this head's shader sources using cached dependencies. This covers the synthetic shader outputs on Ampere. I didn't measure game performance or run full workspace CI. AI-assisted verification.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7229098865 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7229098865). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-27T22:10:52Z. --- Tested f2d68c9 on a physical RTX 3050 Laptop 4 GB (Windows D3D12, NVIDIA 610.62). All 18 LDS analysis tests passed. The five tests matching `emit::wave64_tests::lds_` passed with `VICTORY_REQUIRE_HW_GPU=1`. Three of those tests dispatched six times and matched all 896 expected 32-bit values: disjoint ranges (3 × 128), dual/128-bit accesses (128), and lane-private returning atomics (2 × 192). The shared returning atomic control kept Wave64. I built the focused Rust test executable from this head's shader sources using cached dependencies. This covers the synthetic shader outputs on Ampere. I didn't measure game performance or run full workspace CI. AI-assisted verification.
Vladimir-Human commented 2026-11-28 06:39:59 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Vladimir-Human on 2026-11-28T06:39:59Z.


Thanks for testing and confirming on RTX 3050 Laptop 4 GB! Let us know if anything regresses or if you capture a before/after capture on an 8 GB / 4 GB run.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7235441313 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/1140#issuecomment-7235441313). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-28T06:39:59Z. --- Thanks for testing and confirming on RTX 3050 Laptop 4 GB! Let us know if anything regresses or if you capture a before/after capture on an 8 GB / 4 GB run.
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/1140:upstream-pr/1140'
git switch 'upstream-pr/1140'

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