Tests: verify CreateHeap console fallback and IID retry against host driver #564
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!564
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/564/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@GustavoEllwanger on GitHub · 2026-11-24 01:51 UTC · original
GustavoEllwanger:test/d3d12-create-heap-fallback→main· +281 −0 · 1 files · 1 commits · merged 2026-11-25 19:20 UTCWhat is in it
Adds a standalone integration test (
crates/xcl/tests/d3d12_create_heap.rs) that verifies XCL'sCreateHeapvtable hook (d3d12x::real::dev_create_heap) andcreator!E_NOINTERFACEfallback directly against the host PC D3D12 driver on the same adapter, with no console files or game data required:ID3D12Device::CreateHeapentry point and adapter LUID befored3d12x::real::init()adopts the device vtable, then verifies both target the same adapter and that theCreateHeapvtable slot is intercepted by XCL.DEFAULT,UPLOAD,READBACK) succeed through both the host driver and XCL with matchingID3D12Heap::GetDesc()values.0x2/0x10/ high bits, unknown heap types outside1..=5, unaligned sizes, non-64 KiB alignments, and a combined console heap) succeed through XCL with normalized PC heap descriptors (known flags only,DEFAULTtype, 64 KiB rounded size, and 64 KiB / 4 MiB alignment).IIDfails on the raw host driver withE_NOINTERFACEand succeeds through XCL'screator!fallback returning a usableID3D12Heap.Tested
cargo test -p xcl --test d3d12_create_heap -- --nocapture: 3 passed, 0 failed, 0 ignored (RX 7600).XCL_ADAPTER=warp cargo test -p xcl --test d3d12_create_heap -- --nocapture: 3 passed, 0 failed, 0 ignored (WARP software renderer).cargo test --workspace -- --test-threads=4: 680 passed, 0 failed, 41 ignored, 0SKIPPED.Not tested
scripts/smoke.ps1not run; test-only PR with no changes undercrates/xcl/src/).AI use
Written and verified with Antigravity (Gemini 4 Carbon); all commands and tests were run locally on this machine's RX 7600 and WARP adapter.
@CryingLaughing on GitHub · 2026-11-24 01:56 UTC · original
The exact head
73cf88915070b7b7c239459068fcca91a9aae889passed the three CreateHeap driver comparisons on an RTX 4080. This adds native NVIDIA coverage to the RX 7600 and WARP runs.Tested
XCL_ADAPTER=4080,XCL_REQUIRE_GPU=1, and allXCL_SAMPLE_*variables unset. The fixture identified the RTX 4080 and checked the matching adapter LUIDs.cargo test -p xcl --test d3d12_create_heap --locked -j 4 -- --show-output --test-threads=1: 3 passed, 0 failed, 0 ignored, 0 capability skips.Not tested
AI use
@caua-an on GitHub · 2026-11-24 02:47 UTC · original
Tested: Clean head
73cf88915070b7b7c239459068fcca91a9aae889; Windows 11 Home build 26200, Core Ultra 9 185H, Rust 1.100.0 MSVC x64, debug build,XCL_REQUIRE_GPU=1. Intel Arc integrated graphics driver 32.0.101.8860.With
XCL_ADAPTER=intel,cargo test --offline --locked -p xcl --test d3d12_create_heap -- --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored, no skips. The fixture identified Intel Arc and verified matching adapter LUIDs for the host and XCL devices. PC heap parity, console descriptor normalization, and the unknown-IID fallback all passed.Not tested: Full workspace suite, release builds, retail titles, or game-data samples (
XCL_SAMPLE_*unset).AI use: OpenCode with GPT-6.2 Sol ran the tests and drafted this report.
@MesshM on GitHub · 2026-11-24 03:04 UTC · original
Test run of
73cf88915070b7b7c239459068fcca91a9aae889on AMD RDNA4. I merged it onto currentmaindd2ae9alocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 693 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 650 passed, 0 failed, 21 ignoredSKIPPED; the threed3d12_create_heaptests pass.Review: AMD RDNA4 next to the RX 7600, WARP, RTX 4080 and Intel runs above. The test captures the driver's own
CreateHeapbeforereal::init()adopts the vtable and compares both on one adapter; when there is no device it callsskip_test. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@GustavoEllwanger on GitHub · 2026-11-25 12:08 UTC · original
Thanks @JoaoPauluu for the Wine/vkd3d-proton report! Updated head \
c7b7ebe\ (rebased on \main\ \1a0bbe3): when a permissive host driver accepts a console heap desc directly, the test verifies XCL matches the host instead of requiring a host refusal, while still asserting that at least 4 of the 5 console cases (including \combined_console_heap) are refused by the host and normalized by XCL. Re-verified 3/3 passing on both NVIDIA RTX 5060 and AMD Radeon RDNA2.@JoaoPauluu on GitHub · 2026-11-24 03:49 UTC · original · edited 2026-11-25 12:51 UTC
Update,
c7b7ebe: all 3 tests pass under Wine with vkd3d-proton now, in 3 runs of the whole binary plus one run of each test on its own process, none skipped. Same setup as below, except a release build ofc7b7ebe(based on1a0bbe3, no uncommitted changes).console_heap_descs_refused_by_host_are_normalized_by_xcl: vkd3d-proton still acceptsconsole_flags_0xC2_and_high_bits(no refusal in the log). The other four cases are refused (0x80070057) and come back normalized, for exampleCreateHeap(0x10001 bytes, type 9, alignment 0x4000, flags 0x200000d2) refused (0x80070057); as type 1, alignment 0x0, flags 0xc0: 0x0. That matches the new "at least 4 of 5 refused,combined_console_heapincluded" check.pc_heap_descs_match_host_driverandunknown_console_iid_falls_back_to_pc_heap_interface: ok.Test report: #564 under Wine with vkd3d-proton as the host driver (Linux, NVIDIA)
The other runs are native Windows drivers (RX 7600, WARP, RTX 4080, Intel Arc, RX 9060 XT). Under Wine the "host driver" is vkd3d-proton, and there one case of
console_heap_descs_refused_by_host_are_normalized_by_xclfails: vkd3d-proton accepts the console flags0x100000C2, so the test'shr_host < 0precondition doesn't hold. The other two tests pass.Setup
experimental-11.0-20261112(wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton,DXVK_CONFIG="dxgi.hideNvidiaGpu = False"x86_64-pc-windows-gnu(mingw-w64-gcc 16.2.0), debug build of this PR's head73cf889Result (
d3d12_create_heaptest binary under Wine,--test-threads=1, three runs): 2 passed, 1 failed, every time.pc_heap_descs_match_host_driver: okunknown_console_iid_falls_back_to_pc_heap_interface: okconsole_heap_descs_refused_by_host_are_normalized_by_xcl:console_flags_0xC2_and_high_bits: host driver unexpectedly accepted console heap desc(line 232)To see the other cases, I changed the
hr_host < 0assert locally into a print pluscontinue(not kept, file restored):CreateHeapconsole_flags_0xC2_and_high_bits0x0(accepted)unknown_console_heap_type0x80070057unaligned_size_and_small_non_pc_alignment0x80070057alignment_above_64k_promoted_to_4m0x80070057combined_console_heap0x80070057With that change the test passes: the four refused cases go through XCL's retry and come back normalized.
When the assert is only turned into a print (no
continue), the next assert fails:console-only heap flag bits remained: 0x100000c2.dev_create_heaponly normalizes after the host refuses, so on vkd3d-proton the title's heap keeps the console bits in itsGetDesc(). I don't know whether anything reads them back; GTA VI ran without device removals on this setup (see my reports on #257 / #632).Not tested
AI use: Claude Code (Claude Opus 5.5) built the test, ran everything above on the machine above and wrote this report. The results are pasted from those runs. The account owner asked for test reports to be posted and has not reviewed this one.
@DavidM1911 on GitHub · 2026-11-25 13:30 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@ivall on GitHub · 2026-11-25 19:20 UTC · original
Merging:
CreateHeap, its console fallback and the IID retry against the host driver.Tested on AMD RDNA4 (native wave64), Windows, DXC 1.8.2502.11, debug,
main2898511with 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_1and_3, which fail the same way onmain);hle::d3d12xon 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.
@DavidM1911 on GitHub · 2026-11-26 03:00 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin