panfrost: Fix formats converting uninit from AFBC
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 22 Apr 2021 23:14:47 +0000 (19:14 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 23 Apr 2021 14:23:41 +0000 (14:23 +0000)
commitc220976fd077c09bbc485ff9a29091895bd39fdf
treeb5e10eda19ebbcea2addb32654dfe8f81e3b12c0
parent3d979c9169508b4f8e2bb0e925dde22dc34ed9bd
panfrost: Fix formats converting uninit from AFBC

If no slices were valid (the resource is uninitialized), we were reading
a bogus PIPE_FORMAT_NONE format from the blit.dst.format. Fix this --
and guard against scope similar issues -- by hoisting the blit
assignments out of the loop so they're valid.

Fixes: 9d0ad7fd2e1 ("panfrost: Patch the gallium driver to use pan_image_layout_init()")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10415>
src/gallium/drivers/panfrost/ci/deqp-panfrost-g52-fails.txt
src/gallium/drivers/panfrost/pan_resource.c