v3dv: fix a1r5g5b5 format
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 25 Mar 2020 13:17:57 +0000 (14:17 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:28 +0000 (21:21 +0000)
commitca186f7291044c545b64e9d3c0714f9eb0377b65
tree01f9fc524017a517274c6e28f66095007a5c5685
parent45e86d8a075eb7017dacfd694432fe0e92f44b43
v3dv: fix a1r5g5b5 format

We were configuring the TLB to use ABGR1555, but that doesn't really
give us what we want. There were two issues:

  * We were using the wrong Texture Data Format and Output Image
    Format. In fact those we need to use were not included on the
    packet file.

  * Even using the correct one, we need to do a RB swap to match the
    semantics of the Vulkan format.

This patch fixes both issues. As we are here we keep the formats we
were already used, that would provide support for r5g5b5a1.

So this patch makes tests like the following going from skip to pass:
dEQP-VK.texture.filtering.2d.formats.r5g5b5a1_unorm.nearest

And the following test from fail to pass:
dEQP-VK.texture.filtering.2d.formats.a1r5g5b5_unorm.nearest

Note that the R5G5B5A1_UNORM_PACK16 is not mandatory, but as we
already made the effort to understand them and get them working let's
just keep it on the list

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
src/broadcom/cle/v3d_packet_v33.xml
src/broadcom/vulkan/v3dv_formats.c