Shaders: test first-active-lane isolation in wave32 #852

Open
github-bot wants to merge 1 commit from github-bot/gh-852 into main AGit
Owner

@⁠thatirishguyyy on GitHub · 2026-11-24 06:48 UTC · original
thatirishguyyy:test/wave32-first-active-lane → main · +87 −0 · 1 files · 1 commits · open

What is in it

  • Extend the compute regression to check v_readfirstlane with different EXEC masks and lane values in the two halves of one hardware wave.
  • Check vertex and pixel code generation, then run synthetic draws and verify the first-active-lane values in render-target readback. The draw tests report a skip for upper-half coverage if the driver runs only 32-lane waves for that shader stage.
  • Related to #573, which covers detecting the wave size from the shader header. These tests exercise lane isolation after the wave size has been selected. VIctory PR #599 prompted the check.

Tested

  • Windows, Radeon RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 7800X3D, Rust 1.100.0, release build at c8b26b4 on beaa245.
  • cargo test --workspace --release --locked --offline -- --test-threads=4 — 716 passed, 0 failed, 41 ignored. Both graphics draws exercised both halves, and no GPU tests reported a skip.
  • As a negative control, I temporarily removed the half offset from the generated lane read. Both graphics draws returned 5/64 instead of 37/64 for the upper half and failed as expected.

Not tested

  • Other GPU vendors and drivers. Coverage uses synthetic shaders and draws.

AI use

  • Codex wrote and ran the tests
**@⁠thatirishguyyy** on GitHub · 2026-11-24 06:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/852) `thatirishguyyy:test/wave32-first-active-lane` → `main` · +87 −0 · 1 files · 1 commits · open **What is in it** - Extend the compute regression to check `v_readfirstlane` with different EXEC masks and lane values in the two halves of one hardware wave. - Check vertex and pixel code generation, then run synthetic draws and verify the first-active-lane values in render-target readback. The draw tests report a skip for upper-half coverage if the driver runs only 32-lane waves for that shader stage. - Related to #573, which covers detecting the wave size from the shader header. These tests exercise lane isolation after the wave size has been selected. [VIctory PR #599](https://github.com/Marvisak/VIctory/pull/599) prompted the check. **Tested** - Windows, Radeon RX 9070 XT (driver `32.0.32029.2010`), Ryzen 7 7800X3D, Rust `1.100.0`, release build at `c8b26b4` on `beaa245`. - `cargo test --workspace --release --locked --offline -- --test-threads=4` — 716 passed, 0 failed, 41 ignored. Both graphics draws exercised both halves, and no GPU tests reported a skip. - As a negative control, I temporarily removed the half offset from the generated lane read. Both graphics draws returned `5/64` instead of `37/64` for the upper half and failed as expected. **Not tested** - Other GPU vendors and drivers. Coverage uses synthetic shaders and draws. **AI use** - Codex wrote and ran the tests
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:34:34 +00:00
Author
Owner

@⁠milas6669 on GitHub · 2026-11-24 07:02 UTC · original

Test report on c8b26b4 (PR head; its base is main beaa245, which is still main; no merge conflict).

