summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2016-06-14 09:10:16 +0300
committerTopi Pohjolainen <[email protected]>2016-11-25 16:57:07 +0200
commitdea8e7fb07888959f9ea4f361744ba6b47e8bf9d (patch)
tree4332705d0441f25f6a1910461aa0443bd104b5b2
parentd41fc8dc9f17aa04000586f01fe543c690cf2c8e (diff)
i965: Restrict fast color clear on first slice only
Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index d900e15a5c3..57b6f8b4fb4 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -819,6 +819,14 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
intel_miptree_get_fast_clear_state(irb->mt, irb->mt_level,
logical_layer);
+ /* Surface state can only record one fast clear color value. Therefore
+ * unless different levels/layers agree on the color it can be used to
+ * represent only single level/layer. Here it will be reserved for the
+ * first slice (level 0, layer 0).
+ */
+ if (irb->layer_count > 1 || irb->mt_level || irb->mt_layer)
+ can_fast_clear = false;
+
if (can_fast_clear) {
union gl_color_union override_color =
brw_meta_convert_fast_clear_color(brw, irb->mt,