Skip to content

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

Open
guinpereira wants to merge 1 commit into
xcl-dev:mainfrom
guinpereira:claude/ei-test-validate
Open

guinpereira wants to merge 1 commit into
xcl-dev:mainfrom
guinpereira:claude/ei-test-validate

Conversation

@guinpereira

@guinpereira guinpereira commented Nov 24, 2026 •

Copy link
Copy Markdown

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 (gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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

🤖 Generated with Claude Code

@DarkPanda69

DarkPanda69 commented Nov 24, 2026 •

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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

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

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants