v3dv: improve TLB layered image clears
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 15 Jul 2021 09:05:20 +0000 (11:05 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 16 Jul 2021 09:36:37 +0000 (09:36 +0000)
commit93e7534a66a42d1b14d3ff1b6dc532abb1c2c62c
tree520d5f9d5c60b4bd1161ce493e9b0a529b97264c
parent308041095c4c12263ee7df2784572eef0e61c73e
v3dv: improve TLB layered image clears

Our meta image clearing code was emitting a job per layer to clear,
but we can emit a single job that packs multiple layer clears for
better performance. For this we just need to make sure we pass
the maximum layer we can emit to v3dv_job_start_frame so we
allocate sufficent tile state memory.

Actually, since this operation is TLB based and doesn't make use of
layered rendering, we could do with allocating less tile state
memory too. We will improve this for this and many others TLB meta
implementations in follow up patches.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11923>
src/broadcom/vulkan/v3dv_meta_clear.c
src/broadcom/vulkan/v3dvx_meta_common.c
src/broadcom/vulkan/v3dvx_private.h