etnaviv: flush source TS before resolve
authorLucas Stach <l.stach@pengutronix.de>
Mon, 26 Jun 2017 15:26:20 +0000 (17:26 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Fri, 14 Jul 2017 15:13:12 +0000 (17:13 +0200)
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@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
src/gallium/drivers/etnaviv/etnaviv_clear_blit.c

index 66c644453309a090f33fed27c397112d7c7ecfdc..d9ff9624fa4c4e0cc1e2665e662efcd6b78ae10a 100644 (file)
@@ -479,6 +479,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);
       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 */
    }
 
    /* Set up color TS to source surface before blit, if needed */