Shaders: scalars leave divergent loops and branches as the wave's last path left them #269

Open
TheHoracio wants to merge 2 commits from upstream-pr/269 into main
TheHoracio commented 2026-11-24 01:55:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TheHoracio on 2026-11-24T01:55:52Z.


On the console, a wave has one set of scalar registers. A divergent loop runs until its last lane leaves, and each path of a divergent branch that some lane takes runs in code order. So after the loop or the join, every lane reads the scalars that the last iteration or path left. The lowering runs scalar code per lane, so each lane left with its own path's values. That gives wrong numbers with no error, or a refused shader:

  • Wrong without an error. A loop's exit mask (s_or_b64 s[2:3], vcc, s[2:3]) or a scalar counter (s_add_u32) read after a divergent loop came out as 1, 2, 3, … 64 across a 64-lane wave, instead of 64 in every lane.
  • Refused. A mask grown inside a divergent branch and counted after it stops with a lane mask holding lanes elsewhere read as data. In the run reported on #49, this was the second most common reason a shader did not translate (80 of 370).

Change (crates/victory-shader/src/emit/lower.rs, compute programs only)

  • Scalar set operations on lane masks (s_{and,or,xor,andn2,orn2,nand,nor,xnor,not,mov}_b{32,64}) get their value as a number from their sources' numbers, instead of stopping with a lane mask read as data.
  • Entering the single exit block of a loop, the scalars the loop writes and code after it reads take the value of the lanes with the highest iteration count. This uses the loop counters LOOP_LIMIT already keeps: one waveActiveOp max of the count, then one per value.
  • Entering a join that is not a loop header, its scalar phis take the value of the lanes that came by the latest path in code order (a rank phi per join, then the same two wave maxima).

Pixel, vertex and mesh programs are unchanged. Their host waves need not be the console's (an RX 7800 XT runs wave32 pixel programs 64 lanes wide, see #125), so a host wave's value could mix console waves.

Shortcuts, also in comments:

  • A value lowered after the exit block (a loop block later in reverse postorder) keeps each lane's own value.
  • A scalar that both paths of an if/else change gets the later path's own result, not that path run on the earlier one's result.
  • Loops with more than one exit block are left as they were.

Tests

Four GPU tests in valu_tests.rs. They use a new build_lanes_cs: a 64-lane wave64 compute fixture that stores v0 per lane. All synthetic, no game data.

