etnaviv: properly check for new clear value in sampler TS setup

Comparing the 64bit clear value to the lower half 32bit clear state is
obviously wrong and results in a lot of false positives.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20586>
This commit is contained in:
Lucas Stach
2023-01-09 16:28:37 +01:00
committed by Marge Bot
parent 03fdcbba19
commit 6481805e00
@@ -92,7 +92,8 @@ etna_configure_sampler_ts(struct etna_sampler_ts *sts, struct pipe_sampler_view
struct etna_resource *rsc = etna_resource(pview->texture);
struct etna_resource_level *lev = &rsc->levels[0];
if (lev->clear_value != sts->TS_SAMPLER_CLEAR_VALUE)
if ((lev->clear_value & 0xffffffff) != sts->TS_SAMPLER_CLEAR_VALUE ||
(lev->clear_value >> 32) != sts->TS_SAMPLER_CLEAR_VALUE2)
dirty = true;
assert(rsc->ts_bo && lev->ts_valid);