[Mesa-dev] [PATCH v2 04/11] gallium: add endian_format field to struct pipe_resource

Marek Olšák maraeo at gmail.com
Tue Apr 19 11:08:54 UTC 2016


On Mon, Apr 18, 2016 at 5:38 PM, Marek Olšák <maraeo at gmail.com> wrote:
> Packed formats are the only formats that need byte-swapping between
> components. The only gallium packed formats are:
> - 10_10_10_2
> - 5_5_5_1
> - 5_6_5
> - 4_4_4_4
> - 3_3_2
> - 24_8
> - 8_24
> - 32_8_24 (not sure
> - 11_11_10
> - 5_5_5_9
> You can treat these like 1-component array formats (e.g. 4_4_4_4 is
> like being packed in 1 uint32 component, which means you need to
> byte-swap the whole uint32, instead of swapping components separately
> as in 16 and 32 bpc array formats).

Typo above: 4_4_4_4 is like uint16, 10_10_10_2 and 24_8 would be uint32.

Marek


More information about the mesa-dev mailing list