Skip to content

Tests: honor the selected adapter in the indirect argument test - #2318

Open
jeroenhaentjens wants to merge 1 commit into
xcl-dev:mainfrom
jeroenhaentjens:tests/indirect-gpu-validation
Open

jeroenhaentjens wants to merge 1 commit into
xcl-dev:mainfrom
jeroenhaentjens:tests/indirect-gpu-validation

Conversation

@jeroenhaentjens

Copy link
Copy Markdown

The ExecuteIndirect regression from #1791 used D3D12CreateDevice(None), ignoring XCL_ADAPTER and Agility before compiling a cs_6_6 shader. On this hybrid laptop, the isolated test on main 06c9f55 failed pipeline creation with 0x80070057 even with XCL_ADAPTER=nvidia. With this change it selects the Quadro RTX 3000 and passes all 40 existing cases.

What is in it

  • bind.rs, existing #[cfg(test)] test only: use the adapter selector and Agility device creation, check DXC/SM 6.6 availability, emit explicit skip reasons, and log the selected adapter. Shader, barriers, expected counts and assertions stay unchanged.
  • No runtime code changes. A maintainer's test-only label is needed because the test lives in a runtime file. The separate helper proposed in D3D12.X: dispatches of more than 65 535 groups in X are folded into Y #1428 is not required by this change.

Tested

  • Windows 11 Pro 26200, i7-9750H, 32 GB RAM; Quadro RTX 3000 6 GB, driver 32.0.15.9706 (597.06); Intel UHD 630, driver 26.20.100.7262. Rust/Cargo 1.100.0, DXC 1.9.2609.5, debug. Incremental compilation and debug symbols disabled; XCL_SAMPLE_*, XCL_DIRECT_DXIL, XCL_HEAP_WINDOWS unset.
  • cargo build --workspace --locked: passed.
  • XCL_ADAPTER=nvidia, cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 1265 passed, 0 failed, 46 ignored, exit 0. 28 explicit SKIPPED records: 21 no native wave64, 3 unsupported f16 forms, 2 missing debug layer, 1 unavailable cache control, 1 disabled heap-window path. Skip records are separate from harness totals.
  • Exact targeted command below: unmodified 06c9f55 0 passed, 1 failed at pipeline creation; patched NVIDIA 1 passed, 0 failed, all 40 cases executed. With XCL_ADAPTER=intel: 1 reported pass, 1 explicit skip (no SM 6.6). With a nonexistent adapter name: 1 reported pass, 1 explicit skip (no match), without silently using another GPU.
  • Tests ran on the unchanged source tree committed as 8898cd3.
cargo test --locked -p xcl --lib hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it -- --exact --nocapture --test-threads=1

Not tested

  • WARP, AMD, native wave64, missing-DXC path, retail titles, or non-Windows targets. The original baseline did not log its adapter. This is a test-initialization fix, not evidence of a runtime synchronization or performance change.

AI use

  • Codex and three agents investigated the failure and duplicate work, prepared and checked the test-only change, ran validation, and wrote this description. The exact model identifier is unavailable in this session.

The ExecuteIndirect regression used D3D12CreateDevice(None), ignoring
XCL_ADAPTER and the Agility device path before compiling a cs_6_6 shader.
On this hybrid laptop the isolated main test failed PSO creation with
0x80070057 even with XCL_ADAPTER=nvidia.

Select the requested adapter through the existing helpers, create its
device through Agility, and report missing DXC or SM 6.6 as explicit skips.
The Quadro RTX 3000 now executes all 40 existing cases successfully. The
shader, barriers, expected counts and assertions are unchanged.

Assisted-by: Codex (exact model identifier unavailable)
@jeroenhaentjens
jeroenhaentjens marked this pull request as ready for review November 25, 2026 14:02
@jeroenhaentjens

Copy link
Copy Markdown
Author

The failing PR description job reports only the two missing retail smoke blocks. It classifies bind.rs as runtime code by its path.

For head 8898cd360ce80f90c983c5922d3c170db816905d, the 29 additions / 6 deletions are entirely inside the existing #[cfg(test)] test. Could a maintainer inspect this revision and apply the documented test-only label, and separately approve the fork CI run? The local description checker passes with --test-only; the GPU workspace run completed with 1265 passed, 0 failed, 46 ignored and 28 explicit skip records, detailed above.

AI use: Codex checked the failure log and wrote this status request; the exact model identifier is unavailable.

@DarkPanda69

DarkPanda69 commented Nov 25, 2026 •

Copy link
Copy Markdown

AMD run (listed as untested) on a desktop with two GPUs from different vendors, which shows the selection itself: with this PR the test follows XCL_ADAPTER to either card, and it passes on both.

