panfrost: Fix background showing when using discard
authorIcecream95 <ixn@keemail.me>
Tue, 12 May 2020 02:08:09 +0000 (14:08 +1200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 14 May 2020 01:08:21 +0000 (01:08 +0000)
commit0dd24b381c52e0b20fe70041e95611aad6b0d258
tree0bbbe3f93c9e07fb141e22b85df21c4235caaa54
parent15dd7933bc33bb13d146f9e0a1f79092e749f33b
panfrost: Fix background showing when using discard

This fixes problems in a number of games, including SuperTuxKart,
OpenMW and RVGL.

v2: Use MALI_READS_ZS | 0x20 instead of MALI_WRITES_Z to match with
the blob. Keep using 0x400 | 0x20 when depth is disabled.

Closes: #2620
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5001>
src/gallium/drivers/panfrost/pan_cmdstream.c