pvr: Remove struct pvr_emit_state and emit header directly.
authorKarmjit Mahil <Karmjit.Mahil@imgtec.com>
Mon, 1 Aug 2022 15:48:05 +0000 (16:48 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 21 Sep 2022 16:47:06 +0000 (16:47 +0000)
commit091a117e38f7bac27776151c6b42f5764bfdf4aa
tree68f3304e9e4a19cdc0e2c74fda02b63c6ce841ac
parent75b57f44c1120e7deaa6207b068a35038dec05e0
pvr: Remove struct pvr_emit_state and emit header directly.

Previously `struct pvr_emit_state` was used to keep track of which
state update required emitting and the header was setup based on that.
This commit removes it so that we're instead setting up the header as
we go and we can emit it directly instead of decoding it based on the
emit_state (which is almost identical but with a few missing fields).

This commit also changes pvr_emit_ppp_state() so that each control
stream word is packed/emitted on its own instead of everything
being nested within the header pack. Making the code a bit easier
to follow.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18631>
src/imagination/vulkan/pvr_cmd_buffer.c
src/imagination/vulkan/pvr_private.h