v3dv: don't swap R/B channels for VK_FORMAT_R5B6G5_UNORM_PACK16
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 27 Feb 2020 08:31:50 +0000 (09:31 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:27 +0000 (21:21 +0000)
commit7f3e79ef9f1eb7bd9a7c428fb123acd920ec0650
treea12ed76c90864bb455393e71874d2a9b047ef0f4
parentaa9ad02e75535d72a016f8401823775bf9ba3dcb
v3dv: don't swap R/B channels for VK_FORMAT_R5B6G5_UNORM_PACK16

This corresponds to PIPE_FORMAT_B5G6R5_UNORM, which is the format that
is natively supported. Also, we can't swap R/B on 3-channel images!

Also, we should rely on the v3dv format table for this rather than
pipe format descriptions since we specify the expected correct swizzles
there for all supported formats. This, for example, gets us correct
beahvior for things like VK_FORMAT_B4G4R4A4_UNORM_PACK16 without
needing to special case it.

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