Tests: verify D3D12.X CreateHeap, QueryInterface, and IDXGIDevice parity #1820
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!1820
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1820"
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?
@Vadson159 on GitHub · 2026-11-24 21:18 UTC · original
Vadson159:tests/d3d12-heaps-and-qi→main· +402 −0 · 1 files · 1 commits · openPart of #480. Adds standalone integration tests in
crates/xcl/tests/d3d12_heaps_and_qi.rsverifying XCL'sID3D12Device::CreateHeap(#28),ID3D12Device4::CreateHeap1(#54),QueryInterface(#0), and syntheticIDXGIDevice/1/2hooks against the unhooked host D3D12 driver (real::orig_fn) and DXGI adapter without console game files; zero runtime files undercrates/xcl/src/are modified.What is in it
crates/xcl/tests/d3d12_heaps_and_qi.rs:create_heap_and_heap1_match_host_driver_and_console_fallbacks: comparesCreateHeap(#28) andCreateHeap1(#54) HRESULTs andGetDesc()againstreal::orig_fnacrossDEFAULT(ALLOW_ONLY_BUFFERS,ALLOW_ONLY_NON_RT_DS_TEXTURES,ALLOW_ONLY_RT_DS_TEXTURES,ALLOW_ALL_BUFFERS_AND_TEXTURES, 4 MiB MSAA),UPLOAD,READBACK,CUSTOM(WRITE_BACK/L0), zero-size failure, and nullppvHeapcapability probes (S_FALSEwhen debug layer is inactive); verifies console fallbacks for unrecognized heap flags (0x2/0x10outsidePC_HEAP_FLAGS = 0x3FED), non-standard alignments (4096-> 64 KiB,0x2_0000-> 4 MiB), unknown heap type (99->DEFAULT), unaligned size rounding (0x1_2340-> 128 KiB), and unknown console IID fallback toID3D12Heap.query_interface_splits_dxgi_device_between_title_and_pc_callers: uses a syntheticMappedModulecaller (title_qi) vs a host caller (pc_qi, kept distinct under/OPT:ICF) to verify standard D3D12 / unknown IIDQueryInterfaceparity withreal::orig_fn, confirm host callers getE_NOINTERFACEfor DXGI device IIDs while title callers get XCL'sdxgi_device, and validateIDXGIDevice2(ID3D12DeviceCOM identity,GetAdapter/GetParentLUID parity,SetPrivateDataforwarding, GPU thread priority bounds[-7, 7], frame latency defaults/reset/clamp[1, 16],QueryResourceResidency,OfferResources/ReclaimResources,CreateSurface/EnqueueSetEvent, andE_POINTERchecks).Tested
AMD Ryzen 7 9800X3D 8-Core Processor,AMD Radeon RX 9070 XT(driver32.0.32029.2010),AMD Radeon(TM) Graphics(driver32.0.21045.29003), andWARP(XCL_ADAPTER=warp);Microsoft Windows 11 Probuild26300(x64);rustc 1.100.0 (0ef1bc386 2026-11-09)..\scripts\test.ps1(cargo build --workspace && cargo test --workspace -- --test-threads=4, debug, RX 9070 XT): 894 passed, 0 failed, 42 ignored (GPU tests skipped on this adapter: 1 (no heap windows);SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows;XCL_SAMPLE_*suites skipped as env vars are unset); includestests\d3d12_heaps_and_qi.rs(2 passed, 0 failed, 0 ignored).cargo test -p xcl --test d3d12_heaps_and_qi -- --test-threads=4(debug, RX 9070 XT): 2 passed, 0 failed, 0 ignored.XCL_ADAPTER=warp cargo test -p xcl --test d3d12_heaps_and_qi -- --test-threads=1(debug, WARP): 2 passed, 0 failed, 0 ignored.XCL_ADAPTER="Radeon(TM)" cargo test -p xcl --test d3d12_heaps_and_qi -- --test-threads=1(debug, AMD Radeon(TM) Graphics): 2 passed, 0 failed, 0 ignored.XCL_D3D12_DEBUG=1 cargo test -p xcl --test d3d12_heaps_and_qi -- --test-threads=1(debug, RX 9070 XT): 2 passed, 0 failed, 0 ignored.cargo test -p xcl --release --test d3d12_heaps_and_qi -- --test-threads=4(release, RX 9070 XT): 2 passed, 0 failed, 0 ignored.python -B -m unittest discover -s scripts -p "test_*.py" -v: Ran 16 tests, OK.Regression run
main:
PR:
Not tested
XCL_SAMPLE_*game-data suites (no game files on this machine; no runtime files undercrates/xcl/src/were modified).AI use
crates/xcl/tests/d3d12_heaps_and_qi.rs, ran the test commands above, and drafted this PR description.@futurepro62 on GitHub · 2026-11-24 22:38 UTC · original · edited 2026-11-24 22:46 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
8d84ee2(on its basee9e94ce).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: 893 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.create_heap_and_heap1_match_host_driver_and_console_fallbacks,query_interface_splits_dxgi_device_between_title_and_pc_callers.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 894 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out five tests where this PR's base has them. They fail on main689f2dbtoo, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures. These areheap_window_out_of_memory_falls_back_to_the_switch_form(#1651) and the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests (follow-up on #1651). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 00:39 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 03:09 UTC · original
PR #1820 compatibility verification
Commit
8d84ee26477573f62a8cce2e220a0b83f7b0d698Environment. STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X. Intel Arc A770 16 GiB, driver 32.0.101.9175, wave range 8–32,
DoublePrecisionFloatShaderOps=0. DXC/DXIL 1.9.2609.5, Rust 1.100.0 (0ef1bc386 2026-11-09), unoptimized dev and test profiles with debug info disabled.d3d12SDKLayers.dllwas absent.Tested.
cargo build --workspaceandcargo test --workspace --no-runboth succeeded. GPU runs used the shared Arc lock withXCL_ADAPTER=A770.cargo test -p xcl --test d3d12_heaps_and_qi -- --nocapturereported 2 passed, 0 failed, 0 ignored, and 0 skips. The log identified the real D3D12.X backend on the Arc A770. Both tests passed again in the workspace run.CreateHeapandCreateHeap1passed host-driver parity checks and XCL fallback checks. The log confirmed the unknown-IID fallback ran on both methods.QueryInterfacepassed the PC versus synthetic title caller checks. The returnedIDXGIDevice2passed checks for COM identity, adapter LUID, private data, GPU priority, frame latency, residency, and method return codes.cargo test --workspace --no-fail-fast -- --test-threads=4exited 101. Across 21 harness summaries inpr1820-suite.log, Cargo reported 876 passed, 18 failed, 42 ignored. The pass total includes 4 explicit skips, which provide no coverage.CreateComputePipelineStatewith0x80070057. Four had result mismatches in FMA overflow, mip sampling, FP16 lane preservation, and pixel-wave reduction.RSSetDepthBiasX(#94) read blue where it expected green.0x887A002D).Not tested. Baseline on
main, AMD or NVIDIA GPUs, D3D12 debug-layer behavior, retail-title smoke, and optional sample-backed checks (XCL_SAMPLE_*unset).T3 Code / Codex (
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr1820-suite.logand published this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.