Share nine-mip BC layout across XG copies and array SRV sampling #1311
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1318"
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:50:45Z.
Refs #874. Follows #1300 and #1311.
For nine-mip 1024×512 and 1024×1024 BC5_UNORM/BC7_UNORM textures, use the same 64 KiB layout when reporting offsets, copying blocks and uploading a sampled resource. Slot 2 reports byte offsets within a slice. Slot 10 reports the enclosing tile for the packed tail. The rectangular texture's three standard offsets are 0x40000, 0x20000 and 0x10000. Slice 1 begins 0xc0000 bytes later.
On both adapters the initial array fixture exposed a second issue. Binding a Texture2DArray shader as a Texture2D produced zero at pixel (0,0). A typed array SRV manifest entry now preserves the array view when validating and materializing the descriptor. The fixture supplies its own HLSL and typed manifest.
Verification
Windows 11 build 26200.9974, Release
ffc92c06, debug layer off. NVIDIA GeForce RTX 4060 Laptop GPU 32.0.16.1656 and Microsoft WARP 10.0.26100.9818. No skips. Both backends drew all four format/shape combinations. Each draw compared 12,288 RGBA pixels with the CPU reference and each swapped-slice draw matched the independently reversed reference (98,304 pixels per adapter). Copy-in and copy-out covered both slices and all nine levels, padding, guard bytes and an invalid subresource. The optional pinned Mesa AddrLib comparison checked every visible BC block across 8 combinations. Slot 2's entire 0x1b40-byte result also matched the pinned XCL source for all 8 combinations in a separate local synthetic comparison.7/7 passed with the pinned AddrLib enabled. Documentation link check passed (290 links).