[PATCH] etnaviv: flush source TS before resolve

Philipp Zabel p.zabel at pengutronix.de
Wed Jun 28 14:24:24 UTC 2017


On Mon, 2017-06-26 at 18:24 +0200, Lucas Stach wrote:
> If we blit from a rendertarget or a depthstencil buffer there might still
> be dirty data in the TS buffer which needs to be flushed out.
> 
> Fixes missing shadow tiles in glmark2 shadow.
> 
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> This is on top of "etnaviv: flush color cache and depth cache together
> before resolves". Without this commit flushing the TS is causing
> rendering corruption.

Glad to see that there's a more straightworward test case for this issue
than running an animated web page in Qt WebEngine.

> ---
>  src/gallium/drivers/etnaviv/etnaviv_clear_blit.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
> index e967595f424c..40a6832f8785 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_clear_blit.c
> @@ -470,6 +470,10 @@ etna_try_rs_blit(struct pipe_context *pctx,
>        etna_set_state(ctx->stream, VIVS_GL_FLUSH_CACHE,
>  		     VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_DEPTH);
>        etna_stall(ctx->stream, SYNC_RECIPIENT_RA, SYNC_RECIPIENT_PE);
> +
> +      if (src->levels[blit_info->src.level].ts_size &&
> +          src->levels[blit_info->src.level].ts_valid)
> +         etna_set_state(ctx->stream, VIVS_TS_FLUSH_CACHE, VIVS_TS_FLUSH_CACHE_FLUSH);
>     }
>  
>     /* Set up color TS to source surface before blit, if needed */

Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>

regards
Philipp



More information about the etnaviv mailing list