etnaviv: don't select TS modifier when not FAST_CLEAR capable

When presented with a list of modifiers to choose from we must never
pick a shared TS modifier if the local instance isn't FAST_CLEAR capable.

Fixes: c2b06e1a38 ("etnaviv: add support for sharing the TS buffer")
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/19751>
This commit is contained in:
Lucas Stach
2022-11-15 17:24:56 +01:00
committed by Marge Bot
parent 6e3fc88f0c
commit 78c71d14e0
@@ -519,6 +519,9 @@ select_best_modifier(const struct etna_screen * screen,
best_modifier = base_modifier = priority_to_modifier[prio];
if (!VIV_FEATURE(screen, chipFeatures, FAST_CLEAR))
return best_modifier;
/* Make a second pass to try and find the best TS modifier if any. */
for (int i = 0; i < count; i++) {
if ((modifiers[i] & ~VIVANTE_MOD_EXT_MASK) == base_modifier)