xref: /aosp_15_r20/external/mesa3d/src/asahi/layout/README (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1*61046927SAndroid Build Coastguard Worker# ail
2*61046927SAndroid Build Coastguard Worker
3*61046927SAndroid Build Coastguard Workerail is a small library for working with the image (and buffer) layouts
4*61046927SAndroid Build Coastguard Workerencountered with AGX hardware. Its design is inspired by isl. In
5*61046927SAndroid Build Coastguard Workerparticular, ail strives to use isl unit suffixes and to represent
6*61046927SAndroid Build Coastguard Workerquantities in a canonical, API-agnostic fashion.
7*61046927SAndroid Build Coastguard Worker
8*61046927SAndroid Build Coastguard Workerail conventions differ slightly from isl. See the isl documentation in
9*61046927SAndroid Build Coastguard Workermesa/docs/isl for the conventions that inspired ail, in particular
10*61046927SAndroid Build Coastguard Workermesa/docs/isl/units.rst.
11*61046927SAndroid Build Coastguard Worker
12*61046927SAndroid Build Coastguard WorkerIn ail, we have the following units:
13*61046927SAndroid Build Coastguard Worker
14*61046927SAndroid Build Coastguard Worker**Bytes (B)**: 8-bits.
15*61046927SAndroid Build Coastguard Worker
16*61046927SAndroid Build Coastguard Worker**Samples (sa)**: An individual sample. The number of bytes per sample depends
17*61046927SAndroid Build Coastguard Workeron the format.
18*61046927SAndroid Build Coastguard Worker
19*61046927SAndroid Build Coastguard Worker**Pixels (px)**: The unit everything starts as from the API. A pixel contains a
20*61046927SAndroid Build Coastguard Workerfixed number of samples, given as the layout's `sample_count_sa`. For twiddled
21*61046927SAndroid Build Coastguard Workerlayouts, these samples are stored together in emmory.
22*61046927SAndroid Build Coastguard Worker
23*61046927SAndroid Build Coastguard Worker**Elements (el)**: For a block-compressed format, a single compression block
24*61046927SAndroid Build Coastguard Workercontaining multiple pixels. Otherwise, equal to a single pixel.
25*61046927SAndroid Build Coastguard Worker
26*61046927SAndroid Build Coastguard Worker**Tiles (tiles)**: Defined only for tiled/twiddled layouts. A group of elements
27*61046927SAndroid Build Coastguard Workerforming the layout-specific tile.
28*61046927SAndroid Build Coastguard Worker
29*61046927SAndroid Build Coastguard WorkerWe do not support any multisampled block-compressed layouts, so either pixels
30*61046927SAndroid Build Coastguard Workerequals either samples or elements.
31