Tests: cover 3D wave64 compute through the D3D12.X PSO hook #655

Closed
luna020924 wants to merge 1 commit from upstream-pr/660 into main
luna020924 commented 2026-11-24 03:01:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luna020924 on 2026-11-24T03:01:08Z.


The existing compute PSO integration test exercises a two-dimensional dispatch. Add a separate three-dimensional case that resolves a translated console PSO and checks Z-axis group and thread IDs as well as cross-wave LDS reads on the GPU.

What is in it

  • crates/xcl/tests/gpu_compute_e2e.rs keeps the two-dimensional case and reuses its PSO setup for a 16 × 4 × 2 thread group dispatched over 2 × 3 × 2 groups. Each of the 1,536 threads writes its global coordinates and the mirrored thread's coordinates from the other wave64. The test compares all 3,072 values with the CPU calculation and checks the guards on both sides of the output buffer.

Tested

  • Base dd2ae9a70af5eb5aad60f02d86e386b72abe1e95 plus this test-only patch. Windows 11 build 26200, Ryzen 7 2700X, GeForce RTX 5060 Ti 16 GB (driver 610.88), rustc 1.100.0 MSVC x64 and DXC 1.9.2609.5. Debug build.
  • cargo test --locked --jobs 3 -p xcl --test gpu_compute_e2e -- console_wave64_compute_3d_through_the_pso_hook --exact --show-output passed on the RTX 5060 Ti with no skip. The test confirmed the resolved PSO was translated from the console shader.
  • Two negative controls failed at GPU readback. Clearing the group-Z enable left the first word at (0, 0, 2) untouched. Disabling the local Z thread ID lost the mirrored thread's LDS value at (0, 0, 0). Both changes were reverted.
  • cargo build --locked --workspace --jobs 3 passed.
  • cargo test --locked --workspace --no-fail-fast --jobs 3 -- --test-threads=4 --show-output returned 691 passed, 0 failed and 41 ignored. The existing 2D test, the async PSO test and the new 3D test all passed.
  • Two other GPU tests reported SKIPPED for lack of native wave64: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. The test runner includes them in the passed count.

Regression run

  • Integration-test-only change. The shader and buffers are created by the test.

Not tested

  • Native wave64 on AMD and optional game-data tests.

AI use

  • OpenAI Codex (GPT-6.2 Sol) wrote the test, ran validation and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:6573636681 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/660). Originally posted by [luna020924](https://github.com/luna020924) on 2026-11-24T03:01:08Z. --- The existing compute PSO integration test exercises a two-dimensional dispatch. Add a separate three-dimensional case that resolves a translated console PSO and checks Z-axis group and thread IDs as well as cross-wave LDS reads on the GPU. **What is in it** - `crates/xcl/tests/gpu_compute_e2e.rs` keeps the two-dimensional case and reuses its PSO setup for a 16 × 4 × 2 thread group dispatched over 2 × 3 × 2 groups. Each of the 1,536 threads writes its global coordinates and the mirrored thread's coordinates from the other wave64. The test compares all 3,072 values with the CPU calculation and checks the guards on both sides of the output buffer. **Tested** - Base `dd2ae9a70af5eb5aad60f02d86e386b72abe1e95` plus this test-only patch. Windows 11 build 26200, Ryzen 7 2700X, GeForce RTX 5060 Ti 16 GB (driver 610.88), rustc 1.100.0 MSVC x64 and DXC 1.9.2609.5. Debug build. - `cargo test --locked --jobs 3 -p xcl --test gpu_compute_e2e -- console_wave64_compute_3d_through_the_pso_hook --exact --show-output` passed on the RTX 5060 Ti with no skip. The test confirmed the resolved PSO was translated from the console shader. - Two negative controls failed at GPU readback. Clearing the group-Z enable left the first word at (0, 0, 2) untouched. Disabling the local Z thread ID lost the mirrored thread's LDS value at (0, 0, 0). Both changes were reverted. - `cargo build --locked --workspace --jobs 3` passed. - `cargo test --locked --workspace --no-fail-fast --jobs 3 -- --test-threads=4 --show-output` returned 691 passed, 0 failed and 41 ignored. The existing 2D test, the async PSO test and the new 3D test all passed. - Two other GPU tests reported `SKIPPED` for lack of native wave64: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. The test runner includes them in the passed count. **Regression run** - Integration-test-only change. The shader and buffers are created by the test. **Not tested** - Native wave64 on AMD and optional game-data tests. **AI use** - OpenAI Codex (GPT-6.2 Sol) wrote the test, ran validation and drafted this description.
upstream-sync closed this pull request 2026-11-24 06:59:24 +00:00

Pull request closed

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
xcl-dev/xcl!655
No description provided.