The layouts follow AMD's addrlib, but the tests only checked them
against themselves (every element on its own address) and a few
hand-worked offsets. Two tests now pin them to addrlib itself
(Mesa src/amd/addrlib at ed09d38, Navi 21 settings):
- layouts_match_addrlib: 21 descriptions over every mode Layout::offset
addresses (linear, 256 B, 4 KiB and 64 KiB S and D; 1-16 byte
elements, block compression, arrays, mip tails, 2D and 3D), each
with addrlib's surface size, first tail mip and a hash of the
address of every element.
- deep_volumes_keep_their_chain_in_each_slabs_tail: a 16x16x64 volume
whose chain is all in the tail (addrlib's mipChainInTail), with
explicit addresses: each 16-slice slab has its own tail block, and
mip 1's 32 slices span two of them.
Over a wider sweep (about 20,000 descriptions, every mip count for
volumes up to 256 deep) main matches addrlib exactly in size, tail and
every address compared. A tail-entry rule that also requires a mip's depth to
fit one slab changes 5,456 of 14,780 volume layouts (5,087 grow, by
up to 5x) and moves their addresses; both tests fail with it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit f078008b112343b6e68c8ca72b884073064320c1)