Mesa (master): i965: Resolve non-compressed fast clears prior layered rendering

Topi Pohjolainen tpohjola at kemper.freedesktop.org
Fri Nov 25 15:03:03 UTC 2016


Module: Mesa
Branch: master
Commit: 96dbe765e1c06566a50393714dcbe86ebde5195a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=96dbe765e1c06566a50393714dcbe86ebde5195a

Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date:   Mon Jun 13 10:51:10 2016 +0300

i965: Resolve non-compressed fast clears prior layered rendering

Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/mesa/drivers/dri/i965/brw_draw.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 0e0bc27..d4cc223 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -411,6 +411,19 @@ brw_predraw_set_aux_buffers(struct brw_context *brw)
       if (!irb) {
          continue;
       }
+
+      /* For layered rendering non-compressed fast cleared buffers need to be
+       * resolved. Surface state can carry only one fast color clear value
+       * while each layer may have its own fast clear color value. For
+       * compressed buffers color value is available in the color buffer.
+       */
+      if (irb->layer_count > 1 && !irb->mt->no_ccs &&
+          !intel_miptree_is_lossless_compressed(brw, irb->mt)) {
+         assert(brw->gen >= 8);
+
+         intel_miptree_resolve_color(brw, irb->mt, irb->mt_level,
+                                     irb->mt_layer, irb->layer_count, 0);
+      }
    }
 }
 




More information about the mesa-commit mailing list