Repository navigation
tests: compare reserved-resource tiling with the host driver (#480) - #712
Luislariosss wants to merge 1 commit into
Conversation
…cl-dev#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: - creates each texture through XCL's page-placement path (d3d12x::vram::place_on_pages, which rewrites the layout to D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE and calls the real CreateReservedResource), obtaining the adopted console ID3D12Device from d3d12x::D3D12XboxCreateDevice after checking the backend is Real; - queries GetResourceTiling twice **on that same resource**: once through XCL's device vtable slot, once through the original driver entry ( eal::orig_fn + the slot it recorded), and requires identical otal_tiles, WidthInTiles, HeightInTiles and TILE_SHAPE. This is what catches XCL answering from a formula instead of the driver; - pins the numbers measured on this card as regression constants, commented with the adapter and driver: 8x8 RGBA8 -> 1 tile (1x1), 256x256 RGBA8 -> 4 (2x2), BC1 256x256 -> 1 with shape 512x256, D32 8x8 -> 1 with shape 128x128; - skips cleanly ( unner::skip_test) with no GPU, no tiled-resource support, or when XCL_VRAM_ARENAS disables page placement, instead of failing. The oracle split is the one discussed in xcl-dev#480: host driver for what the PC also executes, console only for what the console alone defines (those stay with xg_oracle.rs), and the measured RDNA4 numbers as constants so a regression fails loudly instead of silently following whatever the driver says that day. Verified on AMD Radeon RX 9060 XT (RDNA4, gfx1200), Adrenalin 26.10.1 / Windows driver 32.0.32015.7029, Windows 11 26200: cargo test -p xcl --test tiling_parity -> ok, 1 passed, 0 failed (0.23s) cargo clippy -p xcl --all-targets -> exit 0, no warning in the new file AI-assisted.
|
Independent GPU test report on Tested
On NVIDIA's D3D12 driver, an 8×8 Not tested
AI use
|
|
Test report for Tested
17 test binaries: 675 passed, 2 failed, 41 ignored. Same machine, This PR's tests:
The new test fails on NVIDIA. For Failures:
SKIPPED (no wave64 on this GPU): AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output. |
|
Reserved-resource tiling check on AMD RDNA2
cargo test --locked -p xcl --test tiling_parity -- --test-threads=1 --nocapture1 passed, 0 failed, 0 ignored, 0 runtime skips. All four cases matched the original D3D12 driver and the pinned values, including the 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. |
|
Closing because it fails the required |
|
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. |
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