Tests: pin the generated D3D12 layout table invariants #1641

Manually merged
github merged 1 commit from gh-pr/1641/head into gh-pr/1641/base 2026-11-26 05:00:16 +00:00
Owner

@⁠amazedturnip on GitHub · 2026-11-24 18:33 UTC · original
amazedturnip:xcl/tests-d3d12-layout-table-and-chain-invariants-181008 → main · +133 −0 · 1 files · 1 commits · merged 2026-11-25 19:22 UTC

New static integration test crates/xcl/tests/d3d12_layout.rs (6 tests, 133 lines) pins the generated D3D12 interface table and its lookup helpers. It asserts unique names/IIDs, IUnknown vtable head, GUID round-trip through parse_guid/guid_string (with all-zero fallback for non-hex input), per-chain most-derived-first ordering with no non-versioned-sibling leakage, and slot()/find() consistency. No runtime code changes; negative control verified by duplicating an IID and observing the table_shape_and_unique_ids failure.

What is in it

  • crates/xcl/tests/d3d12_layout.rs: new integration test suite (6 tests) covering the generated d3d12_layout.rs table and the layout.rs helpers: unique interface names and IIDs with non-empty parent and method lists (IUnknown head QueryInterface/AddRef/Release), guid_string(parse_guid(iid)) == iid for every entry plus canonical format and all-zero fallback for non-hex text, chain(ID3D12Device)/chain(ID3D12CommandQueue) returning the base plus every numbered descendant most-derived-first with no non-versioned sibling (ID3D12DeviceChild/Factory/Configuration), slot() for known methods (CreateCommandQueue=8, CreateCommittedResource=27, CreateFence=36, ExecuteCommandLists=10) and None for unknown/misspelled/empty methods, and find/slot/chain consistency (find returns the table entry for every name, every numbered device version listed by chain(ID3D12Device) and listed by its own chain, inherited slot stable across parent and child).

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=1 — 782 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 1 (no heap windows))
  • Verification / negative control: cargo test -p xcl --test d3d12_layout with a duplicated IID in the generated table -> table_shape_and_unique_ids FAILED ('duplicate iid 189819f1-1db6-4b57-be54-1821339b85f7 (ID3D12Device1)'); git checkout -- crates/xcl/src/hle/d3d12_layout.rs restored the file to the committed state. Tests pass 3x in a row on the clean tree.

Not tested

  • Retail Xbox Series X|S title / real D3D12.X device boot (not available on this host; test is static and GPU-free by design)
  • NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64)

AI use

  • Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
