ac/surface: fix prt_first_mip_tail calculation for gfx9+
authorQiang Yu <yuq825@gmail.com>
Thu, 16 Dec 2021 02:07:46 +0000 (10:07 +0800)
committerQiang Yu <yuq825@gmail.com>
Thu, 30 Dec 2021 08:11:19 +0000 (16:11 +0800)
commit92d810fa74af894bcca5f75405637fa595357974
tree20bc1e3bbc3161d8f3cac6027702804858193cbe
parent40928e452dae4f7795bb78013b76919c62043833
ac/surface: fix prt_first_mip_tail calculation for gfx9+

Use firstMipIdInTail directly from addrlib which calculated this
in a different way:

Original way: either dimension size of mipmap should be less than
the tile size.

Addrlib way: all dimesion size of the mipmap should be less than
the tile size and at lest one dimension size should be less than
half of the tile size, so that all following mip levels can fit
in one tile and any commit for level in the mip tail also commit
for all levels in mip tail.

Theoretically either way is OK but addrlib way needs less care
about the mip tail commit and better align with the true memory
layout given by itself.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14223>
src/amd/common/ac_surface.c