From 78c71d14e026b50862499fb71a8d8da1763dacaf Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 15 Nov 2022 17:24:56 +0100 Subject: [PATCH] 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: c2b06e1a3820 ("etnaviv: add support for sharing the TS buffer") Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index cd688af1f5a..149387ad7af 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -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)