Tests: compare CreateQueryHeap and CreateCommandSignature against hos… #1602

Merged
OtavioTadeu merged 1 commit from upstream-pr/1612 into main 2026-11-25 19:20:49 +00:00
OtavioTadeu commented 2026-11-24 18:14:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by OtavioTadeu on 2026-11-24T18:14:32Z.


What is in it

  • Add host D3D12 parity tests for ID3D12Device::CreateQueryHeap (slot 39) and ID3D12Device::CreateCommandSignature (slot 41), Part of #480:
    • Compares OCCLUSION, TIMESTAMP, PIPELINE_STATISTICS, and SO_STATISTICS query heaps, invalid descriptors, and unknown console IID fallback (ID3D12QueryHeap).
    • Compares DRAW, DRAW_INDEXED, and DISPATCH command signatures, invalid strides/counts/node masks, and unknown console IID fallback (ID3D12CommandSignature).

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1088, Turing wave32), AMD Ryzen 5 5600G, Windows 11 26200, rustc 1.100.0, debug
  • cargo test -p xcl --test d3d12_query_and_command_signature -- --test-threads=1: 2 passed, 0 failed
  • cargo test --workspace -- --test-threads=4: 778 passed, 0 failed, 41 ignored (SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask [no wave64], gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware [no wave64], heap_window_out_of_memory_falls_back_to_the_switch_form [no heap windows])

Not tested

  • Retail title execution via scripts/smoke.ps1 (test-only PR, no retail game files on this machine).

AI use

  • Antigravity (Gemini 4 Neon) wrote the integration test cases and commit message; human reviewed.
