Shaders: a test of lane-mask loops at a triangle edge (ignored: defect) #3571

Open
kilolimaVI wants to merge 1 commit from upstream-pr/3571 into main
kilolimaVI commented 2026-11-27 18:37:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-27T18:37:54Z.


On the console, whole-quad mode puts a pixel program's helper lanes in EXEC, so a loop that serves one value per pass (s_ff1 of EXEC, v_readlane, v_cmpx) serves them too, and a DPP quad read of a helper's result gives its value. The host's ballots leave helper lanes out (before shader model 6.7's WaveOpsIncludeHelperLanes), so a helper is never served and its quad neighbour reads 0. lower.rs describes this; nothing measured it.

Test (emit/helper_lane_tests.rs)

lane_mask_loops_serve_helper_lanes_at_a_triangle_edge: a hand-assembled wave64 pixel program runs that loop over a per-pixel key, then reads the x neighbour's result with quad_perm:[1,0,3,2], drawn as a triangle whose edge crosses quads (16x16, 136 pixels), on the hardware adapter and WARP. Neighbour results wrong:

Radeon 780M (RDNA3) WARP
main 63bcca4 8 18
#2373 at 58f0be9 (validation made non-fatal) 0 0

It is #[ignore = "defect: ..."], as semantics_tests marks an open defect, so CI is unaffected; run it with --ignored. Whichever fix lands (#2373 or another) can drop the ignore.

Only this new file and its mod line; no change in behaviour. cargo clippy -p victory-shader --all-targets [--all-features] -- -D warnings clean.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:issue:5531480385 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3571). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-27T18:37:54Z. --- On the console, whole-quad mode puts a pixel program's helper lanes in EXEC, so a loop that serves one value per pass (`s_ff1` of EXEC, `v_readlane`, `v_cmpx`) serves them too, and a DPP quad read of a helper's result gives its value. The host's ballots leave helper lanes out (before shader model 6.7's `WaveOpsIncludeHelperLanes`), so a helper is never served and its quad neighbour reads 0. `lower.rs` describes this; nothing measured it. ## Test (`emit/helper_lane_tests.rs`) `lane_mask_loops_serve_helper_lanes_at_a_triangle_edge`: a hand-assembled wave64 pixel program runs that loop over a per-pixel key, then reads the x neighbour's result with `quad_perm:[1,0,3,2]`, drawn as a triangle whose edge crosses quads (16x16, 136 pixels), on the hardware adapter and WARP. Neighbour results wrong: | | Radeon 780M (RDNA3) | WARP | |---|---|---| | main 63bcca4 | 8 | 18 | | #2373 at 58f0be9 (validation made non-fatal) | 0 | 0 | It is `#[ignore = "defect: ..."]`, as `semantics_tests` marks an open defect, so CI is unaffected; run it with `--ignored`. Whichever fix lands (#2373 or another) can drop the `ignore`. Only this new file and its `mod` line; no change in behaviour. `cargo clippy -p victory-shader --all-targets [--all-features] -- -D warnings` clean. AI-assisted (Claude).
oddmaniv commented 2026-11-27 19:38:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oddmaniv on 2026-11-27T19:38:59Z.


Independent verification of the PR author's shader-package parser tests at 74ff14bb134ed017da3b01052c107bb8e0683ac8.

cargo test --locked -p victory-game --lib shaderpack::tests -- --nocapture

Tree Result
Unmodified PR head 3 passed, 0 failed, 0 ignored; native exit 0
Unmodified main 3 passed, 0 failed, 0 ignored; native exit 0
PR patch applied to pinned main 3 passed, 0 failed, 0 ignored; native exit 0

Main baseline pin: 63bcca43c6a00a758510398fa43096ce7e4f7df0.

Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits.
This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed.

AI-assisted verification.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7226735184 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3571#issuecomment-7226735184). Originally posted by [oddmaniv](https://github.com/oddmaniv) on 2026-11-27T19:38:59Z. --- Independent verification of the PR author's shader-package parser tests at `74ff14bb134ed017da3b01052c107bb8e0683ac8`. `cargo test --locked -p victory-game --lib shaderpack::tests -- --nocapture` | Tree | Result | | --- | --- | | Unmodified PR head | 3 passed, 0 failed, 0 ignored; native exit 0 | | Unmodified main | 3 passed, 0 failed, 0 ignored; native exit 0 | | PR patch applied to pinned main | 3 passed, 0 failed, 0 ignored; native exit 0 | Main baseline pin: `63bcca43c6a00a758510398fa43096ce7e4f7df0`. Windows x86_64 MSVC native runs. Local and remote source snapshots matched before and after each check. The adaptation applies the PR diff without additional source edits. This is focused regression coverage, not the full workspace suite, a gameplay test, or an independent validation of every behavior in the PR. No new fix is claimed. AI-assisted verification.
futurepro62 commented 2026-11-29 16:55:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-29T16:55:54Z.


NVIDIA full-suite run, to go with the reports above by oddmaniv, since none of them names a GPU run. Tested exact head 74ff14b (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 11 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7259287520 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3571#issuecomment-7259287520). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-29T16:55:54Z. --- NVIDIA full-suite run, to go with the reports above by oddmaniv, since none of them names a GPU run. Tested exact head `74ff14b` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **866 passed, 0 failed, 11 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
kilolimaVI commented 2026-11-29 17:16:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kilolimaVI on 2026-11-29T17:16:44Z.


Thanks for the NVIDIA run, good to know the suite is clean with this on Blackwell.

One gap: the test this PR adds is #[ignore] (it documents the defect), so the full-suite run doesn't execute it. Could you run it on the 5070 Ti?

cargo test -p victory-shader --lib --locked -- --ignored --nocapture lane_mask_loops_serve_helper_lanes_at_a_triangle_edge

It's expected to fail; the number that matters is how many of the 136 pixels read 0 from an unserved helper neighbour. So far that's 8 on a Radeon 780M (RDNA3) and 18 on WARP, and 0 on both with #2373's helper-lane wave ops (SM 6.7). An NVIDIA count would show whether the gap is the same across vendors, which is the point of keeping the test.

AI-assisted (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7259564104 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3571#issuecomment-7259564104). Originally posted by [kilolimaVI](https://github.com/kilolimaVI) on 2026-11-29T17:16:44Z. --- Thanks for the NVIDIA run, good to know the suite is clean with this on Blackwell. One gap: the test this PR adds is `#[ignore]` (it documents the defect), so the full-suite run doesn't execute it. Could you run it on the 5070 Ti? cargo test -p victory-shader --lib --locked -- --ignored --nocapture lane_mask_loops_serve_helper_lanes_at_a_triangle_edge It's expected to fail; the number that matters is how many of the 136 pixels read 0 from an unserved helper neighbour. So far that's 8 on a Radeon 780M (RDNA3) and 18 on WARP, and 0 on both with #2373's helper-lane wave ops (SM 6.7). An NVIDIA count would show whether the gap is the same across vendors, which is the point of keeping the test. AI-assisted (Claude).
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/3571:upstream-pr/3571'
git switch 'upstream-pr/3571'

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