tests: compare reserved-resource tiling with the host driver (#480) #707
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/712"
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 Luislariosss on 2026-11-24T03:59:33Z.
Part of #480.
There is no test that checks XCL's D3D12 answers against the PC driver on the same machine, and for the part of the API plain D3D12 also implements the driver is ground truth: if the tiling XCL reports differs from what the driver would say, the title sees a difference no console-file test would catch.
New integration test
crates/xcl/tests/tiling_parity.rs, no game data and no console DLL:d3d12x::vram::place_pages, which rewrites the layout toD3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLEand calls the realCreateReservedResource), obtaining the adopted consoleID3D12Devicefromd3d12x::D3D12XboxCreateDeviceafter checking the backend is Real;GetResourceTilingentry to return identical answers;GetDesc), which the page binding depends on;runner::skip_test) with no GPU, no tiled-resource support, no tier 2 heaps, or whenXCL_VRAM_ARENASdisables page placement.What is in it
crates/xcl/tests/tiling_parity.rs(new): thereserved_resource_tiling_matches_host_drivertest described above.Tested
stable-x86_64-pc-windows-msvc; debug build.cargo test -p xcl --test tiling_parity: ok, 1 passed, 0 failed, backendreal.cargo test --workspace --no-fail-fast -- --test-threads=4: 1316 passed, 2 failed, 27 ignored. The 2 failures aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3(a CPU/GPU result mismatch in the DXIL fuzzer): library tests this PR does not touch, and they fail the same way onmainon this adapter.Not tested
AI use
Imported from ivall/xcl. Originally posted by lordon1a on 2026-11-24T04:07:43Z.
Independent GPU test report on
0d2337f— FAILS on NVIDIA Ampere (RTX 3070 Ti):Tested
616.64, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200),rustc 1.100.0(x86_64-pc-windows-gnullvm), debug buildcargo test -p xcl --test tiling_parity -- --nocapture0.64s:On NVIDIA's D3D12 driver, an 8×8
R8G8B8A8_UNORMreserved resource is packed into the mip tail (width_in_tiles: 0, height_in_tiles: 0, total_tiles: 1), so asserting equality against the pinned RDNA4 constant fails on NVIDIA adapters.Not tested
AI use
0d2337fin a detached worktree, audited the diff, rantiling_parity, and posted this report.Imported from ivall/xcl. Originally posted by ItsMrDubey on 2026-11-24T04:57:35Z.
Test report for
0d2337f7b4412b99e91a507f86760f330765f651(this PR's head)Tested
stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 from Windows SDK 10.0.2610017 test binaries: 675 passed, 2 failed, 41 ignored. Same machine,
main64b3f3559: 700 passed, 1 failed, 41 ignored.This PR's tests:
reserved_resource_tiling_matches_host_driver: FAILEDThe new test fails on NVIDIA. For
R8G8B8A8_UNORM8x8 the host driver reportsTiling { total_tiles: 1, width_in_tiles: 0, height_in_tiles: 0, tile_shape: (128, 128, 1) }, while the pinned RDNA4 constant iswidth_in_tiles: 1, height_in_tiles: 1(crates/xcl/tests/tiling_parity.rs:270). NVIDIA puts this texture entirely in the packed mips, so its standard-tile grid is 0x0. The comparison with the pinned RDNA4 values only holds on AMD; on other vendors it needs to skip, or to compare only what the console layout depends on.Failures:
hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memoryfails on this machine on every run, on this PR's head and onmain64b3f3559alike (5 of 5 reruns onmain), so it is not from this PR. #650 fixes it here.SKIPPED (no wave64 on this GPU):
gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-24T05:59:26Z.
Reserved-resource tiling check on AMD RDNA2
0d2337f7b4412b99e91a507f86760f330765f651, debug build, Rust1.99.0MSVC, Windows 11 Home build 26200.30.0.13002.13003, Ryzen 9 5980HX. XCL logged the real RX 6800M D3D12 backend withXCL_ADAPTER=6800M.1 passed, 0 failed, 0 ignored, 0 runtime skips. All four cases matched the original D3D12 driver and the pinned values, including the
1×1subresource tile count on the 8×8 RGBA8 case that differs in the NVIDIA reports upthread.Not tested
Full workspace suite on this PR head, release build, other adapters, and retail sample data.
AI use
OpenAI Codex (GPT-6 family, exact model variant unavailable) ran the test and drafted this report.
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-24T10:43:44Z.
Closing because it fails the required
PR descriptioncheck (missing required template / AI-use sections perCONTRIBUTING.md) and fails on NVIDIA hardware as reported in the thread. Feel free to reopen a fixed PR matching the template.Imported from ivall/xcl. Originally posted by Luislariosss on 2026-11-26T21:41:46Z.
Superseded by #2889 after the rework. The test no longer pins the RDNA4 numbers (they failed on NVIDIA, per the reports above): it compares XCL and the driver on the same resource and asserts invariants that hold on any vendor - the 64 KiB swizzle layout stuck, standard grid + packed-mip tiles add up to the total, and the format's standard tile shape. The branch was force-pushed for the rebase onto main, so GitHub cannot reopen this PR; #2889 is the same test, fixed and rebased.
Pull request closed