panfrost: gen_pack: Add the aggregate concept
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 5 Sep 2020 10:00:21 +0000 (12:00 +0200)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 21 Sep 2020 11:34:49 +0000 (07:34 -0400)
commitc7a10193d42bdc01a9fbe771f3afb927d4f1640d
treea1aba978c350546d89029fe2ed7f7f0a181aae7b
parentfa7d0974fb9fbfba47632999c3ad9176759a2815
panfrost: gen_pack: Add the aggregate concept

Panfrost descriptors are big and are usually built from a combination of
sub-descriptors. On top of that, layout of sub-descriptors might vary
depending on the architecture version. Since unions are not really an
option (too complex), here is a thin abstraction layer allowing us to
manipulate aggregates in their packed format. Each aggregate is formed
of one or more sections that are meant to be packed/unpacked/printed
separately. Section overlapping is allowed to facilitate handling of
descriptor variants.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6797>
src/panfrost/lib/gen_pack.py