Tests: verify D3D12.X null device, resource, fence, and PSO stream #2374

Open
github-bot wants to merge 1 commit from github-bot/gh-2374 into main AGit
Owner

@⁠amazedturnip on GitHub · 2026-11-25 17:09 UTC · original
amazedturnip:xcl/tests-d3d12x-null-device-and-pso-stream-contract-015603 → main · +338 −0 · 1 files · 1 commits · open

Adds integration contract tests for the D3D12.X null backend (crates/xcl/src/hle/d3d12x/null.rs) in crates/xcl/tests/d3d12x_null_contract.rs. Covers subobject_payload layouts and capture_*_desc pointer/stream guards, exported device/blob/root-signature entry points, device queries and feature support, and ID3D12Resource, ID3D12Fence, ID3D12DeviceChild, and COM refcounting vtable contracts.

What is in it

  • crates/xcl/tests/d3d12x_null_contract.rs: add contract tests for subobject_payload (0..=28 and unknown types), capture_graphics_desc/capture_compute_desc/capture_stream_desc guards, D3D12XboxCreateDevice/D3D10CreateBlob/debug/root-sig entry points, device queries (GetNodeCount, GetAdapterLuid, GetCustomHeapProperties, GetResourceAllocationInfo, GetCopyableFootprints, CheckFeatureSupport OPTIONS5), resource Map/GPU VA/GetDesc/GetHeapProperties, Fence SetEventOnCompletion/Signal, DeviceChild::GetDevice, and COM refcounting.

Tested

  • Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build
  • AMD (AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64), XCL_ADAPTER=radeon): cargo test --workspace -- --test-threads=2 — 1218 passed, 2 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier)
  • Verification / negative control: new test suite — verified 3x deterministic

Not tested

  • retail Xbox Series X|S title (not available on this host)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Antigravity CLI (Gemini 4 Hydrogen (Medium)) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
**@⁠amazedturnip** on GitHub · 2026-11-25 17:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2374) `amazedturnip:xcl/tests-d3d12x-null-device-and-pso-stream-contract-015603` → `main` · +338 −0 · 1 files · 1 commits · open Adds integration contract tests for the D3D12.X null backend (`crates/xcl/src/hle/d3d12x/null.rs`) in `crates/xcl/tests/d3d12x_null_contract.rs`. Covers `subobject_payload` layouts and `capture_*_desc` pointer/stream guards, exported device/blob/root-signature entry points, device queries and feature support, and `ID3D12Resource`, `ID3D12Fence`, `ID3D12DeviceChild`, and COM refcounting vtable contracts. **What is in it** - `crates/xcl/tests/d3d12x_null_contract.rs`: add contract tests for `subobject_payload` (0..=28 and unknown types), `capture_graphics_desc`/`capture_compute_desc`/`capture_stream_desc` guards, `D3D12XboxCreateDevice`/`D3D10CreateBlob`/debug/root-sig entry points, device queries (`GetNodeCount`, `GetAdapterLuid`, `GetCustomHeapProperties`, `GetResourceAllocationInfo`, `GetCopyableFootprints`, `CheckFeatureSupport` OPTIONS5), resource `Map`/GPU VA/`GetDesc`/`GetHeapProperties`, `Fence` `SetEventOnCompletion`/`Signal`, `DeviceChild::GetDevice`, and COM refcounting. **Tested** - Hardware / OS / Rust: AMD Ryzen 7 9800X3D 8-Core Processor, Windows 11 Pro 10.0.26100 (Build 26100), rustc 1.94.1 (e408947bf 2026-03-25), stable-x86_64-pc-windows-msvc, debug build - AMD (`AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64)`, `XCL_ADAPTER=radeon`): `cargo test --workspace -- --test-threads=2` — 1218 passed, 2 failed, 26 ignored (SKIPPED GPU tests: 1 (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 1 (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), 1 (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)); pre-existing upstream/main failures excluded: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier) - Verification / negative control: new test suite — verified 3x deterministic **Not tested** - retail Xbox Series X|S title (not available on this host) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Antigravity CLI (Gemini 4 Hydrogen (Medium)) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
Add integration contract tests for crates/xcl/src/hle/d3d12x/null.rs covering subobject_payload layouts (0..=28 and unknown types), capture_graphics_desc/capture_compute_desc/capture_stream_desc guards, D3D12XboxCreateDevice/D3D10CreateBlob/debug/root-sig entry points, device queries (GetNodeCount, GetAdapterLuid, GetCustomHeapProperties, GetResourceAllocationInfo, GetCopyableFootprints, CheckFeatureSupport OPTIONS5), resource Map/GPU VA/GetDesc/GetHeapProperties, Fence SetEventOnCompletion/Signal, DeviceChild GetDevice, and COM refcounting.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:29:23 +00:00
Author
Owner

@⁠throny on GitHub · 2026-11-25 17:58 UTC · original

Two contributors checked independently and found that #2006 solves the same problem in a different way: #1607, group D106. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 17:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/2374#issuecomment-7170265436) <!-- xcl-1607-hint:D106 --> Two contributors checked independently and found that #2006 solves the same problem in a different way: #1607, group D106. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

@⁠emirduran707 on GitHub · 2026-11-25 18:13 UTC · original

