mesa/src/asahi/layout
Alyssa Rosenzweig ac114030a7 ail: constify everything
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29179>
2024-05-14 04:57:25 +00:00
..
tests ail: add tests for linear<-->twiddled copies 2024-02-14 21:02:30 +00:00
layout.c ail: use is_level_compressed 2024-01-10 08:44:37 -04:00
layout.h ail: constify everything 2024-05-14 04:57:25 +00:00
meson.build ail: port tiling routines to c++ 2024-02-14 21:02:30 +00:00
README ail: Handle multisampling 2022-11-19 20:25:41 +00:00
tiling.cc ail: use template for tiled memcpy 2024-02-14 21:02:30 +00:00

# 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.