Tests: pin the generated D3D12 layout table invariants #1631

Merged
amazedturnip merged 1 commit from upstream-pr/1641 into main 2026-11-25 19:22:18 +00:00
amazedturnip commented 2026-11-24 18:33:14 +00:00 (Migrated from github.com)

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


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).
<!-- greyfinch-sync:ivall/xcl:issue:6588744280 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1641). Originally posted by [amazedturnip](https://github.com/amazedturnip) on 2026-11-24T18:33:14Z. --- 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).
DavidM1911 commented 2026-11-24 21:09:47 +00:00 (Migrated from github.com)

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


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:7144257566 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1641#issuecomment-7144257566). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T20:56:19Z. --- 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 05:08:28 +00:00 (Migrated from github.com)

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


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.

<!-- greyfinch-sync:ivall/xcl:comment:7153290603 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1641#issuecomment-7153290603). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:55:43Z. --- # 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.
upstream-sync closed this pull request 2026-11-25 20:07:12 +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:22:20Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7172202274 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1641#issuecomment-7172202274). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T19:22:20Z. --- 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.
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!1631
No description provided.