panfrost: Adjust the format for AFBC textures on Bifrost v7
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 18 Dec 2020 09:42:07 +0000 (10:42 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Mon, 4 Jan 2021 16:05:42 +0000 (17:05 +0100)
commit44217be92134b03e7426860b42918b1d4602e08e
tree0fcf3645629b0792feba8ae4c4f1bdf7662beec4
parent256d4a3eee448df82b62b6cef539746847007e2c
panfrost: Adjust the format for AFBC textures on Bifrost v7

On Bifrost v7, AFBC textures can't be used with a non-identity component
order. Let's patch the format so the component order is always RGB[A].
That means we're lying about the internal format, but that shouldn't be
a problem as long as we don't share the resource.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>
src/gallium/drivers/panfrost/pan_mfbd.c
src/gallium/drivers/panfrost/pan_resource.c
src/panfrost/lib/pan_afbc.c
src/panfrost/lib/pan_texture.c
src/panfrost/lib/pan_texture.h