[PATCH] etnaviv: flush source TS before resolve

Lucas Stach l.stach at pengutronix.de
Mon Jun 26 16:24:56 UTC 2017


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.
---
 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 */
-- 
2.11.0



More information about the etnaviv mailing list