Tests: verify D3D12.X view, sampler, and descriptor-copy hooks #1739
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1749"
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?
Imported from ivall/xcl. Originally posted by Vadson159 on 2026-11-24T20:13:49Z.
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.Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:17:27Z.
Full-suite run, since this PR has no test report yet. Tested exact head
4cadf23(on its base9039900).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: 860 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.pc_views_samplers_and_copies_match_host_driver,console_heap_cbv_srv_uav_and_sampler_write_expected_abi_descriptors,console_copy_descriptors_renumbers_images_and_samplers_and_keeps_buffers.XCL_ADAPTER=radeon),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).--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_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:55:38Z.
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; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:32:22Z.
PR #1749 test report
Tested
4cadf2322d3fc528424e8a153a3e0ea6c6609c7don STOR-WINLAB. The diff adds one integration test file for D3D12.X device slots 17–24.Tested
DoublePrecisionFloatShaderOps=0, wave range 8–32, andd3d12SDKLayers.dllabsent.rustc 1.100.0 (0ef1bc386 2026-11-09), DXC/DXIL 1.9.2609.5.cargo build --workspaceandcargo test --workspace --no-runboth succeeded in unoptimized profiles with debug info disabled.cargo test -p xcl --test d3d12_views_and_descriptors -- --nocaptureunder the shared Arc lock: 3 passed, 0 failed, 0 ignored, 0 skipped. The log confirmed the real Arc backend and UMA initialization. All three also passed in the workspace run.cargo test --workspace --no-fail-fast -- --test-threads=4run under the shared Arc lock exited 101.pr1749-suite.logcontains 21 result summaries including doctests: 843 passed, 18 failed, 42 ignored. The reported passes include 3SKIPPEDmarkers excluded from coverage: two for no wave64 and one for no heap windows.Workspace failures
CreateComputePipelineStatereturned0x80070057in 13 tests, including FP64 cases. Four shader assertions failed: fused FMA overflow control, implicit-LOD sampling, preservation of the high half of an FP16 result, and a pixel-shader wave reduction.RSSetDepthBiasXcheck read blue where it expected green.Not tested
Retail titles, other adapters or drivers, D3D12 debug-layer validation, and a
mainbaseline. This run leaves the workspace failures unattributed.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 againstpr1749-suite.logand published this report.Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T15:30:14Z.
Tested the PR's head
4cadf23both as is (on its base9039900) and merged intomain06c9f55(merge commit0367c0d5), then into the newermain0829441. The three new tests pass at the head. Two of them fail after the merge intomain, every time.Tested
main06c9f5505f63f10c5ec49ef932d75b2c28177324(clean merge, commit0367c0d5daad2f2995adf9ed54b49a4ec855c79b):cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 1264 passed, 4 failed, 46 ignored.console_copy_descriptors_renumbers_images_and_samplers_and_keeps_buffersandconsole_heap_cbv_srv_uav_and_sampler_write_expected_abi_descriptors(this PR's tests, output below), plusgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1and_3, which also fail 3/3 onmain06c9f55without this PR (#2115).heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),test_title_draws_with_a_root_signature_under_the_debug_layer(no d3d12SDKLayers.dll),uploads_start_from_each_subresources_state(no D3D12 debug layer),shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off), and 6f16_programs_on_the_gpu/f32_programs_on_the_gpucases refused for V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32 (#1426).cargo test --workspace -- --exact <test>):pc_views_samplers_and_copies_match_host_driver: 5 of 5 passed.console_heap_cbv_srv_uav_and_sampler_write_expected_abi_descriptors: 5 of 5 failed.console_copy_descriptors_renumbers_images_and_samplers_and_keeps_buffers: 5 of 5 failed.cargo test --locked -p xcl --test d3d12_views_and_descriptors -- --nocapture, 2 runs: 1 passed, 2 failed, 0 ignored both times.main082944135cd2b96288470a595861fa608eee08dc(clean merge, commitc08a05a0),cargo test --locked -p xcl --test d3d12_views_and_descriptors -- --nocapture, 3 runs: 1 passed, 2 failed, 0 ignored each time, with the same two tests and the same assertion values as below.main06c9f55with onlycrates/xcl/tests/d3d12_views_and_descriptors.rsfrom this PR added: the two tests fail 4 of 4 each, andpc_views_samplers_and_copies_match_host_driverpasses 1 of 1.4cadf2322d3fc528424e8a153a3e0ea6c6609c7don its base9039900,cargo test --locked -p xcl --test d3d12_views_and_descriptors -- --nocapture, 3 runs: 3 passed, 0 failed, 0 ignored each time.cargo test --locked -p xcl --test d3d12_views_and_descriptors -- --nocaptureon the merge:The asserting lines in the PR's file:
title_create_srv(hook_srv, raw_dev, null_mut(), &null_srv, vslot(6))):assert_eq!(console_heap::words_at(rel32(uma, vslot(6))).unwrap(), [0; 8]);title_copy_simple(hook_copy_s, raw_dev, 2, s_dst(1), s_src(0), D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER.0 as u32):assert_eq!(console_heap::words_at(rel32(uma, s_dst(1))).unwrap()[..4], [0, 0, 0, 1]);Not tested
9039900and06c9f55changes the result (no bisect).AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:03Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:39:16Z.
Triage (#1607) – head
4cadf23Part of the #480 parity-test series; #1786, #1808, #1820, #1921 and #2889 cover other device slots (feature support, reserved/tiling, allocation, heaps/QI, pipelines), and main's
d3d12_descriptor_heap_and_fence.rscovers slots 14, 15 and 36 only. None tests the view, sampler or descriptor-copy hooks (slots 17-24).At 821 added lines it is past the ~800-line mark where CONTRIBUTING.md asks the description to say why it cannot be split (e.g. the PC-path parity test and the console-heap ABI test). Every test skips on the no-GPU CI runner, so only a GPU run exercises it.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.