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

Open
guinpereira wants to merge 1 commit from upstream-pr/1402 into main
guinpereira commented 2026-11-24 15:38:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by guinpereira on 2026-11-24T15:38:51Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5475346136 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1402). Originally posted by [guinpereira](https://github.com/guinpereira) on 2026-11-24T15:38:51Z. --- 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)
DarkPanda69 commented 2026-11-24 16:07:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T15:45:54Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7136572984 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7136572984). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-24T15:45:54Z. --- 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.
DavidM1911 commented 2026-11-24 17:06:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T17:01:46Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7138575604 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7138575604). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T17:01:46Z. --- 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 commented 2026-11-26 06:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:13:14Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7183288673 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7183288673). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T05:13:14Z. --- 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.
github-actions[bot] commented 2026-12-01 02:32:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:14Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298722266 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7298722266). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:32:14Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 05:38:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:38:22Z.


Triage (#1607) – head d61b500

No open or merged PR adds a compute-generated indirect draw check to the test title.
Minor points: tests/testtitle/src/gpu/indirect.rs skips when the device supports neither 32 nor 64 lanes but prints 'no wave64'; in e2e.rs that skip makes the whole e2e test print SKIPPED although every other check in it ran. The PR conflicts with main's e2e.rs.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301981410 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1402#issuecomment-7301981410). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:38:22Z. --- **Triage (#1607)** – head d61b500 No open or merged PR adds a compute-generated indirect draw check to the test title. Minor points: tests/testtitle/src/gpu/indirect.rs skips when the device supports neither 32 nor 64 lanes but prints 'no wave64'; in e2e.rs that skip makes the whole e2e test print SKIPPED although every other check in it ran. The PR conflicts with main's e2e.rs. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/1402:upstream-pr/1402'
git switch 'upstream-pr/1402'

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