summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-06-13 10:51:10 +0300
committerTopi Pohjolainen <[email protected]>2016-11-25 16:57:07 +0200
commit96dbe765e1c06566a50393714dcbe86ebde5195a (patch)
tree304a5a1b76b5d2f58d0e000aa744e832942579e9 /src/mesa
parentdea8e7fb07888959f9ea4f361744ba6b47e8bf9d (diff)
i965: Resolve non-compressed fast clears prior layered rendering
Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 0e0bc2700f5..d4cc2235a45 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);
+ }
}
}