mesa/src/asahi
Alyssa Rosenzweig 65c00ba7cb ail: Add unit tests for miptree layouts
The equations for calculating miptree offsets are complicated,
nonobvious, and full of subtle footguns. Worse, the driver doesn't
control the offsets -- it must simply agree with the offsets
implicitly calculated in the hardware. The CTS doesn't adequately
exercise all the corner cases. Make sure we have unit tests that do.

The tests themselves are generated by instrumenting agxdecode to scan
GPU memory after uploading test patterns in a variety of layout with a
Metal application.

Thank you to Asahi Lina and Dougall Johnson for the reverse-engineering
that led to this. The tests selected here are a subset of those used for
the reverse-engineering. The full set may be found in Lina's tilecalc
repo:

   https://github.com/asahilina/tilecalc

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18167>
2022-09-01 22:30:48 +00:00
..
compiler nir: Make nir_lower_discard_if() handle demotes and terminates, too. 2022-08-31 18:26:19 +00:00
layout ail: Add unit tests for miptree layouts 2022-09-01 22:30:48 +00:00
lib asahi: Advertise ASTC formats 2022-09-01 22:30:48 +00:00
meson.build ail: Introduce image layout module 2022-09-01 22:30:48 +00:00