Independent AMD RDNA4 (native wave64) test report on exact head e017aa6e01c1751f8cf34ad587f39097f4b79fee (clean detached checkout, no local changes).

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1292 passed, 3 failed, 46 ignored; 8 SKIPPED (6 in lower_dxil::tests::{f16,f32}_programs_on_the_gpu refused by per-lane form; heap_window_out_of_memory_falls_back_to_the_switch_form; pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.
    • All 5 new integration tests in d3d12x_null_contract.rs passed (entry_points_and_blob_contract, device_queries_and_feature_support, subobject_payload_known_and_unknown_types, resource_fence_device_child_and_refcount, capture_desc_and_stream_guards).
    • The 3 failures are pre-existing on unmodified main 68a284a: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722) and fuzz_validate_and_gpu_3 (seed 1599) on this GPU, plus gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier (from 50a9fde / #2074).

Regression run (60 s retail-title smoke, XCL_NETWORK=0, release)

xcl-smoke v1
commit: e017aa6e01c1751f8cf34ad587f39097f4b79fee
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1622 (PresentX 1623)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13920 MB

(Matched main 68a284a baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)

Not tested

  • D3D12 debug layer; Intel GPUs.

AI use

  • Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
**@⁠emirduran707** on GitHub · 2026-11-25 18:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2374#issuecomment-7170613250) Independent AMD RDNA4 (native wave64) test report on exact head `e017aa6e01c1751f8cf34ad587f39097f4b79fee` (clean detached checkout, no local changes). **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, driver 32.0.31044.16), Ryzen 5 5600, 32 GB RAM, Windows 11 Pro 26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2602.17; tests debug, smoke release. - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: **1292 passed, 3 failed, 46 ignored; 8 SKIPPED** (6 in `lower_dxil::tests::{f16,f32}_programs_on_the_gpu` refused by per-lane form; `heap_window_out_of_memory_falls_back_to_the_switch_form`; `pso_measurement_compiles_an_exact_synthetic_record`). All native wave64 GPU tests ran and passed. - All 5 new integration tests in `d3d12x_null_contract.rs` passed (`entry_points_and_blob_contract`, `device_queries_and_feature_support`, `subobject_payload_known_and_unknown_types`, `resource_fence_device_child_and_refcount`, `capture_desc_and_stream_guards`). - The 3 failures are pre-existing on unmodified `main` `68a284a`: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722) and `fuzz_validate_and_gpu_3` (seed 1599) on this GPU, plus `gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` (from `50a9fde` / #2074). **Regression run** (60 s retail-title smoke, `XCL_NETWORK=0`, release) ``` xcl-smoke v1 commit: e017aa6e01c1751f8cf34ad587f39097f4b79fee gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1622 (PresentX 1623) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13920 MB ``` (Matched `main` `68a284a` baseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.) **Not tested** - D3D12 debug layer; Intel GPUs. **AI use** - Antigravity with Gemini 4 Neon ran the build, test suite, and smoke run and drafted this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 19:12 UTC · original

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

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1, 1219/1):
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  assertion failed: group barriers in the program (lower_dxil.rs:1155)

The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-25 19:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2374#issuecomment-7171956946) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure**, deterministic (also fails `--test-threads=1`, 1219/1): ``` gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier assertion failed: group barriers in the program (lower_dxil.rs:1155) ``` The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin
Author
Owner

@⁠amazedturnip on GitHub · 2026-11-25 19:14 UTC · original

CI failure was the stale base: this PR head predates upstream/main's #2420 fix (c828d8c) that corrects a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier to only count barriers after the entry whole-wave branch. Rebased this PR onto upstream/main (2898511); the test now passes locally (and the 5 new d3d12x_null_contract tests all pass). The one remaining local failure, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722), is pre-existing on unmodified main per the community report and is unrelated to this PR. On the D106 hint from #1607: this PR adds an integration test file (crates/xcl/tests/d3d12x_null_contract.rs) covering the null backend, device queries, resources, fences, refcounting and stream guards; #2006 pins subobject_payload sizes/alignment in null.rs #[cfg(test)] tests. They overlap on the subobject_payload contract but cover different surfaces (one class-wide integration file vs. a focused table test), so both are needed rather than one replacing the other — happy to trim overlap if the other author prefers.

**@⁠amazedturnip** on GitHub · 2026-11-25 19:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2374#issuecomment-7172017574) CI failure was the stale base: this PR head predates upstream/main's #2420 fix (c828d8c) that corrects `a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier` to only count barriers after the entry whole-wave branch. Rebased this PR onto upstream/main (2898511); the test now passes locally (and the 5 new d3d12x_null_contract tests all pass). The one remaining local failure, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722), is pre-existing on unmodified main per the community report and is unrelated to this PR. On the D106 hint from #1607: this PR adds an integration test file (`crates/xcl/tests/d3d12x_null_contract.rs`) covering the null backend, device queries, resources, fences, refcounting and stream guards; #2006 pins `subobject_payload` sizes/alignment in `null.rs` `#[cfg(test)]` tests. They overlap on the `subobject_payload` contract but cover different surfaces (one class-wide integration file vs. a focused table test), so both are needed rather than one replacing the other — happy to trim overlap if the other author prefers.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2374/head:github-bot/gh-2374'
git switch 'github-bot/gh-2374'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2374'
git switch 'github-bot/gh-2374'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2374'
git switch 'github-bot/gh-2374'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2374'
git switch 'main'
git merge --squash 'github-bot/gh-2374'
git switch 'main'
git merge --ff-only 'github-bot/gh-2374'
git switch 'main'
git merge 'github-bot/gh-2374'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.