v3dv: don't always skip tile buffer stores
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 28 Jan 2020 12:04:50 +0000 (13:04 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:26 +0000 (21:21 +0000)
commita7a402c8bd287f46441ea11f169ec091399dde57
tree1c803224e416cede0eb86249584dbf5dd711a5f6
parent4d0e497a3e69c9665b12bed87b964f35d3142f7d
v3dv: don't always skip tile buffer stores

Otherwise we would lose updates relevant to subsequent subpasses in
the same renderpass that read or partially write the attachment.

The only scenario where we can safely do this is on the last subpass
that uses the attachment, so long as we don't need to emit the store
for the clear.

This also fixes a bug in the computation of the first subpass that
uses an attachment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/vulkan/v3dv_cmd_buffer.c
src/broadcom/vulkan/v3dv_private.h