panfrost: Adopt gen_pack_header.py via v3d
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 4 Aug 2020 19:05:43 +0000 (15:05 -0400)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 13 Aug 2020 06:55:15 +0000 (08:55 +0200)
commit75cc5b8c2922e192dd8c3e6dc33d6e691f2485fe
tree1393c2f462a6343765cc98a9abbf29fb82d32e09
parent9cb3a9e72eb99578780a0b754269673a8770d7b3
panfrost: Adopt gen_pack_header.py via v3d

We fork gen_pack_header.py from v3d, which in turn forks GenXML from
Intel. Selected changes for Mali:

* Custom prefix/vendoring
* Cull supported types
* Drop <register> and <packet> support (no cmdstream)
* Pack 32-bit words instead of 8-bit bytes
* Inline packing helpers
* Introduce exact attribute
* Introduce general minus(..) and shr(..) modifiers
* Introduce word:bit syntax
* Introduce prettyprinters

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
src/panfrost/lib/gen_pack.py [new file with mode: 0644]