[Mesa-dev] [PATCH 19/26] i965/gen9: Do not use fast clear on compressed mipmapped/arrayed
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Oct 11 19:26:51 UTC 2016
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c
index 8782424..d937c5c 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.c
+++ b/src/mesa/drivers/dri/i965/brw_blorp.c
@@ -814,6 +814,18 @@ 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 meaning that
+ * invididual levels/layers in mipmapped/arrayed textures would need to
+ * agree on the fast clear value. Using compression with rep-clear lifts
+ * this constraint as color values get recorded in the color buffer per
+ * compression block.
+ */
+ if (is_lossless_compressed &&
+ (irb->mt->logical_depth0 > 1 ||
+ irb->mt->first_level ||
+ irb->mt->last_level))
+ can_fast_clear = false;
+
if (can_fast_clear) {
union gl_color_union override_color;
brw_meta_convert_fast_clear_color(brw, irb->mt, &ctx->Color.ClearColor,
--
2.5.5
More information about the mesa-dev
mailing list