Repository navigation
Conversation
Add integration tests (part of xcl-dev#480) exercising XCL's hooked ID3D12Device slots 17-24 against both the host D3D12 driver (host caller paths, RTV/DSV/UAV format translation and null fallback, and GPU queue clears) and the console descriptor heap ABI (CBV/SRV/UAV/sampler descriptor words, CopyDescriptors/CopyDescriptorsSimple renumbering, and console heap unregister on Release). Verified on AMD Radeon RX 9070 XT, AMD Radeon(TM) Graphics, and WARP (with and without XCL_D3D12_DEBUG=1), plus full .\scripts\test.ps1 (861 passed, 0 failed, 42 ignored; 1 GPU test skipped: no heap windows). Assisted-by: Antigravity (Gemini 4 Hydrogen)
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
PR #1749 test reportTested Tested
Workspace failures
Not tested Retail titles, other adapters or drivers, D3D12 debug-layer validation, and a AI use T3 Code / Codex ( |
|
Tested the PR's head Tested
The asserting lines in the PR's file:
Not tested
AI use
|
Part of #480. Adds integration tests in
crates/xcl/tests/d3d12_views_and_descriptors.rscovering XCL's hookedID3D12Deviceview, sampler, and descriptor-copy slots (17-24) against the host D3D12 driver and the console descriptor-heap ABI without requiring console game files.What is in it
pc_views_samplers_and_copies_match_host_driver): comparesID3D12Deviceslots 17-24 againstreal::orig_fnfor host callers; exercisesCreateRenderTargetView(slot 20 override) translating consoleDXGI_FORMAT(86)/DXGI_FORMAT(115)on anR8G8B8A8_UNORMtarget,CreateDepthStencilView(slot 21) withNULLand explicitD32_FLOATdescs on a console typeless depth texture,CreateUnorderedAccessView(slot 19) null-UAV fallback on a depth texture withoutALLOW_UNORDERED_ACCESS, and live command-list clears on a real queue.console_heap_cbv_srv_uav_and_sampler_write_expected_abi_descriptors): verifiesGetDescriptorHandleIncrementSize(32 / 16 bytes),CreateDescriptorHeap(includingXBOX_EXTRA_CBV_SRV_UAV = 4), heap start slots 9-10 in UMA window 0, CBVcbv_wordsfor in-UMA vs non-UMA addresses, SRV descriptors (console bufferbuffer_words, Texture2Dxcl_image_for_view,TEXTURECUBE->TEXTURECUBEARRAY6-face mapping, RT ASbvh_wordsin/out of UMA, typeless depth resource, null resource), UAV descriptors (buffer, Texture2D mip scaling +ClearUnorderedAccessViewUintonconsole_heap::global_heap, depth null-UAV fallback), sampler descriptors (S# word 3), andconsole_heap::unregisteron release.console_copy_descriptors_renumbers_images_and_samplers_and_keeps_buffers): verifiesCopyDescriptorsSimple(slot 24) andCopyDescriptors(slot 23, multi-range andNULLrange sizes) renumber T# word 0 and S# word 3 to the destination slot while keeping CBV and BVH descriptors verbatim, and handle mixed PC/console copies without device removal.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);rustc 1.100.0 (0ef1bc386 2026-11-09), Windows 11 x64..\scripts\test.ps1(cargo build --workspace && cargo test --workspace -- --test-threads=4): 861 passed, 0 failed, 42 ignored (SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows;XCL_SAMPLE_*sample tests skipped because env vars are unset); includesd3d12_views_and_descriptors: 3 passed, 0 failed, 0 ignored.cargo test -p xcl --test d3d12_views_and_descriptors -- --test-threads=4 --nocapture(debug and--releaseonAMD Radeon RX 9070 XT): 3 passed, 0 failed, 0 ignored.XCL_D3D12_DEBUG=1 cargo test -p xcl --test d3d12_views_and_descriptors -- --nocapture --test-threads=1: 3 passed, 0 failed, 0 ignored (zero D3D12 debug layer errors; two optimized-clear-value warnings id 820 / id 821).XCL_ADAPTER="Radeon(TM)" cargo test -p xcl --test d3d12_views_and_descriptors -- --nocapture --test-threads=1: 3 passed, 0 failed, 0 ignored.XCL_ADAPTER=warp cargo test -p xcl --test d3d12_views_and_descriptors -- --test-threads=4 --nocapture: 3 passed, 0 failed, 0 ignored.python -B -m unittest discover -s scripts -p "test_*.py" -v: 16 tests ran, OK.Regression run
main:
PR:
Not tested
crates/xcl/src/outside tests are unchanged).xclbuilds and runs on Windows x64 only).AI use
crates/xcl/tests/d3d12_views_and_descriptors.rs, ran the tests across local adapters and WARP, and drafted this PR description.