mesa/src/asahi/layout
Alyssa Rosenzweig 3dab73159b asahi,ail: fix multi-plane imports
We need to handle plane offsets everywhere. I noticed this broken before but
didn't realize it was a GL driver issue. Fix is easy, wrote this on my sofa
while waking up in the morning.

Fixes gst-launch-1.0 v4l2src ! glimagesink

Note that cheese & snapshot both still hang for some reason due to
libgstpipewire, but the Mesa side should be fine now.

Closes: #14217
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Cc: mesa-stable
(cherry picked from commit aa9f937116)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38268>
2025-11-04 10:16:42 -08:00
..
tests ail: split compression up 2025-02-26 00:03:52 +00:00
formats.c asahi: advertise ASTC HDR formats 2025-05-28 14:49:06 +00:00
layout.c asahi,ail: fix multi-plane imports 2025-11-04 10:16:42 -08:00
layout.h build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
meson.build ail: swallow up formats 2024-09-02 23:27:14 +00:00
README ail: Handle multisampling 2022-11-19 20:25:41 +00:00
tiling.cc build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +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.