panfrost: Avoid integer underflow in rt_count_1
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 14 Jul 2020 21:08:54 +0000 (17:08 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Jul 2020 19:59:43 +0000 (19:59 +0000)
commit9addb82148c487d6660aecea1af370c2d21d1788
treef794fa86c389b1b3e78631edda30325d3f8e8c3b
parent77bb19eebd1d59c7fc48b41c0f356114f5eab2ef
panfrost: Avoid integer underflow in rt_count_1

If rt_count = 0, this underflows to MAX_MRT. The hw doesn't seem to care
but it's semantically incorrect and confuses pandecode.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5858>
src/gallium/drivers/panfrost/pan_mfbd.c