**@⁠amazedturnip** on GitHub · 2026-11-24 18:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/1641) `amazedturnip:xcl/tests-d3d12-layout-table-and-chain-invariants-181008` → `main` · +133 −0 · 1 files · 1 commits · merged 2026-11-25 19:22 UTC New static integration test crates/xcl/tests/d3d12_layout.rs (6 tests, 133 lines) pins the generated D3D12 interface table and its lookup helpers. It asserts unique names/IIDs, IUnknown vtable head, GUID round-trip through parse_guid/guid_string (with all-zero fallback for non-hex input), per-chain most-derived-first ordering with no non-versioned-sibling leakage, and slot()/find() consistency. No runtime code changes; negative control verified by duplicating an IID and observing the table_shape_and_unique_ids failure. **What is in it** - `crates/xcl/tests/d3d12_layout.rs`: new integration test suite (6 tests) covering the generated d3d12_layout.rs table and the layout.rs helpers: unique interface names and IIDs with non-empty parent and method lists (IUnknown head QueryInterface/AddRef/Release), guid_string(parse_guid(iid)) == iid for every entry plus canonical format and all-zero fallback for non-hex text, chain(ID3D12Device)/chain(ID3D12CommandQueue) returning the base plus every numbered descendant most-derived-first with no non-versioned sibling (ID3D12DeviceChild/Factory/Configuration), slot() for known methods (CreateCommandQueue=8, CreateCommittedResource=27, CreateFence=36, ExecuteCommandLists=10) and None for unknown/misspelled/empty methods, and find/slot/chain consistency (find returns the table entry for every name, every numbered device version listed by chain(ID3D12Device) and listed by its own chain, inherited slot stable across parent and child). **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=1` — 782 passed, 0 failed, 41 ignored (SKIPPED GPU tests: 1 (no heap windows)) - Verification / negative control: cargo test -p xcl --test d3d12_layout with a duplicated IID in the generated table -> table_shape_and_unique_ids FAILED ('duplicate iid 189819f1-1db6-4b57-be54-1821339b85f7 (ID3D12Device1)'); git checkout -- crates/xcl/src/hle/d3d12_layout.rs restored the file to the committed state. Tests pass 3x in a row on the clean tree. **Not tested** - Retail Xbox Series X|S title / real D3D12.X device boot (not available on this host; test is static and GPU-free by design) - NVIDIA wave32 GPU (not run in this pass; verified on AMD Radeon native wave64) **AI use** - Local AI (thinkingmachines_inkling-2-mini) assisted with diagnosis, implementation, tests, review, and description; all tests executed locally on AMD Radeon (native wave64).
Add an integration test suite over the generated d3d12_layout.rs table and its layout.rs helpers: unique names/iids, non-empty parent/method lists with the IUnknown head, IID round-trip through parse_guid/guid_string, chain() most-derived-first ordering with no non-versioned siblings, slot() for known methods and rejected for unknown/misspelled, and find/slot/chain consistency. A generator regression (bad IID, duplicate slot, chain leaking a non-versioned sibling) now fails in CI instead of silently misaligning D3D12.X slots.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:00:15 +00:00
github manually merged commit e6d7485354 into gh-pr/1641/base 2026-11-26 05:00:16 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 20:56 UTC · original

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

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

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 20:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/1641#issuecomment-7144257566) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. Thanks!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:55 UTC · original

XCL PR #1641 — Intel Arc A770 verification

Head e6d7485354020423b1b638f47bd66866a75fe989, tested from a clean detached checkout. STOR-WINLAB ran Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, and Intel Arc A770 with driver 32.0.101.9175. DXC was 1.9.2609.5 and rustc was 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Builds used unoptimized dev/test profiles with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the Arc mutex.
  • cargo test -p xcl --test d3d12_layout with XCL_ADAPTER=NONE_CPU_ONLY outside the mutex reported 6 passed, 0 failed, 0 ignored, 0 explicit skips. The PR adds only crates/xcl/tests/d3d12_layout.rs. Its tests check unique interface names and IIDs, parent and method list shape and the IUnknown prefix, GUID round-trips and malformed inputs, device and queue chain membership and order, known and unknown slots, and inherited slot consistency.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Cargo exited 101. All 21 result lines in pr1641-suite.log (20 test binaries and one doctest target) sum to 846 passed, 18 failed, and 42 ignored. The six layout tests also passed in this run.

Workspace failures and skips

  • The library had 17 GPU failures. Thirteen reported CreateComputePipelineState error 0x80070057. Four failed expectations for FMA overflow, implicit texture LOD, f16 high-half preservation, and pixel-shader wave reductions.
  • One e2e test failed because the test title's RSSetDepthBiasX check drew blue where it expected green.
  • Six lines began with SKIPPED . Two cited wave64, two cited an unavailable D3D12 debug layer, one cited tiled tier below 2, and one cited unavailable heap windows. These add no coverage.

Not tested

Retail sample paths requiring XCL_SAMPLE_* data, other GPUs, and a matched main run. The origin of the workspace failures remains undetermined.

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 pr1641-suite.log and published.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1641#issuecomment-7153290603) # XCL PR #1641 — Intel Arc A770 verification Head `e6d7485354020423b1b638f47bd66866a75fe989`, tested from a clean detached checkout. STOR-WINLAB ran Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, and Intel Arc A770 with driver 32.0.101.9175. DXC was 1.9.2609.5 and rustc was 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Builds used unoptimized dev/test profiles with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the Arc mutex. - `cargo test -p xcl --test d3d12_layout` with `XCL_ADAPTER=NONE_CPU_ONLY` outside the mutex reported 6 passed, 0 failed, 0 ignored, 0 explicit skips. The PR adds only `crates/xcl/tests/d3d12_layout.rs`. Its tests check unique interface names and IIDs, parent and method list shape and the IUnknown prefix, GUID round-trips and malformed inputs, device and queue chain membership and order, known and unknown slots, and inherited slot consistency. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Cargo exited 101. All 21 result lines in `pr1641-suite.log` (20 test binaries and one doctest target) sum to 846 passed, 18 failed, and 42 ignored. The six layout tests also passed in this run. **Workspace failures and skips** - The library had 17 GPU failures. Thirteen reported `CreateComputePipelineState` error `0x80070057`. Four failed expectations for FMA overflow, implicit texture LOD, f16 high-half preservation, and pixel-shader wave reductions. - One e2e test failed because the test title's `RSSetDepthBiasX` check drew blue where it expected green. - Six lines began with `SKIPPED `. Two cited wave64, two cited an unavailable D3D12 debug layer, one cited tiled tier below 2, and one cited unavailable heap windows. These add no coverage. **Not tested** Retail sample paths requiring `XCL_SAMPLE_*` data, other GPUs, and a matched main run. The origin of the workspace failures remains undetermined. **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 `pr1641-suite.log` and published.
Author
Owner

@⁠ivall on GitHub · 2026-11-25 19:22 UTC · original

Merging: invariants of the generated layout table.

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** on GitHub · 2026-11-25 19:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1641#issuecomment-7172202274) Merging: invariants of the generated layout table. 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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.