Tests: verify D3D12.X allocation, custom heap, and footprint parity #1808
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!1808
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1808"
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:00 UTC · original
Vadson159:tests/d3d12-allocation-and-footprints→main· +1003 −0 · 1 files · 1 commits · openPart of #480. Adds standalone integration tests in
crates/xcl/tests/d3d12_allocation_and_footprints.rscomparing XCL's hooked D3D12.X memory-layout, heap-property, and copy-footprint queries against the host D3D12 driver (real::orig_fn) andxg::Texturewithout console game files.This PR is ~1000 lines rather than split because all four device query tests (
GetResourceAllocationInfo,GetResourceAllocationInfo2,GetCustomHeapProperties, andGetCopyableFootprints) share one synthetic mapped-module caller harness (ensure_title_callers), descriptor builders, and multi-resource packing verifier in a single integration test file; zero runtime files undercrates/xcl/src/are modified.What is in it
GetResourceAllocationInfo(slot 25,get_resource_allocation_info_matches_host_driver_and_console_tiling): verifies host pass-through for non-title callers, C++ vs C sret ABI detection including stale vtable-copy output buffers (this_first), normalization of console buffer alignment/flags (device_x::pc_resource_desc), MSAA 4x render targets,xg::Textureparity and multi-resource packing across non-MSAA 2D/BC/depth-118/3D textures, zero-count, NULL descriptor array, and invalid buffer error handling (u64::MAX).GetResourceAllocationInfo2(console slot 108 vsID3D12Device8#68,get_resource_allocation_info2_matches_host_driver_and_console_offsets): verifies host parity for0x48-byte consoleD3D12_RESOURCE_DESC1entries against0x40-byte PCD3D12_RESOURCE_DESC1across C++/C ABIs, stale output buffers, NULLpResourceAllocationInfos1, console swizzled/3D texture packing offsets, andu64::MAXerror propagation.GetCustomHeapProperties(slot 26,get_custom_heap_properties_matches_host_driver_across_types_and_abis): verifies PC pass-through and host parity acrossDEFAULT,UPLOAD,READBACK,CUSTOM, and invalid heap types,nodeMask0 and 1, C++/C ABIs, and stale vtable output buffers (accepting bothWRITE_COMBINEon discrete GPUs andWRITE_BACKon UMA/WARP forUPLOAD).GetCopyableFootprints(slot 38,get_copyable_footprints_matches_host_driver_and_console_fallbacks): verifies PC pass-through, exact host parity across buffer/2D/BC1-slice/3D descriptors, fallback throughdevice_x::pc_resource_descfor console layout0x101, console formats116/118, and depth+UAV flags (0x6), NULLpTotalBytes/ all-NULL optional outputs, andu64::MAXon invalid descriptors.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 Pro 10.0.26300(build 26300, 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): 895 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_allocation_and_footprints.rs(4 passed, 0 failed, 0 ignored).cargo test -p xcl --test d3d12_allocation_and_footprints -- --test-threads=4(debug, RX 9070 XT): 4 passed, 0 failed, 0 ignored.cargo test -p xcl --release --test d3d12_allocation_and_footprints -- --test-threads=1(release, RX 9070 XT): 4 passed, 0 failed, 0 ignored.XCL_D3D12_DEBUG=1 cargo test -p xcl --test d3d12_allocation_and_footprints -- --test-threads=1(debug, RX 9070 XT): 4 passed, 0 failed, 0 ignored.XCL_ADAPTER="Radeon(TM)" cargo test -p xcl --test d3d12_allocation_and_footprints -- --test-threads=1(debug, AMD Radeon(TM) Graphics): 4 passed, 0 failed, 0 ignored.XCL_ADAPTER=warp cargo test -p xcl --test d3d12_allocation_and_footprints -- --test-threads=1(debug, WARP): 4 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; runtime code outside tests is unchanged).GetCustomHeapProperties(test uses 8-byte-alignedAlignedHeapPropsdue to the existing unaligned read inreal::is_adoptedtracked in #1130).AI use
crates/xcl/tests/d3d12_allocation_and_footprints.rs, ran the test suites above, and drafted this PR description.@Ctrl-Alt-Haze on GitHub · 2026-11-24 21:20 UTC · original
Tested (head
941a877a3d11c4e18161fb0a8d0c44e3c3ef5902, NVIDIA GeForce RTX 5070 Ti, driver 32.0.16.2135, Wave32, AMD Ryzen 9 5950X, Windows 11 Build 26340,rustc 1.99.1, DXC1.8.2502.11, debug, synthetic tests only):.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 895 passed, 0 failed, 42 ignored (includestests\d3d12_allocation_and_footprints.rs:4 passed, 0 failed;SKIPPEDGPU tests:2 (no wave64)—gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware;1 (no heap windows)—heap_window_out_of_memory_falls_back_to_the_switch_form).AI use: Antigravity (Google DeepMind; exact model version not exposed to agent) ran the test suite and formatted the results.
@futurepro62 on GitHub · 2026-11-24 22:22 UTC · original
Adding an AMD GPU (RDNA2, native wave64) to the report above, which has none, with an NVIDIA run alongside. Tested exact head
941a877(on its base4178e88).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 pso_measurement_compiles_an_exact_synthetic_record: 893 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.get_resource_allocation_info_matches_host_driver_and_console_tiling,get_resource_allocation_info2_matches_host_driver_and_console_offsets,get_custom_heap_properties_matches_host_driver_across_types_and_abis,get_copyable_footprints_matches_host_driver_and_console_fallbacks.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 895 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskipped because Developer Mode was off. The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
@JJAutoCompare on GitHub · 2026-11-25 03:09 UTC · original
PR #1808 compatibility verification
Tested fetched head
941a877a3d11c4e18161fb0a8d0c44e3c3ef5902on STOR-WINLAB. The diff adds four integration tests incrates/xcl/tests/d3d12_allocation_and_footprints.rs.Tested
DoublePrecisionFloatShaderOps=0, wave range 8-32. The run usedXCL_ADAPTER=A770and logged DXC and DXIL 1.9.2609.5.rustc 1.100.0 (0ef1bc386 2026-11-09).cargo build --workspaceandcargo test --workspace --no-runexited 0 outside the GPU lock. Dev and test builds were unoptimized with debug info and incremental compilation disabled.cargo test -p xcl --test d3d12_allocation_and_footprints -- --nocaptureran under the shared Arc lock. The log confirmed the real D3D12.X backend on the A770. All four tests passed with zero failures, ignores, or skips:GetResourceAllocationInfo(host parity and console tiling),GetResourceAllocationInfo2(totals and per-resource offsets),GetCustomHeapProperties(heap types and C/C++ ABIs), andGetCopyableFootprints(host parity and console-layout fallback). All four passed again in the workspace suite.One run of
cargo test --workspace --no-fail-fast -- --test-threads=4under the shared Arc lock exited 101. Across 21 test summaries,pr1808-suite.logrecords 877 passed, 18 failed, and 42 ignored. It contains 4SKIPPEDlines and skipped cases provide no coverage.CreateComputePipelineStaterejections (0x80070057) and four shader result mismatches involving fused arithmetic, texture sampling, packed f16, and wave reduction. The synthetic-title e2e test failed itsRSSetDepthBiasX(#94) check with a blue pixel where it expected green.Not tested
Retail titles or external game samples, other GPUs, release builds, or a comparison run on
main. D3D12 debug-layer coverage was unavailable (d3d12SDKLayers.dllabsent).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 againstpr1808-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.