<!-- greyfinch-sync:ivall/xcl:issue:6588424045 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612). Originally posted by [OtavioTadeu](https://github.com/OtavioTadeu) on 2026-11-24T18:14:32Z. --- **What is in it** - Add host D3D12 parity tests for `ID3D12Device::CreateQueryHeap` (slot 39) and `ID3D12Device::CreateCommandSignature` (slot 41), Part of #480: - Compares `OCCLUSION`, `TIMESTAMP`, `PIPELINE_STATISTICS`, and `SO_STATISTICS` query heaps, invalid descriptors, and unknown console IID fallback (`ID3D12QueryHeap`). - Compares `DRAW`, `DRAW_INDEXED`, and `DISPATCH` command signatures, invalid strides/counts/node masks, and unknown console IID fallback (`ID3D12CommandSignature`). **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1088, Turing wave32), AMD Ryzen 5 5600G, Windows 11 26200, rustc 1.100.0, debug - `cargo test -p xcl --test d3d12_query_and_command_signature -- --test-threads=1`: 2 passed, 0 failed - `cargo test --workspace -- --test-threads=4`: 778 passed, 0 failed, 41 ignored (SKIPPED GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` [no wave64], `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` [no wave64], `heap_window_out_of_memory_falls_back_to_the_switch_form` [no heap windows]) **Not tested** - Retail title execution via `scripts/smoke.ps1` (test-only PR, no retail game files on this machine). **AI use** - Antigravity (Gemini 4 Neon) wrote the integration test cases and commit message; human reviewed.
gut0to commented 2026-11-24 19:06:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:20:09Z.

Review: COMMENTED


The two targeted integration tests are useful, but CONTRIBUTING.md also requires the full workspace test suite to run on a GPU, with pass/fail/ignored and skipped-test details in Tested. This PR currently reports only the targeted test command. Please add the full-suite GPU result before merge; if it could not be run, say so under Not tested. The test-only exemption waives the retail-title smoke run, not the suite. AI-assisted review; I checked this against the contribution guide.

<!-- greyfinch-sync:ivall/xcl:review:6044935178 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#pullrequestreview-6044935178). Originally posted by [gut0to](https://github.com/gut0to) on 2026-11-24T18:20:09Z. **Review:** COMMENTED --- The two targeted integration tests are useful, but CONTRIBUTING.md also requires the full workspace test suite to run on a GPU, with pass/fail/ignored and skipped-test details in Tested. This PR currently reports only the targeted test command. Please add the full-suite GPU result before merge; if it could not be run, say so under Not tested. The test-only exemption waives the retail-title smoke run, not the suite. AI-assisted review; I checked this against the contribution guide.
futurepro62 commented 2026-11-24 19:07:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T19:00:23Z.


Full-suite GPU run (NVIDIA and AMD), which the review above asks for. Tested exact head 7807d58 (on its base 9e3831e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form: 777 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: create_query_heap_matches_host_driver, create_command_signature_matches_host_driver.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 778 passed, 0 failed, 41 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • heap_window_out_of_memory_falls_back_to_the_switch_form was skipped with --skip. It fails on main 9e3831e too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (XCL_HEAP_WINDOWS unset). Reported as #1651.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7141457756 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7141457756). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T19:00:23Z. --- Full-suite GPU run (NVIDIA and AMD), which the review above asks for. Tested exact head `7807d58` (on its base `9e3831e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form`: **777 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `create_query_heap_matches_host_driver`, `create_command_signature_matches_host_driver`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **778 passed, 0 failed, 41 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `heap_window_out_of_memory_falls_back_to_the_switch_form` was skipped with `--skip`. It fails on main `9e3831e` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns every skip except "no wave64" into a failure, including this test's opt-in "no heap windows" skip (`XCL_HEAP_WINDOWS` unset). Reported as #1651. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
JoaoPauluu commented 2026-11-24 19:07:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T19:04:36Z.


With vkd3d-proton as the host, both tests fail here: on the host's answers, not on XCL's.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 (4522cc1a) from #257 as the host D3D12. Release, cross-built for x86_64-pc-windows-gnu. 7807d58 as it is (based on 9e3831e), no uncommitted changes. d3d12_query_and_command_signature runs under Wine, one test per process (--exact).
  • create_command_signature_matches_host_driver: fails at line 126, expected failure: hook=0x0, host=0x0.
  • create_query_heap_matches_host_driver: fails at line 67, expected failure for … Count: 0 …: hook=0x0, host=0x0.
  • To see every case, I temporarily replaced the failing assertion with a print of both HRESULTs, ran it once, and reverted it (the pass / fail results above are from the unchanged head). XCL's hook returns the host's HRESULT in every case:
case hook host
command signature, stride 4 0x80070057 0x80070057
command signature, 0 arguments 0x80070057 0x80070057
command signature, NodeMask 0x10 0x0 0x0
query heap, TIMESTAMP, Count 0 0x0 0x0
query heap, Type 999 0x80070057 0x80070057
query heap, TIMESTAMP, NodeMask 0x10 0x0 0x0
  • So vkd3d-proton accepts NodeMask 0x10 and a zero-count query heap, where the tests expect a refusal. Comparing the hook with the host there, as the valid cases do, would pass on both.

Not tested

  • native Windows; the rest of the suite on this head.

AI use

  • Claude Code (Claude Opus 5.5) built the head, ran the tests, made and reverted the diagnostic prints, and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7141561908 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7141561908). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T19:04:36Z. --- With vkd3d-proton as the host, both tests fail here: on the host's answers, not on XCL's. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 (`4522cc1a`) from #257 as the host D3D12. Release, cross-built for `x86_64-pc-windows-gnu`. `7807d58` as it is (based on `9e3831e`), no uncommitted changes. `d3d12_query_and_command_signature` runs under Wine, one test per process (`--exact`). - `create_command_signature_matches_host_driver`: **fails** at line 126, `expected failure: hook=0x0, host=0x0`. - `create_query_heap_matches_host_driver`: **fails** at line 67, `expected failure for … Count: 0 …: hook=0x0, host=0x0`. - To see every case, I temporarily replaced the failing assertion with a print of both HRESULTs, ran it once, and reverted it (the pass / fail results above are from the unchanged head). XCL's hook returns the host's HRESULT in every case: | case | hook | host | |---|---|---| | command signature, stride 4 | `0x80070057` | `0x80070057` | | command signature, 0 arguments | `0x80070057` | `0x80070057` | | command signature, `NodeMask 0x10` | `0x0` | `0x0` | | query heap, `TIMESTAMP`, `Count 0` | `0x0` | `0x0` | | query heap, `Type 999` | `0x80070057` | `0x80070057` | | query heap, `TIMESTAMP`, `NodeMask 0x10` | `0x0` | `0x0` | - So vkd3d-proton accepts `NodeMask 0x10` and a zero-count query heap, where the tests expect a refusal. Comparing the hook with the host there, as the valid cases do, would pass on both. **Not tested** - native Windows; the rest of the suite on this head. **AI use** - Claude Code (Claude Opus 5.5) built the head, ran the tests, made and reverted the diagnostic prints, and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
OtavioTadeu commented 2026-11-24 21:08:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by OtavioTadeu on 2026-11-24T19:08:54Z.


Updated Tested in the PR description with the full cargo test --workspace -- --test-threads=4 GPU result (778 passed, 0 failed, 41 ignored, plus the 3 hardware-skipped GPU tests on GTX 1660 SUPER). Thank you for the review!

<!-- greyfinch-sync:ivall/xcl:comment:7141668748 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7141668748). Originally posted by [OtavioTadeu](https://github.com/OtavioTadeu) on 2026-11-24T19:08:54Z. --- Updated **Tested** in the PR description with the full `cargo test --workspace -- --test-threads=4` GPU result (`778 passed, 0 failed, 41 ignored`, plus the 3 hardware-skipped GPU tests on GTX 1660 SUPER). Thank you for the review!
DavidM1911 commented 2026-11-24 21:09:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T20:30:21Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7143648557 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7143648557). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T20:30:21Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. Thanks!
JJAutoCompare commented 2026-11-25 06:05:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:08:55Z.


