Tests: cover compute-generated indirect draws in the test title #1402

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

@⁠guinpereira on GitHub · 2026-11-24 15:38 UTC · original
guinpereira:claude/ei-test-validate → main · +219 −4 · 4 files · 1 commits · open

The test title now checks the whole compute → barrier → indirect draw → readback path through its own command-list entry points, with a zero-count control. The coverage reviewed at 930e8b4 does not exercise this sequence: bind.rs's ExecuteIndirect tests use a fake ExecuteIndirect without a GPU, #941 / #977 do not use ExecuteIndirect, and #869's GPU test checks its own repack shader on a PC device (no compute-written arguments, no draw, no zero count). Tests only; no runtime file changes.

What is in it

  • tests/testtitle/src/gpu/indirect.rs (new): compute_generated_indirect_draw.
    • A console-format compute program (RDNA2 in FSSM / XBCH / XDAT, built like gpu_compute_e2e::console_cs), created through the console device's compute PSO slot, writes draw arguments (3 vertices, 1 instance) and a draw count taken from a root constant into one buffer.
    • UAV → INDIRECT_ARGUMENT barrier, then ExecuteIndirect (DRAW signature, max 1, count buffer) on the title's command list, then the render target and the buffer are copied to a readback buffer.
    • It checks the generated arguments and count first (a compute failure is reported as such), then the pixels: the corner keeps the clear colour; the centre is the triangle's green with count 1 and the clear colour with count 0. The count-1 case runs first, so the count-0 control runs with valid arguments still in the buffer.
  • tests/testtitle/src/gpu.rs, tests/testtitle/src/main.rs: the module and its check, [PASS] D3D12.X: compute-generated indirect draw and zero-count control.
  • crates/xcl/tests/e2e.rs: test_title_runs_and_game_folder_is_untouched requires that line, and counts the second console-native program (CS hardware stage, CS recompile mode, its FSSM and HLSL dumps) when the check ran; a GPU without the needed wave support reports SKIPPED through skip_test.