Head 8898cd3 applied on main 06c9f55, debug, Windows 11 Pro 26200. cargo test -p xcl --lib -- execute_indirect_reads_the_arguments_written_before_it --test-threads=1 --nocapture:

XCL_ADAPTER=radeon XCL_ADAPTER=3060
this PR ExecuteIndirect adapter: AMD Radeon RX 9070 XT, ok ExecuteIndirect adapter: NVIDIA GeForce RTX 3060, ok
main ok (no adapter line; the test uses the default adapter whatever XCL_ADAPTER says) ok

So on this machine main passes too (no Agility/hybrid-laptop failure like on your Quadro), but only this PR makes the AMD run actually happen on the AMD card. Drivers: RX 9070 XT 32.0.32029.2010 (RDNA4, native wave64), RTX 3060 32.0.16.1088; DXC 1.9.2602.17.

Not tested: WARP, a missing-DXC host, a hybrid laptop.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

@nnonno91

Copy link
Copy Markdown

Independent WARP and Radeon check on clean 8898cd360ce80f90c983c5922d3c170db816905d.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics driver 32.0.21042.62, Rust 1.100.0 MSVC and SDK DXC/DXIL 1.8.2502.11, unoptimized test profile.
  • cargo test --locked -p xcl --lib hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it -- --exact --nocapture --test-threads=1 with XCL_ADAPTER=warp and XCL_ADAPTER=AMD Radeon in separate processes. Each gave 1 passed, 0 failed, 0 ignored and no skips. The test printed WARP (software renderer) and AMD Radeon(TM) Graphics respectively. All 40 cases completed on each.

Not tested

Missing DXC, the parent, a retail title and the full workspace suite.

AI use

OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.

@luckyteagirl

Copy link
Copy Markdown
Contributor

Independent hybrid-laptop RDNA2 check of exact PR head 8898cd360ce80f90c983c5922d3c170db816905d.

Environment: Windows 11 build 26200; Ryzen 9 5980HX; discrete AMD Radeon RX 6800M driver 30.0.13002.13003 alongside integrated Radeon graphics; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. XCL_ADAPTER=6800M, XCL_REQUIRE_GPU=wave64, XCL_DIRECT_DXIL=1; isolated debug Cargo target.

hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it passed 1 passed, 0 failed, 0 ignored with no skip. The test logged ExecuteIndirect adapter: AMD Radeon RX 6800M, confirming that this hybrid machine selected its discrete GPU. The fixture's 40 existing indirect-argument cases completed.

Limits: Focused test only. I did not run the full workspace suite, retail-title smoke, or an exact parent comparison on this head. This verifies adapter selection and the fixture on this RDNA2 laptop; it does not establish runtime synchronization or performance.

AI use: OpenAI Codex (GPT-6; exact variant unavailable in this session) ran the native Windows test, checked the log and clean exact head, and drafted this report. No game data was used.

@Lum7nt

Lum7nt commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Tested on \8898cd360ce80f90c983c5922d3c170db816905d\ (\8898cd3, clean PR head):

  • Hardware / OS / Toolchain: NVIDIA GeForce RTX 3060 12 GB (driver \32.0.15.8142\ / 581.42, wave32) + Intel UHD Graphics 630 (\31.0.101.2130), Intel Core i5-10400, Windows 11 (NT \10.0.22631.0),
    ustc 1.100.0\ (\x86_64-pc-windows-msvc), DXC \1.8.2502.11\ (Windows SDK \10.0.26100.0), debug profile.
  • Focused multi-adapter check (\cargo test -p xcl --lib indirect_ -- --nocapture):
    • \XCL_ADAPTER=nvidia: 4 passed, 0 failed, 0 ignored (\1218 filtered out). Printed \ExecuteIndirect adapter: NVIDIA GeForce RTX 3060\ and passed \execute_indirect_reads_the_arguments_written_before_it.
    • \XCL_ADAPTER=intel: 4 passed, 0 failed, 0 ignored (\1218 filtered out), with \SKIPPED hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it: Intel(R) UHD Graphics 630: no SM 6.6 (on Windows 10, set XCL_D3D12_DIR to a D3D12 Agility SDK folder)\ — confirms \XCL_ADAPTER\ selection is honored and cleanly skips when the selected adapter lacks SM 6.6.
  • Workspace suite (\XCL_ADAPTER=nvidia, \cargo build --workspace\ then \cargo test --workspace --no-fail-fast -- --test-threads=4): 1263 passed, 2 failed, 46 ignored (matching \origin/main\ \

@throny throny added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 25, 2026
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.

6 participants