Test main d2a4bae This PR
loop_exit_mask_counted_after_the_loop fails: every lane reads 1 (only the last iteration's ballot) passes, 64
scalar_counted_in_a_divergent_loop_read_after_it fails: lane i reads i+1 passes, 64
mask_grown_inside_a_branch_counted_after_it refused: a lane mask holding lanes elsewhere read as data passes, 32
scalar_counted_in_nested_divergent_loops fails: each lane reads its own outer × inner count (1, 2, … 16) passes, 16

Tested

  • AMD Radeon RX 7800 XT (RDNA3), driver 32.0.32015.7029; Ryzen 7 9800X3D; Windows 11 Pro 10.0.26300; toolchain 1.98.1 (rust-toolchain.toml); debug.
  • cargo test --workspace --no-fail-fast: 268 passed, 0 failed, 4 ignored (main: 264 / 0 / 4).
  • cargo clippy -p victory-shader --all-targets: no warnings. cargo fmt --check -p victory-shader: clean. cargo xtask policy: 151 files ok.

Not tested

  • In the title. I have no copy I can use for this, so I can't say how many shaders it changes or what it does to a frame. Running victory translate --validate on your own pack, before and after, would show how many more compute shaders translate.
  • NVIDIA and Intel (wave32-only hosts run these compute programs through their own paths), RDNA2, RDNA4, and a release build.

AI use

  • Claude Code (Claude Opus 5.5) found the bug with the synthetic tests, wrote the change and the tests, and drafted this description. A person reviewed it and opened the PR.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6572836665 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269). Originally posted by [TheHoracio](https://github.com/TheHoracio) on 2026-11-24T01:55:52Z. --- On the console, a wave has one set of scalar registers. A divergent loop runs until its last lane leaves, and each path of a divergent branch that some lane takes runs in code order. So after the loop or the join, every lane reads the scalars that the last iteration or path left. The lowering runs scalar code per lane, so each lane left with its own path's values. That gives wrong numbers with no error, or a refused shader: - **Wrong without an error.** A loop's exit mask (`s_or_b64 s[2:3], vcc, s[2:3]`) or a scalar counter (`s_add_u32`) read after a divergent loop came out as 1, 2, 3, … 64 across a 64-lane wave, instead of 64 in every lane. - **Refused.** A mask grown inside a divergent branch and counted after it stops with `a lane mask holding lanes elsewhere read as data`. In the run reported on #49, this was the second most common reason a shader did not translate (80 of 370). ## Change (`crates/victory-shader/src/emit/lower.rs`, compute programs only) - Scalar set operations on lane masks (`s_{and,or,xor,andn2,orn2,nand,nor,xnor,not,mov}_b{32,64}`) get their value as a number from their sources' numbers, instead of stopping with `a lane mask read as data`. - Entering the single exit block of a loop, the scalars the loop writes and code after it reads take the value of the lanes with the highest iteration count. This uses the loop counters `LOOP_LIMIT` already keeps: one `waveActiveOp` max of the count, then one per value. - Entering a join that is not a loop header, its scalar phis take the value of the lanes that came by the latest path in code order (a rank phi per join, then the same two wave maxima). Pixel, vertex and mesh programs are unchanged. Their host waves need not be the console's (an RX 7800 XT runs wave32 pixel programs 64 lanes wide, see #125), so a host wave's value could mix console waves. Shortcuts, also in comments: - A value lowered after the exit block (a loop block later in reverse postorder) keeps each lane's own value. - A scalar that both paths of an if/else change gets the later path's own result, not that path run on the earlier one's result. - Loops with more than one exit block are left as they were. ## Tests Four GPU tests in `valu_tests.rs`. They use a new `build_lanes_cs`: a 64-lane wave64 compute fixture that stores v0 per lane. All synthetic, no game data. | Test | `main` `d2a4bae` | This PR | |---|---|---| | `loop_exit_mask_counted_after_the_loop` | fails: every lane reads 1 (only the last iteration's ballot) | passes, 64 | | `scalar_counted_in_a_divergent_loop_read_after_it` | fails: lane *i* reads *i*+1 | passes, 64 | | `mask_grown_inside_a_branch_counted_after_it` | refused: `a lane mask holding lanes elsewhere read as data` | passes, 32 | | `scalar_counted_in_nested_divergent_loops` | fails: each lane reads its own outer × inner count (1, 2, … 16) | passes, 16 | **Tested** - AMD Radeon RX 7800 XT (RDNA3), driver 32.0.32015.7029; Ryzen 7 9800X3D; Windows 11 Pro 10.0.26300; toolchain 1.98.1 (`rust-toolchain.toml`); debug. - `cargo test --workspace --no-fail-fast`: 268 passed, 0 failed, 4 ignored (`main`: 264 / 0 / 4). - `cargo clippy -p victory-shader --all-targets`: no warnings. `cargo fmt --check -p victory-shader`: clean. `cargo xtask policy`: 151 files ok. **Not tested** - In the title. I have no copy I can use for this, so I can't say how many shaders it changes or what it does to a frame. Running `victory translate --validate` on your own pack, before and after, would show how many more compute shaders translate. - NVIDIA and Intel (wave32-only hosts run these compute programs through their own paths), RDNA2, RDNA4, and a release build. **AI use** - Claude Code (Claude Opus 5.5) found the bug with the synthetic tests, wrote the change and the tests, and drafted this description. A person reviewed it and opened the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MisaXz commented 2026-11-24 06:55:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by MisaXz on 2026-11-24T02:08:53Z.


Test report on NVIDIA, which the description lists as not tested: the four new tests fail on a 32-lane host.

Tested

  • NVIDIA GeForce RTX 5080, driver 621.14 (32-lane waves only); Ryzen 7 9800X3D; Windows 11 Pro 26300; Rust 1.98.1; debug
  • This PR at 9356bee (base d2a4bae): cargo test --workspace --no-fail-fast: 264 passed, 4 failed, 4 ignored. main d2a4bae on the same machine: 264 passed, 0 failed, 4 ignored.
  • The same four fail in 3 of 3 further runs of cargo test -q -p victory-shader --lib (69 passed, 4 failed).
Test Result here
scalar_counted_in_a_divergent_loop_read_after_it lanes 0-31 read 32, lanes 32-63 read 64 (expected 64 everywhere)
scalar_counted_in_nested_divergent_loops lanes 0-31 read 8, lanes 32-63 read 16 (expected 16 everywhere)
loop_exit_mask_counted_after_the_loop host.compute_pipeline fails: pipeline: "The parameter is incorrect." (valu_tests.rs:780)
mask_grown_inside_a_branch_counted_after_it same pipeline error (valu_tests.rs:859)

The two wrong-value results are what each 32-lane half would count on its own: lanes 0-31 loop at most 32 times (and at most 2 inner x 4 outer = 8 in the nested test), lanes 32-63 at most 64 (4 x 4 = 16). So the 64-thread group runs here as two host waves that each stop at their own last lane.

For the two pipeline failures I have only a guess, not checked: both programs count a 64-bit mask with s_bcnt1_i32_b64, and the host cannot make a 64-lane pipeline.

Two of the tests also unwrap() Host::new(false) where the first one skips, in case that matters for hosts without an SM 6.6 device.

Not tested

  • Whether these tests should skip on 32-lane hosts or pass there once wave64 programs are split (#233); I did not try the two PRs together.
  • Release build, AMD, the title itself (no game files used).

Follow-up: together with #233 (same machine, local only)

  • #233 727e884 alone: cargo test --workspace --no-fail-fast: 277 passed, 0 failed, 4 ignored.
  • #233 + this PR merge without a textual conflict but do not compile: error[E0063]: missing fields console_cf and target in initializer of Parts<'_> in build_lanes_cs (#233 adds those fields). Whichever lands second needs that fixed.
  • As an experiment I changed only build_lanes_cs to translate through #233's emit_for(&native, host.target()) (host range 32..32 here) instead of lowering by hand. cargo test -p victory-shader --lib: 82 passed, 3 failed:
Test #233 + this PR, via emit_for
mask_grown_inside_a_branch_counted_after_it passes
loop_exit_mask_counted_after_the_loop translation: Unsupported { offset: 24, what: "a lane-mask join of an untracked mask" }
scalar_counted_in_a_divergent_loop_read_after_it unchanged: 32 for lanes 0-31, 64 for lanes 32-63
scalar_counted_in_nested_divergent_loops unchanged: 8 for lanes 0-31, 16 for lanes 32-63

So on a 32-lane host the split in #233 does not by itself give the scalar-in-a-divergent-loop result this PR checks: those two programs read no other lane, so they are split in halves and each half stops at its own last lane. That experiment is my change to the test helper, not part of either PR.
AI use

  • Claude Code (Claude Fable 5.2) ran the tests and wrote this report from their output.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7119803102 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7119803102). Originally posted by [MisaXz](https://github.com/MisaXz) on 2026-11-24T02:08:53Z. --- Test report on NVIDIA, which the description lists as not tested: the four new tests fail on a 32-lane host. **Tested** - NVIDIA GeForce RTX 5080, driver 621.14 (32-lane waves only); Ryzen 7 9800X3D; Windows 11 Pro 26300; Rust 1.98.1; debug - This PR at `9356bee` (base `d2a4bae`): `cargo test --workspace --no-fail-fast`: 264 passed, **4 failed**, 4 ignored. `main` `d2a4bae` on the same machine: 264 passed, 0 failed, 4 ignored. - The same four fail in 3 of 3 further runs of `cargo test -q -p victory-shader --lib` (69 passed, 4 failed). | Test | Result here | |---|---| | `scalar_counted_in_a_divergent_loop_read_after_it` | lanes 0-31 read 32, lanes 32-63 read 64 (expected 64 everywhere) | | `scalar_counted_in_nested_divergent_loops` | lanes 0-31 read 8, lanes 32-63 read 16 (expected 16 everywhere) | | `loop_exit_mask_counted_after_the_loop` | `host.compute_pipeline` fails: `pipeline: "The parameter is incorrect."` (valu_tests.rs:780) | | `mask_grown_inside_a_branch_counted_after_it` | same pipeline error (valu_tests.rs:859) | The two wrong-value results are what each 32-lane half would count on its own: lanes 0-31 loop at most 32 times (and at most 2 inner x 4 outer = 8 in the nested test), lanes 32-63 at most 64 (4 x 4 = 16). So the 64-thread group runs here as two host waves that each stop at their own last lane. For the two pipeline failures I have only a guess, not checked: both programs count a 64-bit mask with `s_bcnt1_i32_b64`, and the host cannot make a 64-lane pipeline. Two of the tests also `unwrap()` `Host::new(false)` where the first one skips, in case that matters for hosts without an SM 6.6 device. **Not tested** - Whether these tests should skip on 32-lane hosts or pass there once wave64 programs are split (#233); I did not try the two PRs together. - Release build, AMD, the title itself (no game files used). --- **Follow-up: together with #233 (same machine, local only)** - #233 `727e884` alone: `cargo test --workspace --no-fail-fast`: 277 passed, 0 failed, 4 ignored. - #233 + this PR merge without a textual conflict but do **not compile**: `error[E0063]: missing fields console_cf and target in initializer of Parts<'_>` in `build_lanes_cs` (#233 adds those fields). Whichever lands second needs that fixed. - As an experiment I changed only `build_lanes_cs` to translate through #233's `emit_for(&native, host.target())` (host range 32..32 here) instead of lowering by hand. `cargo test -p victory-shader --lib`: 82 passed, 3 failed: | Test | #233 + this PR, via `emit_for` | |---|---| | `mask_grown_inside_a_branch_counted_after_it` | passes | | `loop_exit_mask_counted_after_the_loop` | `translation: Unsupported { offset: 24, what: "a lane-mask join of an untracked mask" }` | | `scalar_counted_in_a_divergent_loop_read_after_it` | unchanged: 32 for lanes 0-31, 64 for lanes 32-63 | | `scalar_counted_in_nested_divergent_loops` | unchanged: 8 for lanes 0-31, 16 for lanes 32-63 | So on a 32-lane host the split in #233 does not by itself give the scalar-in-a-divergent-loop result this PR checks: those two programs read no other lane, so they are split in halves and each half stops at its own last lane. That experiment is my change to the test helper, not part of either PR. **AI use** - Claude Code (Claude Fable 5.2) ran the tests and wrote this report from their output.
r4tedx commented 2026-11-24 06:55:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-24T02:23:27Z.


A result from an AMD GPU that forms 32-lane waves, following the NVIDIA report above.

Tested

  • AMD Radeon iGPU (RDNA2, D3D12 wave range 32..64) and NVIDIA RTX 5070 (32..32) in one machine; Windows 11; Rust 1.98.1; debug.
  • This PR at 9356bee, with a local patch only so the test host picks an adapter by name:
Test Radeon iGPU RTX 5070
loop_exit_mask_counted_after_the_loop passes pipeline refused
mask_grown_inside_a_branch_counted_after_it passes pipeline refused
scalar_counted_in_a_divergent_loop_read_after_it lanes 0-31 read 32, lanes 32-63 read 64 the same
scalar_counted_in_nested_divergent_loops lanes 0-31 read 8, lanes 32-63 read 16 the same

So it is not only hosts without 64-lane waves: this Radeon driver runs a compute shader that declares no wave size in waves of 32 although it offers 64 (the RX 7800 XT in the description evidently forms 64). The two scalar programs read no mask as a number and no other lane, so they declare no wave size, and the maxima are taken per host wave. The two mask tests pass on the Radeon because reading a mask as data makes the program declare WaveSize(64).

A possible fix inside this PR: make a program the new code applies to declare the console's wave size (the same condition that sets console_lanes for masks read as data), so the host wave is the console wave wherever the pipeline is accepted. On a 32..32 host that then refuses the pipeline, as the two mask tests show.

For those hosts there is an alternative I tried: #233 / #320 add a "console flow" (every lane runs every block, branches taken wave-wide), where scalars are the wave's own by construction. With a local switch sending these four programs through it, all four are exact on both adapters here, the RTX 5070 in two 32-lane halves. Details in my reply on #233. Neither PR selects that form for these programs today, so this is a note on how the two could fit together, not a claim that they already do.

Not tested: release build, the title (no game files used).

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7120090310 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7120090310). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-24T02:23:27Z. --- A result from an AMD GPU that forms 32-lane waves, following the NVIDIA report above. **Tested** - AMD Radeon iGPU (RDNA2, D3D12 wave range 32..64) and NVIDIA RTX 5070 (32..32) in one machine; Windows 11; Rust 1.98.1; debug. - This PR at `9356bee`, with a local patch only so the test host picks an adapter by name: | Test | Radeon iGPU | RTX 5070 | |---|---|---| | `loop_exit_mask_counted_after_the_loop` | passes | pipeline refused | | `mask_grown_inside_a_branch_counted_after_it` | passes | pipeline refused | | `scalar_counted_in_a_divergent_loop_read_after_it` | lanes 0-31 read 32, lanes 32-63 read 64 | the same | | `scalar_counted_in_nested_divergent_loops` | lanes 0-31 read 8, lanes 32-63 read 16 | the same | So it is not only hosts without 64-lane waves: this Radeon driver runs a compute shader that declares no wave size in waves of 32 although it offers 64 (the RX 7800 XT in the description evidently forms 64). The two scalar programs read no mask as a number and no other lane, so they declare no wave size, and the maxima are taken per host wave. The two mask tests pass on the Radeon because reading a mask as data makes the program declare `WaveSize(64)`. A possible fix inside this PR: make a program the new code applies to declare the console's wave size (the same condition that sets `console_lanes` for masks read as data), so the host wave is the console wave wherever the pipeline is accepted. On a 32..32 host that then refuses the pipeline, as the two mask tests show. For those hosts there is an alternative I tried: #233 / #320 add a "console flow" (every lane runs every block, branches taken wave-wide), where scalars are the wave's own by construction. With a local switch sending these four programs through it, all four are exact on both adapters here, the RTX 5070 in two 32-lane halves. Details in [my reply on #233](https://github.com/Marvisak/VIctory/pull/233#issuecomment-7120083839). Neither PR selects that form for these programs today, so this is a note on how the two could fit together, not a claim that they already do. **Not tested**: release build, the title (no game files used). AI-assisted.
BlueMew commented 2026-11-24 06:55:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by BlueMew on 2026-11-24T02:55:27Z.


Test report on AMD RDNA4 and Windows 10, with the before/after count the description asks for.

Tested

  • AMD Radeon RX 9070 (RDNA4), driver 32.0.31041.1004; Ryzen 7 5700X3D; Windows 10 Home 22H2 (19045); Rust 1.98.1 from rust-toolchain.toml; release builds.
  • main d2a4bae and this PR at 9356bee: victory translate --validate --list over a retail dump, validator dxil.dll from Windows SDK 10.0.26100.
main d2a4bae This PR 9356bee
Compute programs emitted / validated (of 2,581) 1,693 / 1,670 1,698 / 1,670
Mesh programs validated (of 8,506) 8,129 8,129
Vertex and pixel programs validated (of 14,013) 12,184 12,184

Per-program diff of the two --list outputs: 268 programs change outcome, all compute. None is newly validated and none loses validation.

  • a lane mask holding lanes elsewhere read as data: 276 → 8.
  • The 268 now stop further on: 242 at a descriptor read only as data, 10 at a structured buffer of unknown stride, 5 emit but fail validation (Entry function performs some operation that is incompatible with the shader stage or other entry properties), 4 at a select on an untracked mask, 3 at a descriptor's address or format read as data, 2 at a lane-mask join of an untracked mask, 1 at s_getpc_b64, 1 at a scalar memory read as data.

So on this title the change clears this blocker, but on its own it brings no compute program to validation yet; a descriptor read only as data is next for 242 of the 268. The count cannot show the PR's other effect: programs that already translate and whose scalars read after a divergent loop now get the wave's value.

Not tested

  • In the title at run time.
  • The four new GPU tests: on Windows 10 a test binary gets no SM 6.6 device (the inbox D3D12 runtime lacks it, and only an exe exporting the Agility SDK symbols gets the newer one), so valu_tests fail here on main too.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and the comparison and drafted this report; I reviewed it before posting.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7120605967 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7120605967). Originally posted by [BlueMew](https://github.com/BlueMew) on 2026-11-24T02:55:27Z. --- Test report on AMD RDNA4 and Windows 10, with the before/after count the description asks for. **Tested** - AMD Radeon RX 9070 (RDNA4), driver 32.0.31041.1004; Ryzen 7 5700X3D; Windows 10 Home 22H2 (19045); Rust 1.98.1 from `rust-toolchain.toml`; release builds. - `main` `d2a4bae` and this PR at `9356bee`: `victory translate --validate --list` over a retail dump, validator `dxil.dll` from Windows SDK 10.0.26100. | | `main` `d2a4bae` | This PR `9356bee` | |---|---|---| | Compute programs emitted / validated (of 2,581) | 1,693 / 1,670 | 1,698 / 1,670 | | Mesh programs validated (of 8,506) | 8,129 | 8,129 | | Vertex and pixel programs validated (of 14,013) | 12,184 | 12,184 | Per-program diff of the two `--list` outputs: 268 programs change outcome, all compute. None is newly validated and none loses validation. - `a lane mask holding lanes elsewhere read as data`: 276 → 8. - The 268 now stop further on: 242 at `a descriptor read only as data`, 10 at `a structured buffer of unknown stride`, 5 emit but fail validation (`Entry function performs some operation that is incompatible with the shader stage or other entry properties`), 4 at `a select on an untracked mask`, 3 at `a descriptor's address or format read as data`, 2 at `a lane-mask join of an untracked mask`, 1 at `s_getpc_b64`, 1 at `a scalar memory read as data`. So on this title the change clears this blocker, but on its own it brings no compute program to validation yet; `a descriptor read only as data` is next for 242 of the 268. The count cannot show the PR's other effect: programs that already translate and whose scalars read after a divergent loop now get the wave's value. **Not tested** - In the title at run time. - The four new GPU tests: on Windows 10 a test binary gets no SM 6.6 device (the inbox D3D12 runtime lacks it, and only an exe exporting the Agility SDK symbols gets the newer one), so `valu_tests` fail here on `main` too. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and the comparison and drafted this report; I reviewed it before posting.
r4tedx commented 2026-11-24 12:04:24 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-24T11:07:53Z.


@BlueMew, your before/after counts clarify what to compare with the console-flow experiment on #233. The mask refusal clears for 268 compute programs, and 242 then stop at descriptor reads. Validation counts measure that next blocker. The scalar result after a divergent loop still needs the execution check from the four synthetic programs. Thanks for reporting the two measurements separately.

AI-assisted (Codex).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7129696332 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7129696332). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-24T11:07:53Z. --- @BlueMew, your before/after counts clarify what to compare with the console-flow experiment on #233. The mask refusal clears for 268 compute programs, and 242 then stop at descriptor reads. Validation counts measure that next blocker. The scalar result after a divergent loop still needs the execution check from the four synthetic programs. Thanks for reporting the two measurements separately. AI-assisted (Codex).
qntic commented 2026-11-24 12:04:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by qntic on 2026-11-24T11:12:04Z.


tested this on my rx 6600 xt. 2 of the 4 gpu tests failed because the translated compute shader ran in wave32 instead of the required wave64.

added a fix that requests the console wave size when emitting wave reductions. all 4 tests now pass across 10 consecutive runs.

fix:
https://github.com/qntic/VIctory/tree/pub/269-console-wave-size

<!-- greyfinch-sync:Marvisak/VIctory:comment:7129788320 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7129788320). Originally posted by [qntic](https://github.com/qntic) on 2026-11-24T11:12:04Z. --- tested this on my rx 6600 xt. 2 of the 4 gpu tests failed because the translated compute shader ran in wave32 instead of the required wave64. added a fix that requests the console wave size when emitting wave reductions. all 4 tests now pass across 10 consecutive runs. fix: https://github.com/qntic/VIctory/tree/pub/269-console-wave-size
qntic commented 2026-11-24 14:04:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by qntic on 2026-11-24T13:25:38Z.


tried integrating this pr with main ffe310e. 7 waterfall tests from #307/#566 fail after the merge.

gpu values are still correct, but unexpected wave operations appear in the translated code. reverted #269 from my integration branch for now.

something to check

<!-- greyfinch-sync:Marvisak/VIctory:comment:7132813121 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7132813121). Originally posted by [qntic](https://github.com/qntic) on 2026-11-24T13:25:38Z. --- tried integrating this pr with main ffe310e. 7 waterfall tests from #307/#566 fail after the merge. gpu values are still correct, but unexpected wave operations appear in the translated code. reverted #269 from my integration branch for now. something to check
Marvisak commented 2026-11-25 01:07:45 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-shader/src/emit/lower.rs, crates/victory-shader/src/emit/valu_tests.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148486071 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/269#issuecomment-7148486071). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:24:58Z. --- <!-- victory-triage v1 head=9356beeae173723585c2aeac91f68c34862c00a4 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-shader/src/emit/lower.rs`, `crates/victory-shader/src/emit/valu_tests.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/269:upstream-pr/269'
git switch 'upstream-pr/269'

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/269'
git switch 'upstream-pr/269'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/269'
git switch 'upstream-pr/269'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/269'
git switch 'main'
git merge --squash 'upstream-pr/269'
git switch 'main'
git merge --ff-only 'upstream-pr/269'
git switch 'main'
git merge 'upstream-pr/269'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!269
No description provided.