Tested

  • NVIDIA GeForce RTX 5060 Ti 16 GB, driver 617.14 (32-lane waves); Ryzen 7 5700X, 32 GB; Windows 11 Pro 26200.9974; Rust 1.99.1 stable-x86_64-pc-windows-msvc; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build.
  • Rebased onto main c4d37be (head d61b500, patch unchanged per git range-diff), clean tree otherwise.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture: 959 passed, 0 failed, 43 ignored. The test title's output has [PASS] D3D12.X: compute-generated indirect draw and zero-count control and xcl_testtitle: done, failures: 0; no SKIPPED line for it.
  • SKIPPED on this adapter: no wave64 — lower::tests (4 GPU agreement tests), lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu, the wave64 cases of lower_dxil::tests::{f16,f32,f64,integer}_programs_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware; per-lane forms refused (#1426) — f16 arithmetic, f16 packed, f32 conversions; no heap windows — heap_window_out_of_memory_falls_back_to_the_switch_form.
  • Before the rebase (22bf371 on 930e8b4): 751 passed, 0 failed, 41 ignored.

Regression run

  • Not needed: no file under crates/xcl/src changes.

Not tested

  • AMD and Intel GPUs, 64-lane hardware, on my side (comments below report AMD RX 9070 XT and RTX 3060 runs of 22bf371).
  • A GPU that takes the new skip path.
  • A retail title (the test runs only in the test title).

AI use

  • Implementation: OpenAI Codex. The exact model identifier was not exposed to this session and could not be verified.
  • Review and validation: Claude Code (Claude Opus 5.5) reviewed the unchanged patch, checked existing coverage (main and #941, #977, #869), ran the tests on the named hardware, drafted the test report, then rebased the commit onto c4d37be and reran the full suite above.
  • OpenAI Codex reviewed the follow-up notes and revised this description. The tested source patch is unchanged. This contribution is independent of the watchdog investigation in #505.

🤖 Generated with Claude Code

**@⁠guinpereira** on GitHub · 2026-11-24 15:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1402) `guinpereira:claude/ei-test-validate` → `main` · +219 −4 · 4 files · 1 commits · open The test title now checks the whole compute → barrier → indirect draw → readback path through its own command-list entry points, with a zero-count control. The coverage reviewed at `930e8b4` does not exercise this sequence: `bind.rs`'s ExecuteIndirect tests use a fake ExecuteIndirect without a GPU, #941 / #977 do not use ExecuteIndirect, and #869's GPU test checks its own repack shader on a PC device (no compute-written arguments, no draw, no zero count). Tests only; no runtime file changes. **What is in it** - `tests/testtitle/src/gpu/indirect.rs` (new): `compute_generated_indirect_draw`. - A console-format compute program (RDNA2 in FSSM / XBCH / XDAT, built like `gpu_compute_e2e::console_cs`), created through the console device's compute PSO slot, writes draw arguments (3 vertices, 1 instance) and a draw count taken from a root constant into one buffer. - UAV → INDIRECT_ARGUMENT barrier, then `ExecuteIndirect` (DRAW signature, max 1, count buffer) on the title's command list, then the render target and the buffer are copied to a readback buffer. - It checks the generated arguments and count first (a compute failure is reported as such), then the pixels: the corner keeps the clear colour; the centre is the triangle's green with count 1 and the clear colour with count 0. The count-1 case runs first, so the count-0 control runs with valid arguments still in the buffer. - `tests/testtitle/src/gpu.rs`, `tests/testtitle/src/main.rs`: the module and its check, `[PASS] D3D12.X: compute-generated indirect draw and zero-count control`. - `crates/xcl/tests/e2e.rs`: `test_title_runs_and_game_folder_is_untouched` requires that line, and counts the second console-native program (CS hardware stage, CS recompile mode, its FSSM and HLSL dumps) when the check ran; a GPU without the needed wave support reports `SKIPPED` through `skip_test`. **Tested** - NVIDIA GeForce RTX 5060 Ti 16 GB, driver 617.14 (32-lane waves); Ryzen 7 5700X, 32 GB; Windows 11 Pro 26200.9974; Rust 1.99.1 `stable-x86_64-pc-windows-msvc`; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build. - Rebased onto `main` `c4d37be` (head `d61b500`, patch unchanged per `git range-diff`), clean tree otherwise. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture`: **959 passed, 0 failed, 43 ignored**. The test title's output has `[PASS] D3D12.X: compute-generated indirect draw and zero-count control` and `xcl_testtitle: done, failures: 0`; no `SKIPPED` line for it. - SKIPPED on this adapter: no wave64 — `lower::tests` (4 GPU agreement tests), `lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu`, the wave64 cases of `lower_dxil::tests::{f16,f32,f64,integer}_programs_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`; per-lane forms refused (#1426) — f16 arithmetic, f16 packed, f32 conversions; no heap windows — `heap_window_out_of_memory_falls_back_to_the_switch_form`. - Before the rebase (`22bf371` on `930e8b4`): 751 passed, 0 failed, 41 ignored. **Regression run** - Not needed: no file under `crates/xcl/src` changes. **Not tested** - AMD and Intel GPUs, 64-lane hardware, on my side (comments below report AMD RX 9070 XT and RTX 3060 runs of `22bf371`). - A GPU that takes the new skip path. - A retail title (the test runs only in the test title). **AI use** - Implementation: OpenAI Codex. The exact model identifier was not exposed to this session and could not be verified. - Review and validation: Claude Code (Claude Opus 5.5) reviewed the unchanged patch, checked existing coverage (main and #941, #977, #869), ran the tests on the named hardware, drafted the test report, then rebased the commit onto `c4d37be` and reran the full suite above. - OpenAI Codex reviewed the follow-up notes and revised this description. The tested source patch is unchanged. This contribution is independent of the watchdog investigation in #505. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:52:53 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 17:01 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 17:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7138575604) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-24 15:45 UTC · original · edited 2026-11-24 21:36 UTC

AMD run with 64-lane waves, which this PR lists as not tested, plus an NVIDIA one. Updated for head d61b500 (first run was on 22bf371, same result).

Tested: pass, head d61b500 applied on main c4d37be, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. cargo build --workspace, then cargo test -p xcl --test e2e -- --test-threads=1 --nocapture with XCL_ADAPTER set to each GPU:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 3 passed, 0 failed.
  • NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 3 passed, 0 failed.

On both, test_title_runs_and_game_folder_is_untouched passed its [PASS] ... compute-generated indirect draw and zero-count control assert with no SKIPPED line for it, so the CS shader counts were checked on both adapters. The one SKIPPED line on each is test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll, the same on main without this PR.

Not tested: a GPU that takes the skip path; Intel; a title.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-24 15:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7136572984) · edited 2026-11-24 21:36 UTC AMD run with 64-lane waves, which this PR lists as not tested, plus an NVIDIA one. Updated for head `d61b500` (first run was on `22bf371`, same result). **Tested:** pass, head `d61b500` applied on `main` `c4d37be`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo build --workspace`, then `cargo test -p xcl --test e2e -- --test-threads=1 --nocapture` with `XCL_ADAPTER` set to each GPU: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 3 passed, 0 failed. - NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 3 passed, 0 failed. On both, `test_title_runs_and_game_folder_is_untouched` passed its `[PASS] ... compute-generated indirect draw and zero-count control` assert with no `SKIPPED` line for it, so the CS shader counts were checked on both adapters. The one SKIPPED line on each is `test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll`, the same on `main` without this PR. **Not tested:** a GPU that takes the skip path; Intel; a title. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:13 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 05:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7183288673) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • tests/testtitle/src/gpu.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1402/head:github-bot/gh-1402'
git switch 'github-bot/gh-1402'

Merge

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