v3dv: use compatible TLB formats if possible during copies and clears
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 24 Mar 2020 13:04:56 +0000 (14:04 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:28 +0000 (21:21 +0000)
commit7de80fad741f5a705043240a5213a7a9c4757715
tree52c0715022588e944c55bb05ad28f56beb2c01bb
parentcfc0e15b9bdc5cde158083c04de3e9b7ec1e9e60
v3dv: use compatible TLB formats if possible during copies and clears

If a format is not supported by the TLB, we can still use the TLB path
if we setup the render target using a compatible format. The only caveat
is that for clears we need to pack the clear value using the original
format of the underlying image, not the compatible format.

With this change we get to use the TLB path successfully for all supported
image formats (except a1r5g5b5, at least for now) so long as the region starts
at (0,0), and we only need to consider fallback paths for partial copies
and clears, not because of the format.

This gets us to pass a few extra hundreds of tests in:
dEQP-VK.api.image_clearing.core.clear_color_image.*

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