panvk: Fix TLS initialization for multi-draw batches
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 16 Sep 2021 09:42:28 +0000 (11:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Sep 2021 14:03:40 +0000 (14:03 +0000)
commit915a41f55af003f82d9dfffdbe2267395c78e198
tree820511cf8a39c0fbacc0bb1eaf912925636ead12
parente856386764172e65e99d2c22d8f2f0160c77a0fe
panvk: Fix TLS initialization for multi-draw batches

If we queue multiple draws to the same batch, the TLS size should be
adjusted to cover the maximum TLS size requirement, not just the one
of the pipeline bound when the batch is closed. This requires keeping
TLS info attached to the batch and updating it every time a draw is
issued.

While at it, get rid of the wg_count state: we'll let vkCmdDispatch()
calculate the total WLS size.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13077>
src/panfrost/vulkan/panvk_cmd_buffer.c
src/panfrost/vulkan/panvk_private.h
src/panfrost/vulkan/panvk_vX_cmd_buffer.c