etnaviv: update derived state after forced commandstream flush
authorLucas Stach <l.stach@pengutronix.de>
Tue, 30 May 2023 22:15:37 +0000 (00:15 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 31 May 2023 09:54:39 +0000 (09:54 +0000)
If we run out of space in the commandstream while emitting the
current state the drived states won't be recomputed for the
now fully dirty context as the state derivation is called before
any state emitted. Fix this by explicitly updating the derived
state after a forced flush.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8916
CC: mesa-stable
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/23329>

src/gallium/drivers/etnaviv/etnaviv_context.c

index eb00d97..435b39e 100644 (file)
@@ -547,6 +547,8 @@ etna_context_force_flush(struct etna_cmd_stream *stream, void *priv)
 
    pctx->flush(pctx, NULL, 0);
 
+   /* update derived states as the context is now fully dirty */
+   etna_state_update(etna_context(pctx));
 }
 
 void