Tests: verify D3D12.X resource, heap start, fence, and queue sync parity #1964
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!1964
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1964/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?
@Vadson159 on GitHub · 2026-11-24 23:59 UTC · original
Vadson159:tests/d3d12-resource-and-sync→main· +582 −0 · 1 files · 1 commits · merged 2026-11-25 02:13 UTCAdd D3D12.X host-driver parity and console ABI integration tests in
crates/xcl/tests/d3d12_resource_and_sync.rs. Part of #480.What is in it
console_caller) inxcl::modulesso each test exercises both host COM calls and console-caller vtable calls on the same adopted device.resource_map_unmap_write_and_gpu_va_match_host_and_console_contracts: checksMap/Unmap/GetGPUVirtualAddressparity againstreal::orig_fnon upload/readback buffers,E_INVALIDARGMapfailure on default/custom (CPU_PAGE_PROPERTY_NOT_AVAILABLE)/reserved resources,WriteToSubresourceandCUSTOM(WRITE_BACK/L0)Mapparity, console slot#11GetGPUVirtualAddresslazyTITLE_ADDRESSbacking andMap/Unmapvisibility on textures, and consoleCreateCommittedResource(#76) UMA buffer placement whenreal::uma_gpu_va() != 0.descriptor_heap_console_start_handles_match_host_and_console_heap: checks consoleGetCPUDescriptorHandleForHeapStart(#9) andGetGPUDescriptorHandleForHeapStart(#10)rax-return ABI againstreal::orig_fnon hostRTV/CBV_SRV_UAVheaps and againstconsole_heap::start(plus cleanup on drop) for console#14CBV_SRV_UAV(type = 4) andSAMPLERshader-visible heaps.fence_and_command_queue_sync_timing_and_allocator_reset_match_host_and_console: checksID3D12CommandQueue(DIRECT,COMPUTE,COPY)GetDesc,GetTimestampFrequency, andGetClockCalibrationparity againstreal::orig_fnplus pre- and post-QUEUE_OLDERconsole slot#16/#17/#18calls; verifiesID3D12Fenceslot#1264-byte-aligned completed-value cell, GPUWait/ExecuteCommandLists/Signal/SignalX(#23), immediate CPUSignalcell updates, andID3D12CommandAllocator::Reset(#8) parity and re-recording.Tested
32.0.32029.2010), AMD Radeon(TM) Graphics (32.0.21045.29003), WARP; AMD Ryzen 7 9800X3D; Windows 11 (10.0.26300.0);rustc 1.100.0 (0ef1bc386 2026-11-09); debug & release.cargo test -p xcl --test d3d12_resource_and_sync -- --test-threads=4 --nocapture: 3 passed, 0 failed, 0 ignored (RX 9070 XT, debug; and 3 passed, 0 failed, 0 ignored in--release).XCL_D3D12_DEBUG=1 cargo test -p xcl --test d3d12_resource_and_sync -- --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored (RX 9070 XT, debug; zero D3D12 debug layer errors).XCL_ADAPTER="Radeon(TM)" cargo test -p xcl --test d3d12_resource_and_sync -- --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored.XCL_ADAPTER=warp cargo test -p xcl --test d3d12_resource_and_sync -- --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored.cargo test --workspace --no-fail-fast -- --test-threads=4(RX 9070 XT, debug): 975 passed, 2 failed, 45 ignored (xcl --lib: 925 passed, 2 pre-existing failuresgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3, 25 ignored, 6 SKIPPEDlower_dxilGPU tests; all 17 integration/bin targets passed includingd3d12_resource_and_sync3 passed and 1 SKIPPEDheap_window_out_of_memory_falls_back_to_the_switch_form).XCL_ADAPTER=warp .\scripts\test.ps1 --skip test_title_runs_and_game_folder_is_untouched:xcl --lib: 927 passed, 0 failed, 25 ignored (plus earlier integration targets includingd3d12_resource_and_sync: 3 passed); halted ate2etest_title_draws_with_a_root_signature_under_the_debug_layer(1 passed; 1 failed; 1 filtered out,0x87don 4-lane WARP waves).Regression run
Not needed: test-only change under
crates/xcl/tests/(no runtime files undercrates/xcl/src/modified).Not tested
scripts/smoke.ps1) andXCL_SAMPLE_*tests (no retail game files or sample paths on this machine).AI use
crates/xcl/tests/d3d12_resource_and_sync.rs, ran the test suites listed above, and wrote this PR description.@fromthemoonx on GitHub · 2026-11-25 00:37 UTC · original
Passes on NVIDIA (RTX 3060, wave32), at the head and merged onto current main. A broken heap-start path is caught by the new tests and by nothing else in the crate.
This adds to the RTX 5070 Ti report above: a run with no
--skip, the merged tree, 10 repeats, the debug layer and a mutation check.878742d(base20cf130):cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4: 979 passed, 0 failed, 45 ignored.80f4819(no conflicts): 996 passed, 0 failed, 45 ignored.lower_dxilrefusals (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). None of the 3 new tests skips. UMA is active on this card, so the consoleCreateCommittedResource(#76) UMA branch runs.cargo test -p xcl --test d3d12_resource_and_sync, 10 runs on the merged tree: 10/10 runs had 3 passed.XCL_D3D12_DEBUG=1 … -- --test-threads=1: 3 passed, 0 debug-layer errors. The only warnings are 4× id 745 (GetGPUVirtualAddress returns NULL for non-buffer resources, from the test calling it on textures on purpose) and the live-object report at process exit.heap_gpu_start_x(hle/d3d12x/real.rs) returningh + 0x40for host heaps,descriptor_heap_console_start_handles_match_host_and_console_heapfails (d3d12_resource_and_sync.rs:372). The rest ofcargo test -p xclstill passes, apart fromcoherent_buffer_sanitizes_console_flags_and_state, a known intermittent failure on main that is not related to this change. So this PR adds the only real-device coverage of that path.Hardware: RTX 3060 12 GB, driver 610.88, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug.
Not tested: Intel, a release build, Linux / Wine.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
@futurepro62 on GitHub · 2026-11-25 00:24 UTC · original · edited 2026-11-25 00:41 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
878742d(on its base20cf130).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 --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 969 passed, 0 failed, 43 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.resource_map_unmap_write_and_gpu_va_match_host_and_console_contracts,descriptor_heap_console_start_handles_match_host_and_console_heap,fence_and_command_queue_sync_timing_and_allocator_reset_match_host_and_console.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 978 passed, 0 failed, 45 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main80f4819too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests andconst_and_null_mask_operands_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@raylitebull on GitHub · 2026-11-25 01:54 UTC · original
Audit & CI note on
878742d:crates/xcl/tests/d3d12_resource_and_sync.rs(582 lines) cleanly coversID3D12Resource(Map/Unmap/GetGPUVirtualAddress/WriteToSubresource/consoleTITLE_ADDRESS& UMA buffer#76), descriptor-heap console start slots (#9/#10), andID3D12Fence/ID3D12CommandQueueparity with RTX 5070 Ti + RTX 3060 passes.CIworkflow approved (running).Remaining before merge:
Build and testfinishing green plus an AMD verification pass on878742d.@DavidM1911 on GitHub · 2026-11-25 03:09 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!