tests: a reserved texture's tiles must agree with the driver's tile shape #484
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/489"
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-24T00:59:46Z.
Follows the proposal in #480. A test only: every added line is inside
#[cfg(test)], no production line is touched.Tested
On: AMD Radeon RX 9060 XT (RDNA4, gfx1200), Adrenalin 26.10.1 (Windows driver 32.0.32015.7029), Windows 11 26200, MSVC 2022,
e998fe9.What it asserts:
placerewrites the descriptor to the PC's 64 KiB layout and trustsGetResourceTilingfor the page count it maps, so for four shapes of the title's GPU-owned textures (8x8 and 256x256 RGBA8, 256x256 BC1, 8x8 D32) the test checks thattotal_tilesagrees withWidthInTiles * HeightInTiles * DepthInTiles, that a texture inside one tile reports 1, and that the tiled-resources tier is at least 1. No absolute numbers are asserted: the tile shape is the driver's, so pinning them would fail on another vendor. They are printed, and the doc comment records this card's.Not tested
No regression run: I do not have the game package, so
scripts/smoke.ps1cannot run here andpr_check.pywill ask forxcl-smokeblocks. The file is undercrates/xcl/src/, which the checker treats as runtime even though every added line is inside#[cfg(test)]- the case #452 describes.AI use
Written by an AI agent: the diff was produced by DeepSeek V4.1 Flash, from a proposal worked out with Gemini 4 Neon (T3 Code), and reviewed line by line by the operator, who ran the suites above on the card named.
CONTRIBUTING.mddoes not accept open-weight models for code andpr_check.pynamesdeepseek, so this PR does not meet that rule as written; I am declaring it rather than leaving it out. Close it if the rule is firm - the test itself is short enough to retype, and the numbers above are the part worth keeping.Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T01:12:31Z.
Review: COMMENTED
Tested PR head
e998fe9on NVIDIA GeForce GTX 1650 SUPER (Turing / TU116, driver 610.88), Windows 11 build 10.0.26300 (26H2), Rust 1.100.0 (stable-x86_64-pc-windows-gnullvm), DXCv1.9.2609:cargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=4: 6 passed, 1 failed.hle::d3d12x::vram::tests::reserved_texture_tiles_agree_with_the_shapefails on NVIDIA:On NVIDIA D3D12, an
8x8R8G8B8A8_UNORMreserved texture (smaller than the128x128tile shape) is packed into the mip tail (total = 1,mip 0standard tile count =0, whereas AMD reports it as 1 standard tile). The assertion atvram.rs:766needs to account for packed mips (packed_mip_info.NumPackedMips/NumTilesForPackedMips) so it doesn't breakcargo teston NVIDIA adapters.Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-24T01:07:51Z.
The focused fixture fails on the RTX 4080 at exact head
e998fe9ad10862c804b16e3fa53f45de1fef9693. The first case, 8×8 RGBA8, reported one total tile and zero tiles inD3D12_SUBRESOURCE_TILING. The assertion compared those values and failed in both runs.Tested
XCL_SAMPLE_*variables unset.cargo test -p xcl --lib --locked -j 4 reserved_texture_tiles_agree_with_the_shape -- --show-outputat the clean head, twice. Each run had 0 passed, 1 failed, 0 ignored. The first assertion stopped the run before the other three cases.D3D12_PACKED_MIP_INFOfrom the existing call. With the appropriate count used for each case, the same command passed 1/1 and checked all four textures without skips or refusals.0xffffffff0x000000000xffffffff0xffffffff0xffffffffisD3D12_PACKED_TILE. For a packed subresource, Microsoft's API contract specifies zero tile dimensions and directs callers to the packed-mip info. These are single-mip, single-slice textures, so the diagnostic comparedtotalwithNumTilesForPackedMipsfor a packed case and with the subresource dimensions' product for a standard case. The one-tile expectations still held. GetResourceTilingNot tested
AI use
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-24T10:41:57Z.
Closing per
CONTRIBUTING.md/pr_check.py, which does not accept open-weight models (DeepSeek) for code contributions. Thank you for declaring AI use transparently — the measurements on #480 remain useful for a compliant follow-up.Pull request closed