Round-trip a six-level 64 KiB BC texture through XG and D3D12 #1293
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1300"
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 R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T07:18:23Z.
Refs #874.
The opt-in startup shim now carries one explicit guest layout through XG layout queries, copy in and out, and texture sampling. The supported shape is 1024×1024 with six BC5_UNORM or BC7_UNORM mips, one slice and sample, layout 0x109 (64 KiB standard, no XOR), default alignment and zero flags. Each of the three smallest levels lives within guest tile zero. The D3D12 upload stages each level using its desktop footprint. The same guest addressing rule is used by an address SRV and by the uploader for a resource placed at a title address. The automated GPU test exercises the address SRV path.
The reference six offsets and every visible 16-byte block address were compared offline with the Mesa 25.1.0 AMD addrlib at 5c142e46, using the existing Navi21 configuration. Independent checks of the per-level offsets and block addresses matched the implementation published at ivall/xcl revision 64b3f355. The regression runs on source-built data and needs neither reference tree at runtime.
Windows 11 build 26200.9974, x64 MSVC Release, NVIDIA RTX 4060 Laptop 32.0.16.1656 and WARP 10.0.26100.9818, debug layer off. Tested at
47e91d85.Two new and seven existing cases passed, with zero skips. Each format/backend pair checked all 87,360 guest block locations, row and tile padding, an invalid subresource, size/offset/tile queries, and 12,288 GPU pixels. Forcing mip zero in the second half of the draw changed 5,120 of the 6,144 pixels in each pair, as expected. Running an independent uniquely tagged block fixture on the prior shim yielded zero correct guest positions in each copy direction.
The production evidence for this PR is limited to the software contract exercised by the source-built fixtures. This does not change DirectStorage or apply any file offset correction.