[Mesa-dev] [PATCH 7/9] i965: Use blorp_ccs_op for CCS fast-clears

Jason Ekstrand jason at jlekstrand.net
Tue Feb 20 23:15:25 UTC 2018


---
 src/mesa/drivers/dri/i965/brw_blorp.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 3c4aef9..6a87e54 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -1254,9 +1254,15 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
 
       struct blorp_batch batch;
       blorp_batch_init(&brw->blorp, &batch, brw, 0);
-      blorp_fast_clear(&batch, &surf, isl_format,
-                       level, irb->mt_layer, num_layers,
-                       x0, y0, x1, y1);
+      if (surf.aux_usage == ISL_AUX_USAGE_CCS_E ||
+          surf.aux_usage == ISL_AUX_USAGE_CCS_D) {
+         blorp_ccs_op(&batch, &surf, level, irb->mt_layer, num_layers,
+                      isl_format, ISL_AUX_OP_FAST_CLEAR);
+      } else {
+         blorp_fast_clear(&batch, &surf, isl_format,
+                          level, irb->mt_layer, num_layers,
+                          x0, y0, x1, y1);
+      }
       blorp_batch_finish(&batch);
 
       brw_emit_end_of_pipe_sync(brw, PIPE_CONTROL_RENDER_TARGET_FLUSH);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list