[Mesa-dev] [PATCH v2 4/5] etnaviv: Flush TS cache before changing TS configuration

Lucas Stach l.stach at pengutronix.de
Wed Nov 15 15:48:49 UTC 2017


Am Dienstag, den 14.11.2017, 10:21 +0100 schrieb Wladimir J. van der Laan:
> This is to make sure that the TS is properly flushed to memory before
> rendering to a new surface starts.
> 
> Signed-off-by: Wladimir J. van der Laan <laanwj at gmail.com>

This seems to work as intended, at least I wasn't able to spot missing
shadow tiles anymore with sampler TS enabled.

Reviewed-by: Lucas Stach <l.stach at pengutronix.de>

> ---
>  src/gallium/drivers/etnaviv/etnaviv_emit.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_emit.c b/src/gallium/drivers/etnaviv/etnaviv_emit.c
> index d313af6..b6b06e3 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_emit.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_emit.c
> @@ -322,6 +322,11 @@ etna_emit_state(struct etna_context *ctx)
>        etna_stall(stream, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
>     }
>  
> +   /* Flush TS cache before changing TS configuration. */
> +   if (unlikely(dirty & ETNA_DIRTY_TS)) {
> +      etna_set_state(stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
> +   }
> +
>     /* If MULTI_SAMPLE_CONFIG.MSAA_SAMPLES changed, clobber affected shader
>      * state to make sure it is always rewritten. */
>     if (unlikely(dirty & (ETNA_DIRTY_FRAMEBUFFER))) {


More information about the mesa-dev mailing list