[Mesa-dev] [v2 19/26] i965: Restrict fast color clear on first slice only
Topi Pohjolainen
topi.pohjolainen at gmail.com
Mon Oct 31 09:37:29 UTC 2016
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 526c8ec..452efef 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -792,6 +792,14 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb,
const enum intel_fast_clear_state fast_clear_state =
intel_miptree_get_fast_clear_state(irb->mt, irb->mt_level, 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,
--
2.5.5
More information about the mesa-dev
mailing list