Tested

  • NVIDIA GeForce RTX 3070 (32-lane waves), Intel i9-10900KF, Windows 11 Pro 10.0.26200, rustc 1.100.0 x86_64-pc-windows-msvc, debug
  • cargo test --workspace --no-fail-fast -- --test-threads=4; the same command on main beaa245 (this PR's base): 713 passed, 0 failed, 41 ignored
  • on this head: 713 passed, 3 failed, 41 ignored. The 3 failures are the D3D12.X tests placed_title_textures_share_vram_and_preserve_pixels (the cubemap extra_pages must be reused at same va assert), transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory (both PoisonError after the first panic). They are the flaky tests of #718 / #447 and fail on main in some of my runs (on this exact main run they passed), so they are not from this PR.
  • the 3 new tests are gpu_pixel_wave32_first_lane_uses_its_own_half, gpu_vertex_wave32_first_lane_uses_its_own_half and graphics_wave32_first_lane_uses_its_own_half: all three are counted as passed, but the first two print SKIPPED ... no wave64 here, so on this GPU they ran no check; only the third did
  • SKIPPED (no wave64) on this GPU: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware

Not tested

  • the two SKIPPED new tests need wave64 hardware, which I do not have; the first-lane behaviour they test on wave64 is untested here
  • AMD, scripts/smoke.ps1 (test-only diff)

AI use

  • Claude Code, Claude Sonnet 5.5, ran the commands and wrote this report. I did not review the diff beyond reading it.
**@⁠milas6669** on GitHub · 2026-11-24 07:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/852#issuecomment-7124552533) Test report on `c8b26b4` (PR head; its base is `main` beaa245, which is still `main`; no merge conflict). **Tested** - NVIDIA GeForce RTX 3070 (32-lane waves), Intel i9-10900KF, Windows 11 Pro 10.0.26200, rustc 1.100.0 `x86_64-pc-windows-msvc`, debug - `cargo test --workspace --no-fail-fast -- --test-threads=4`; the same command on `main` beaa245 (this PR's base): **713 passed, 0 failed, 41 ignored** - on this head: **713 passed, **3 failed**, 41 ignored. The 3 failures are the D3D12.X tests `placed_title_textures_share_vram_and_preserve_pixels` (the `cubemap extra_pages must be reused at same va` assert), `transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory` (both `PoisonError` after the first panic). They are the flaky tests of #718 / #447 and fail on `main` in some of my runs (on this exact main run they passed), so they are not from this PR.** - the 3 new tests are `gpu_pixel_wave32_first_lane_uses_its_own_half`, `gpu_vertex_wave32_first_lane_uses_its_own_half` and `graphics_wave32_first_lane_uses_its_own_half`: all three are counted as passed, but the first two print `SKIPPED ... no wave64` here, so on this GPU they ran no check; only the third did - SKIPPED (no wave64) on this GPU: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` **Not tested** - the two SKIPPED new tests need wave64 hardware, which I do not have; the first-lane behaviour they test on wave64 is untested here - AMD, `scripts/smoke.ps1` (test-only diff) **AI use** - Claude Code, Claude Sonnet 5.5, ran the commands and wrote this report. I did not review the diff beyond reading it.
Author
Owner

@⁠SlopTart on GitHub · 2026-11-24 08:09 UTC · original

Linux / AMD RDNA3 datapoint.

Merged state: head c8b26b4 onto main 1ec4c98, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 711 passed, 7 failed, 41 ignored. Failures = the known Wine-lane set from my #42 rows - zero flakes in this lane. wave32 first-active-lane isolation tests green (711 passed, zero flakes in this lane).

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

**@⁠SlopTart** on GitHub · 2026-11-24 08:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/852#issuecomment-7125794559) Linux / AMD RDNA3 datapoint. **Merged state:** head `c8b26b4` onto main `1ec4c98`, clean merge. **Full suite, `cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4`:** **711 passed, 7 failed, 41 ignored**. Failures = the known Wine-lane set from my #42 rows - zero flakes in this lane. wave32 first-active-lane isolation tests green (711 passed, zero flakes in this lane). **Not tested:** retail titles (none here), Windows, RDNA4. Counts only, no game data. **Machine:** RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross `x86_64-pc-windows-gnu`, `XCL_NETWORK=0`, release profile, `--test-threads=4`. My Linux rows: #42 / #718. AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.
Author
Owner

@⁠iggyvilla on GitHub · 2026-11-24 13:04 UTC · original

Test report for c8b26b4aac2c8f61d62eda067cb6a1b818aeeacf (current head of #852, base 1ec4c98; only crates/xcl/src/gpu/recomp/tests.rs changes; not merged with main) on an AMD RDNA2 card. The commands were run, and the output captured, by an agent (omp, DeepSeek V4.1 Flash); the text below was checked against the PR head's source and written by Claude Code (Claude Sonnet 5.5).

Tested

  • AMD Radeon RX 6650 XT 8 GB (RDNA2, native wave64), Ryzen 7 5700X, Windows 11; DXC 1.8.2502.11 from Windows SDK 10.0.26100.0; release profile, clean worktree at the head commit.
  • cargo test -p xcl --lib --release -- wave32_first_lane: 3 passed, 0 failed, but two of them skipped themselves:
test gpu::recomp::tests::graphics_wave32_first_lane_uses_its_own_half ... ok
SKIPPED gpu::recomp::tests::gpu_vertex_wave32_first_lane_uses_its_own_half: the draw did not expose a second 32-lane half for this shader stage
test gpu::recomp::tests::gpu_vertex_wave32_first_lane_uses_its_own_half ... ok
SKIPPED gpu::recomp::tests::gpu_pixel_wave32_first_lane_uses_its_own_half: the draw did not expose a second 32-lane half for this shader stage
test gpu::recomp::tests::gpu_pixel_wave32_first_lane_uses_its_own_half ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 693 filtered out; finished in 0.30s
  • cargo test -p xcl --lib --release -- gpu_wave32_program_in_wave64_hardware: 1 passed, 0 failed (695 filtered out, 0.40 s), not skipped.

What this shows

  • The compute test, which forces [WaveSize(64)] and checks all 64 lanes, passes: V_READFIRSTLANE_B32 returns 10 for lanes in the first half and 37 for the second. This is the PR's first execution on native wave64 hardware.
  • The two graphics draws ran and every pixel they wrote matched, but none came from the second half, so the test's own guard (tests.rs:4237, runner::skip_test) fired. A skip is not coverage: the vertex/pixel half of this PR is unverified on this card. The probable reason is that the emitted VS/PS carry no [WaveSize] and this driver ran them as 32-lane waves (every pixel reported half 0), but the test cannot tell that apart from a 64-lane wave whose upper half was never active.
  • graphics_wave32_first_lane_uses_its_own_half only checks the generated HLSL text, so it passes without touching the GPU.

Not tested

  • The graphics execution path (needs a GPU that packs a wave32 VS/PS into a 64-lane wave, or a harness that forces [WaveSize(64)] for graphics); no full cargo test --workspace. Test-only diff, so no smoke pair is needed.
  • Not merged with current main. The raw output was not kept as a file; the blocks above are the agent's capture.

AI use
Claude Code, Claude Sonnet 5.5: checked the report against the PR head's tests.rs and wrote this text; it ran nothing. The build and test runs were done by omp with DeepSeek V4.1 Flash, which changed no code.

**@⁠iggyvilla** on GitHub · 2026-11-24 13:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/852#issuecomment-7132314747) Test report for `c8b26b4aac2c8f61d62eda067cb6a1b818aeeacf` (current head of #852, base `1ec4c98`; only `crates/xcl/src/gpu/recomp/tests.rs` changes; not merged with `main`) on an AMD RDNA2 card. The commands were run, and the output captured, by an agent (omp, DeepSeek V4.1 Flash); the text below was checked against the PR head's source and written by Claude Code (Claude Sonnet 5.5). **Tested** - AMD Radeon RX 6650 XT 8 GB (RDNA2, native wave64), Ryzen 7 5700X, Windows 11; DXC 1.8.2502.11 from Windows SDK 10.0.26100.0; release profile, clean worktree at the head commit. - `cargo test -p xcl --lib --release -- wave32_first_lane`: 3 passed, 0 failed, but two of them skipped themselves: ``` test gpu::recomp::tests::graphics_wave32_first_lane_uses_its_own_half ... ok SKIPPED gpu::recomp::tests::gpu_vertex_wave32_first_lane_uses_its_own_half: the draw did not expose a second 32-lane half for this shader stage test gpu::recomp::tests::gpu_vertex_wave32_first_lane_uses_its_own_half ... ok SKIPPED gpu::recomp::tests::gpu_pixel_wave32_first_lane_uses_its_own_half: the draw did not expose a second 32-lane half for this shader stage test gpu::recomp::tests::gpu_pixel_wave32_first_lane_uses_its_own_half ... ok test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 693 filtered out; finished in 0.30s ``` - `cargo test -p xcl --lib --release -- gpu_wave32_program_in_wave64_hardware`: 1 passed, 0 failed (695 filtered out, 0.40 s), not skipped. **What this shows** - The compute test, which forces `[WaveSize(64)]` and checks all 64 lanes, passes: `V_READFIRSTLANE_B32` returns 10 for lanes in the first half and 37 for the second. This is the PR's first execution on native wave64 hardware. - The two graphics draws ran and every pixel they wrote matched, but none came from the second half, so the test's own guard (`tests.rs:4237`, `runner::skip_test`) fired. A skip is not coverage: **the vertex/pixel half of this PR is unverified on this card.** The probable reason is that the emitted VS/PS carry no `[WaveSize]` and this driver ran them as 32-lane waves (every pixel reported half 0), but the test cannot tell that apart from a 64-lane wave whose upper half was never active. - `graphics_wave32_first_lane_uses_its_own_half` only checks the generated HLSL text, so it passes without touching the GPU. **Not tested** - The graphics execution path (needs a GPU that packs a wave32 VS/PS into a 64-lane wave, or a harness that forces `[WaveSize(64)]` for graphics); no full `cargo test --workspace`. Test-only diff, so no smoke pair is needed. - Not merged with current `main`. The raw output was not kept as a file; the blocks above are the agent's capture. **AI use** Claude Code, Claude Sonnet 5.5: checked the report against the PR head's `tests.rs` and wrote this text; it ran nothing. The build and test runs were done by omp with DeepSeek V4.1 Flash, which changed no code.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:54 UTC · original

Tested

Clean detached PR head c8b26b4aac2c8f61d62eda067cb6a1b818aeeacf. STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5, unoptimized test profile.

Both GPU fixtures skipped on Arc A770 with no wave64 before shader compilation or draw. Zero graphics assertions executed. Libtest counted 2 passed, 0 failed, 0 ignored, with 2 explicit skips within that passing count.

cargo test --locked -p xcl --lib --no-run exited 0 outside the mutex. With XCL_ADAPTER=A770, these prebuilt commands ran inside Invoke-ArcTest.ps1 -Test. Both children and wrapper exited 0, and each filter excluded 695 tests.

xcl-77aca8ccb20e299f.exe --exact gpu::recomp::tests::gpu_pixel_wave32_first_lane_uses_its_own_half --nocapture --test-threads=1
xcl-77aca8ccb20e299f.exe --exact gpu::recomp::tests::gpu_vertex_wave32_first_lane_uses_its_own_half --nocapture --test-threads=1

The fixtures require one hardware wave64 to exercise two guest wave32 halves. Arc reached the adapter capability check and returned before the isolation readback.

Not tested

Pixel or vertex lane isolation on Arc, shader-stage wave width, the compute or HLSL-text fixtures, the workspace suite, and retail smoke.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the checked-in fixtures and prepared this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/852#issuecomment-7153266944) **Tested** Clean detached PR head `c8b26b4aac2c8f61d62eda067cb6a1b818aeeacf`. STOR-WINLAB, Windows 11 Enterprise Evaluation 25H2 x64 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5, unoptimized test profile. **Both GPU fixtures skipped on Arc A770 with `no wave64` before shader compilation or draw. Zero graphics assertions executed.** Libtest counted 2 passed, 0 failed, 0 ignored, with 2 explicit skips within that passing count. `cargo test --locked -p xcl --lib --no-run` exited 0 outside the mutex. With `XCL_ADAPTER=A770`, these prebuilt commands ran inside `Invoke-ArcTest.ps1 -Test`. Both children and wrapper exited 0, and each filter excluded 695 tests. ```text xcl-77aca8ccb20e299f.exe --exact gpu::recomp::tests::gpu_pixel_wave32_first_lane_uses_its_own_half --nocapture --test-threads=1 xcl-77aca8ccb20e299f.exe --exact gpu::recomp::tests::gpu_vertex_wave32_first_lane_uses_its_own_half --nocapture --test-threads=1 ``` The fixtures require one hardware wave64 to exercise two guest wave32 halves. Arc reached the adapter capability check and returned before the isolation readback. **Not tested** Pixel or vertex lane isolation on Arc, shader-stage wave width, the compute or HLSL-text fixtures, the workspace suite, and retail smoke. **AI use** T3 Code / Codex (`gpt-6.2-sol`) ran the checked-in fixtures and prepared this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 10:15 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 10:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/852#issuecomment-7159453417) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/852/head:github-bot/gh-852'
git switch 'github-bot/gh-852'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-852'
git switch 'github-bot/gh-852'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-852'
git switch 'github-bot/gh-852'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-852'
git switch 'main'
git merge --squash 'github-bot/gh-852'
git switch 'main'
git merge --ff-only 'github-bot/gh-852'
git switch 'main'
git merge 'github-bot/gh-852'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.