mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-22 08:48:07 +02:00
Currently, the generated tests consist of some boilerplate, generated test cases, and at the very end the actual test. This is bad for readability, because the actual code is all the way at the bottom. It's also bad for clang-format linting: even though the test cases are /* clang-format off */, they still take an exceptionally long time to parse when linting. I suspect this is a clang-format bug, but it's easy enough to workaround. To solve these issues, restructure so that the test cases are in separate files (containing the actual data), but the manually written test functions are consolidated into a new family of generated layout tests. This is probably cleaner. Parallel clang-format linting is now 10x faster on the M1, which means it's now practical to lint in my "publish branch" hook. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21854> |
||
|---|---|---|
| .. | ||
| tests | ||
| layout.c | ||
| layout.h | ||
| meson.build | ||
| README | ||
| tiling.c | ||
# ail ail is a small library for working with the image (and buffer) layouts encountered with AGX hardware. Its design is inspired by isl. In particular, ail strives to use isl unit suffixes and to represent quantities in a canonical, API-agnostic fashion. ail conventions differ slightly from isl. See the isl documentation in mesa/docs/isl for the conventions that inspired ail, in particular mesa/docs/isl/units.rst. In ail, we have the following units: **Bytes (B)**: 8-bits. **Samples (sa)**: An individual sample. The number of bytes per sample depends on the format. **Pixels (px)**: The unit everything starts as from the API. A pixel contains a fixed number of samples, given as the layout's `sample_count_sa`. For twiddled layouts, these samples are stored together in emmory. **Elements (el)**: For a block-compressed format, a single compression block containing multiple pixels. Otherwise, equal to a single pixel. **Tiles (tiles)**: Defined only for tiled/twiddled layouts. A group of elements forming the layout-specific tile. We do not support any multisampled block-compressed layouts, so either pixels equals either samples or elements.