Tests: compare CreateCommittedResource against the host D3D12 driver #1568

Merged
OtavioTadeu merged 1 commit from upstream-pr/1578 into main 2026-11-25 19:21:14 +00:00
OtavioTadeu commented 2026-11-24 17:52:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by OtavioTadeu on 2026-11-24T17:52:52Z.


Adds host-driver parity integration tests for ID3D12Device::CreateCommittedResource (slot 27), with no game data or console DLLs required. Part of #480.

What is in it

  • crates/xcl/tests/d3d12_create_committed_resource.rs: compares CreateCommittedResource HRESULTs, GetDesc(), buffer GPU VAs, invalid descriptor handling, and unknown console IID fallback against the unhooked PC driver on the same adapter.

Tested

  • NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1088), AMD Ryzen 5 5600G, Windows 11 build 26200, DXC 1.9.2602.17, rustc 1.100.0 (stable-x86_64-pc-windows-msvc), debug build

  • cargo test -p xcl --test d3d12_create_committed_resource -- --test-threads=1: 2 passed, 0 failed, 0 ignored

  • 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])

Regression run
Not required (test-only change under crates/xcl/tests/; no runtime files modified).

Not tested

  • AMD and Intel GPUs, Linux/Wine, and retail game titles (test-only PR)

AI use

  • Antigravity with Gemini 4 Neon: wrote the test file and PR description; reviewed and run locally by author.
<!-- greyfinch-sync:ivall/xcl:issue:6588038454 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578). Originally posted by [OtavioTadeu](https://github.com/OtavioTadeu) on 2026-11-24T17:52:52Z. --- Adds host-driver parity integration tests for `ID3D12Device::CreateCommittedResource` (slot 27), with no game data or console DLLs required. Part of #480. **What is in it** - `crates/xcl/tests/d3d12_create_committed_resource.rs`: compares `CreateCommittedResource` HRESULTs, `GetDesc()`, buffer GPU VAs, invalid descriptor handling, and unknown console IID fallback against the unhooked PC driver on the same adapter. **Tested** - NVIDIA GeForce GTX 1660 SUPER (driver 32.0.16.1088), AMD Ryzen 5 5600G, Windows 11 build 26200, DXC 1.9.2602.17, rustc 1.100.0 (`stable-x86_64-pc-windows-msvc`), debug build - `cargo test -p xcl --test d3d12_create_committed_resource -- --test-threads=1`: 2 passed, 0 failed, 0 ignored - `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]) **Regression run** Not required (test-only change under `crates/xcl/tests/`; no runtime files modified). **Not tested** - AMD and Intel GPUs, Linux/Wine, and retail game titles (test-only PR) **AI use** - Antigravity with Gemini 4 Neon: wrote the test file and PR description; reviewed and run locally by author.
futurepro62 commented 2026-11-24 19:07:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T18:52:39Z.


Full-suite run, since this PR has no test report yet. Tested exact head d32f5a2 (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: committed_resources_match_host_driver_desc_and_status, committed_resource_unknown_console_iid_falls_back_to_pc_resource.
  • 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:7141276833 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578#issuecomment-7141276833). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T18:52:39Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `d32f5a2` (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: `committed_resources_match_host_driver_desc_and_status`, `committed_resource_unknown_console_iid_falls_back_to_pc_resource`. - 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:40Z.


With vkd3d-proton as the host, one of the two tests fails here: on the host's answer, 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. d32f5a2 as it is (based on 9e3831e), no uncommitted changes. d3d12_create_committed_resource runs under Wine, one test per process (--exact).
  • committed_resource_unknown_console_iid_falls_back_to_pc_resource: ok.
  • committed_resources_match_host_driver_desc_and_status: fails at line 170, zero-width buffer: expected host failure, got 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). Both invalid descriptors succeed on vkd3d-proton, and the hook returns the same:
    • zero-width buffer: host 0x0, hook 0x0
    • zero-height 2D texture: host 0x0, hook 0x0
  • This is the same vkd3d-proton behaviour as in #1132 (GetResourceAllocationInfo gives size 0 for a zero-width buffer).

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:7141563438 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578#issuecomment-7141563438). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T19:04:40Z. --- With vkd3d-proton as the host, one of the two tests fails here: on the host's answer, 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`. `d32f5a2` as it is (based on `9e3831e`), no uncommitted changes. `d3d12_create_committed_resource` runs under Wine, one test per process (`--exact`). - `committed_resource_unknown_console_iid_falls_back_to_pc_resource`: ok. - `committed_resources_match_host_driver_desc_and_status`: **fails** at line 170, `zero-width buffer: expected host failure, got 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). Both invalid descriptors succeed on vkd3d-proton, and the hook returns the same: - zero-width buffer: host `0x0`, hook `0x0` - zero-height 2D texture: host `0x0`, hook `0x0` - This is the same vkd3d-proton behaviour as in #1132 (`GetResourceAllocationInfo` gives size 0 for a zero-width buffer). **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.
DavidM1911 commented 2026-11-24 21:09:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:51:41Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7142692053 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578#issuecomment-7142692053). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T19:51:41Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 06:05:45 +00:00 (Migrated from github.com)

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


Empirical test report (d32f5a2a)

Hardware / environment

  • Windows 11 Enterprise Evaluation x64 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB, driver 32.0.101.9175.
  • rustc --version returned rustc 1.100.0 (0ef1bc386 2026-11-09).
  • dxc.exe --version returned dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47).
  • Commit d32f5a2afb82dce7ba377a5f84d49772c785329f.

