anv: Swizzle fast-clear values
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 17 Mar 2020 18:12:35 +0000 (13:12 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 18 Mar 2020 21:05:07 +0000 (21:05 +0000)
commit46187bb54fe7a0ccfbafa09c5a168fb45da172d4
treed138b41e8ff7c4d5a6e9107cbba87a96769c490d
parent3fb8f1948167c77f05f89b3a0933cbe2a1280b8d
anv: Swizzle fast-clear values

Starting with Gen12, we can fast-clear a lot more surface formats and we
are suddenly in the position of having to fast-clear surfaces with
formats with an implicit swizzle such as VK_FORMAT_R4G4B4A4_UNORM_PACK16
which is represented as ISL_FORMAT_A4B4G4R4 with a BGRA swizzle.  In
order for blorp to do the fast-clear color conversion for us, it needs
a properly swizzled color.

This fixes the following Vulkan CTS groups on TGL:

 - dEQP-VK.pipeline.blend.format.b4g4r4a4_unorm_pack16.*
 - dEQP-VK.api.image_clearing.core.clear_color_image.*.b4g4r4a4*

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4218>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4218>
src/intel/vulkan/anv_blorp.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_cmd_buffer.c