XCL PR #1612 focused verification

Head 7807d58e899ef01de2f8884e43ab6e3fc4babd2a, detached and clean. The diff adds only crates/xcl/tests/d3d12_query_and_command_signature.rs.

Tested

  • STOR-WINLAB, Windows x64 build 10.0.26200.9974, AMD64 Family 23 Model 113 Stepping 0, Intel Arc A770 (16,258 MiB reported by XCL), Intel driver 32.0.101.9175, DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386 2026-11-09), target x86_64-pc-windows-msvc. Unoptimized profiles with debug info and incremental compilation disabled.
  • Outside the Arc mutex, cargo build --workspace and cargo test --workspace --no-run both succeeded.
  • Inside Invoke-ArcTest.ps1 -Test { ... }, with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1, ran cmd.exe /d /c "$fixture 2>&1" | Tee-Object -FilePath $focusedLog. The fixture was d3d12_query_and_command_signature-510e9924b1ff65d4.exe from the workspace test build. XCL logged the real A770 backend. pr1612-focused.log recorded 2 passed, 0 failed, 0 ignored, 0 explicit SKIPPED lines.
  • create_query_heap_matches_host_driver confirmed the hook, matching success HRESULTs and non-null objects for occlusion, timestamp, pipeline statistics, and stream-output statistics heaps. Zero count, invalid type, and invalid node mask failed with null outputs on both paths. The host returned E_NOINTERFACE for the unknown console IID, and XCL created a query heap via its fallback.
  • create_command_signature_matches_host_driver confirmed the hook, matching success HRESULTs and non-null objects for draw, indexed draw, and dispatch signatures. Undersized stride, zero arguments, and invalid node mask failed with null outputs on both paths. The host returned E_NOINTERFACE for the unknown console IID, and XCL created a command signature via its fallback.

Not tested

Only the focused Arc A770 integration target ran, alongside full workspace compilation. The full GPU workspace suite was omitted.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1612-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153494069 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7153494069). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:08:55Z. --- # XCL PR #1612 focused verification Head `7807d58e899ef01de2f8884e43ab6e3fc4babd2a`, detached and clean. The diff adds only `crates/xcl/tests/d3d12_query_and_command_signature.rs`. **Tested** - STOR-WINLAB, Windows x64 build `10.0.26200.9974`, AMD64 Family 23 Model 113 Stepping 0, Intel Arc A770 (16,258 MiB reported by XCL), Intel driver `32.0.101.9175`, DXC `1.9.2609.5`, and rustc `1.100.0 (0ef1bc386 2026-11-09)`, target `x86_64-pc-windows-msvc`. Unoptimized profiles with debug info and incremental compilation disabled. - Outside the Arc mutex, `cargo build --workspace` and `cargo test --workspace --no-run` both succeeded. - Inside `Invoke-ArcTest.ps1 -Test { ... }`, with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`, ran `cmd.exe /d /c "$fixture 2>&1" | Tee-Object -FilePath $focusedLog`. The fixture was `d3d12_query_and_command_signature-510e9924b1ff65d4.exe` from the workspace test build. XCL logged the real A770 backend. `pr1612-focused.log` recorded 2 passed, 0 failed, 0 ignored, 0 explicit SKIPPED lines. - `create_query_heap_matches_host_driver` confirmed the hook, matching success HRESULTs and non-null objects for occlusion, timestamp, pipeline statistics, and stream-output statistics heaps. Zero count, invalid type, and invalid node mask failed with null outputs on both paths. The host returned `E_NOINTERFACE` for the unknown console IID, and XCL created a query heap via its fallback. - `create_command_signature_matches_host_driver` confirmed the hook, matching success HRESULTs and non-null objects for draw, indexed draw, and dispatch signatures. Undersized stride, zero arguments, and invalid node mask failed with null outputs on both paths. The host returned `E_NOINTERFACE` for the unknown console IID, and XCL created a command signature via its fallback. **Not tested** Only the focused Arc A770 integration target ran, alongside full workspace compilation. The full GPU workspace suite was omitted. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1612-focused.log` and published.
upstream-sync closed this pull request 2026-11-25 20:07:09 +00:00
ivall commented 2026-11-25 20:08:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T19:20:51Z.


Merging: query heaps and command signatures against the host driver.

Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, main 2898511 with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (fuzz_validate_and_gpu_1 and _3, which fail the same way on main); hle::d3d12x on 16 threads 5 times, no failure. This file alone 8 times: no failure.

AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7172169110 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7172169110). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:20:51Z. --- Merging: query heaps and command signatures against the host driver. Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug, `main` `2898511` with 27 test PRs merged locally, this one included: the whole suite 3 times, 1419 passed, 2 failed, 46 ignored each time (`fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main`); `hle::d3d12x` on 16 threads 5 times, no failure. This file alone 8 times: no failure. AI use: Claude Code (Claude Opus 5.5) reviewed and tested this and wrote the comment on the maintainer's behalf.
ivall commented 2026-11-25 20:08:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T19:32:27Z.


I merged this without acting on the Wine report above, sorry. The report is right: XCL answers as vkd3d-proton does, and the test required a refusal. #2466 compares the two instead and keeps the required refusal on Windows.

AI use: Claude Code (Claude Opus 5.5) wrote this on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7172438624 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1612#issuecomment-7172438624). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:32:27Z. --- I merged this without acting on the Wine report above, sorry. The report is right: XCL answers as vkd3d-proton does, and the test required a refusal. #2466 compares the two instead and keeps the required refusal on Windows. AI use: Claude Code (Claude Opus 5.5) wrote this on the maintainer's behalf.
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!1602
No description provided.