Commands and results

  • cargo test --workspace --no-run exited 0 in the unoptimized test profile. It compiled the workspace test targets outside the Arc lock.
  • The command below ran the Cargo-built integration test binary from crates/xcl under the Arc lock. It exited 0 in 2.42 s of harness time with 2 passed / 0 failed / 0 ignored / 0 skipped.
$pr1578Fixture = Join-Path $env:CARGO_TARGET_DIR 'debug\build\xcl\29ff96c0d616ff81\out\d3d12_create_committed_resource-29ff96c0d616ff81.exe'
& 'L:\XclTooling\Invoke-ArcTest.ps1' -Test {
    $env:XCL_ADAPTER = 'A770'
    $env:RUST_TEST_NOCAPTURE = '1'
    & $pr1578Fixture --test-threads=1
} *>&1 | ForEach-Object { $_.ToString() } | Tee-Object -FilePath (Join-Path $env:TEMP 'pr1578-focused.log')

Observed behavior

XCL reported the real D3D12 backend on Intel Arc A770. Both fixture tests passed. XCL and the host driver produced matching checked descriptor fields for eight valid buffer and texture cases, and both rejected the two invalid descriptors. The host returned E_NOINTERFACE for the unknown console IID and XCL successfully fell back to ID3D12Resource.

Not tested

Verification covered workspace test compilation and the focused GPU fixture. The full GPU workspace suite and game smoke runs were omitted.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1578-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153670926 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578#issuecomment-7153670926). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:20:05Z. --- ### Empirical test report (d32f5a2a) **Hardware / environment** - Windows 11 Enterprise Evaluation x64 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB, driver 32.0.101.9175. - `rustc --version` returned `rustc 1.100.0 (0ef1bc386 2026-11-09)`. - `dxc.exe --version` returned `dxcompiler.dll: 1.9(5512-01b62ad4)(1.9.2609.5) - 1.9.2609.5 (01b62ad47)`. - Commit `d32f5a2afb82dce7ba377a5f84d49772c785329f`. **Commands and results** - `cargo test --workspace --no-run` exited 0 in the unoptimized test profile. It compiled the workspace test targets outside the Arc lock. - The command below ran the Cargo-built integration test binary from `crates/xcl` under the Arc lock. It exited 0 in 2.42 s of harness time with **2 passed / 0 failed / 0 ignored / 0 skipped**. ```powershell $pr1578Fixture = Join-Path $env:CARGO_TARGET_DIR 'debug\build\xcl\29ff96c0d616ff81\out\d3d12_create_committed_resource-29ff96c0d616ff81.exe' & 'L:\XclTooling\Invoke-ArcTest.ps1' -Test { $env:XCL_ADAPTER = 'A770' $env:RUST_TEST_NOCAPTURE = '1' & $pr1578Fixture --test-threads=1 } *>&1 | ForEach-Object { $_.ToString() } | Tee-Object -FilePath (Join-Path $env:TEMP 'pr1578-focused.log') ``` **Observed behavior** XCL reported the real D3D12 backend on Intel Arc A770. Both fixture tests passed. XCL and the host driver produced matching checked descriptor fields for eight valid buffer and texture cases, and both rejected the two invalid descriptors. The host returned `E_NOINTERFACE` for the unknown console IID and XCL successfully fell back to `ID3D12Resource`. **Not tested** Verification covered workspace test compilation and the focused GPU fixture. The full GPU workspace suite and game smoke runs were omitted. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1578-focused.log` and published.
upstream-sync closed this pull request 2026-11-25 20:07:03 +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:21:17Z.


Merging: CreateCommittedResource 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:7172178825 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578#issuecomment-7172178825). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:21:17Z. --- Merging: `CreateCommittedResource` 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:29Z.


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:7172439136 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1578#issuecomment-7172439136). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:32:29Z. --- 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!1568
No description provided.