Skip to content

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

Open
thatirishguyyy wants to merge 1 commit into
xcl-dev:mainfrom
thatirishguyyy:test/wave32-first-active-lane
Open

thatirishguyyy wants to merge 1 commit into
xcl-dev:mainfrom
thatirishguyyy:test/wave32-first-active-lane

Conversation

@thatirishguyyy

Copy link
Copy Markdown

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 Recompiler: the FSSM header's wave32 flag decides a program's wave size #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

@milas6669

Copy link
Copy Markdown
Contributor

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 Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718 / Tests: check cubemap tile reuse independently of idle page reclamation #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.

@SlopTart

Copy link
Copy Markdown

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.

@iggyvilla

Copy link
Copy Markdown
Collaborator

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.

@throny throny added off-goal Does not bear on the current goal (world loading); waits until it is reached and removed off-goal Does not bear on the current goal (world loading); waits until it is reached labels Nov 25, 2026
@JJAutoCompare

Copy link
Copy Markdown

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.

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants