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 |
tests: compare reserved-resource tiling with the host driver (issue #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_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;
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;
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;
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 #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:
AI-assisted.