asahi: Fix BIND_PIPELINE sizing and alignment
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sat, 13 Nov 2021 19:52:52 +0000 (14:52 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 18 Nov 2021 23:35:25 +0000 (23:35 +0000)
commit81d22da6de4076d8418e94bcdd7a326f1cd584f6
tree35271c1ce9cafffbd3d5d618f8acb8678d864d79
parent3b108393a2ae031af9cab6b47f0d5be104519162
asahi: Fix BIND_PIPELINE sizing and alignment

Fix a bug in BIND_PIPELINE XML reported by Dougall, which cleans up
a bit of both decoder and driver.

Instead of...

   * 17 bytes BIND_PIPELINE  (17)
   * An unused 8 byte record (25)
   * A set of N 8 byte records (25 + 8 * N)
   * Oops, 1 byte too many! One just disappeared (24 + 8 * N)

It seems to instead be

   * 24 bytes BIND_PIPELINE (24)
   * A set of N 8 byte records (24 + 8 * N)

without the sentinel record. These means the 8 byte records themselves
are shuffled, with the high byte of the pointers split from the low
word, but that's less gross than an off-by-one.

It's still not clear what the last 8 bytes of the BIND_VERTEX_PIPELINE
structure mean, or the last 4 byte of the BIND_FRAGMENT_PIPELINE
structure which seems to be a bit shorter.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13784>
src/asahi/lib/cmdbuf.xml
src/asahi/lib/decode.c
src/gallium/drivers/asahi/agx_state.c