v3dv: handle barriers at the end of a command buffer
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 13 Jun 2022 11:53:45 +0000 (13:53 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 14 Jun 2022 11:30:33 +0000 (11:30 +0000)
commit4a7446e4e458a5ad7bded5378670d60721ff58fc
treee9721037028ae62deb58adf02a190afb675ded93
parentd6702b99a2e76f7b14a378a47c7d99321b8694ed
v3dv: handle barriers at the end of a command buffer

Since we only consume barriers at the beginning of a new job, if
a command buffer ends with a barrier we will not handle it. Fix
this by emitting a noop job  in that case to consume it. Ideally,
we could do better and check the pending barrier state to fine
tune the noop job so we don't wait on all queues, but for now
this fixes flakyness with some CTS pipeline barrier tests that
started to show up after we optimized binning sync barriers. It
is likely that the additional sync we had before that change was
enough to prevent the problem from showing up.

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