[Mesa-dev] [PATCH 3/4] i965/blorp: Add more destination flushing

Jason Ekstrand jason at jlekstrand.net
Mon Nov 6 21:38:56 UTC 2017


Right now we just always flush the destination for render and aren't
particularly careful about depth or stencil.  Soon, flush_for_render
isn't going to do the same thing as flush_for_depth and we may be doing
a good deal less depth flushing so we should be a bit more precise.
---
 src/mesa/drivers/dri/i965/genX_blorp_exec.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
index 296a83b..5d884cf 100644
--- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c
+++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c
@@ -216,7 +216,12 @@ genX(blorp_exec)(struct blorp_batch *batch,
     */
    if (params->src.enabled)
       brw_cache_flush_for_read(brw, params->src.addr.buffer);
-   brw_cache_flush_for_render(brw, params->dst.addr.buffer);
+   if (params->dst.enabled)
+      brw_cache_flush_for_render(brw, params->dst.addr.buffer);
+   if (params->depth.enabled)
+      brw_cache_flush_for_depth(brw, params->depth.addr.buffer);
+   if (params->stencil.enabled)
+      brw_cache_flush_for_depth(brw, params->stencil.addr.buffer);
 
    brw_select_pipeline(brw, BRW_RENDER_PIPELINE);
 
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list