panfrost: Handle null textures robustly
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 14 Mar 2023 02:58:56 +0000 (22:58 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 14 Mar 2023 23:10:01 +0000 (23:10 +0000)
commita0e9f9278dc1c6f72dda5fe3f683755d6e9c8bcb
treea4638f0ea7aae61b97845b4e1726597503bd5290
parentb8b6bb18f5494ec1c5c7d46188a6cafdb7dd6d23
panfrost: Handle null textures robustly

This is really dumb.

But this fixes arb_shader_language_420pack-active-sampler-conflict on v7 which
otherwise dereferences a null pointer trying to access the nonexistant texture
arrays, or DATA_INVALID_FAULTs if you give it a texture array filled with
zeroes. But it seems happy if you bind in null textures. This is dumb but less
faults in Piglit is good for reducing flakes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21891>
src/gallium/drivers/panfrost/pan_cmdstream.c
src/panfrost/ci/panfrost-g52-fails.txt