i965: Add interface for checking multiple slices if any is unresolved
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 19 Sep 2016 09:03:58 +0000 (12:03 +0300)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 25 Nov 2016 14:57:07 +0000 (16:57 +0200)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index 62d28d294746772df9a98c9064c44ec12ac2a135..8564d62f419b4aff1f20f35630073768c18ad4fd 100644 (file)
@@ -2247,6 +2247,14 @@ intel_miptree_set_fast_clear_state(struct intel_mipmap_tree *mt,
    mt->fast_clear_state = new_state;
 }
 
+bool
+intel_miptree_has_color_unresolved(const struct intel_mipmap_tree *mt,
+                                   unsigned start_level, unsigned num_levels,
+                                   unsigned start_layer, unsigned num_layers)
+{
+   return mt->fast_clear_state != INTEL_FAST_CLEAR_STATE_RESOLVED;
+}
+
 void
 intel_miptree_used_for_rendering(const struct brw_context *brw,
                                  struct intel_mipmap_tree *mt, unsigned level,
index 13de820f403df7d63f4903ecb07ee62940a95513..a66526931162991be7f5a44885793dbffc143d58 100644 (file)
@@ -973,6 +973,11 @@ intel_miptree_set_fast_clear_state(struct intel_mipmap_tree *mt,
                                    unsigned num_layers,
                                    enum intel_fast_clear_state new_state);
 
+bool
+intel_miptree_has_color_unresolved(const struct intel_mipmap_tree *mt,
+                                   unsigned start_level, unsigned num_levels,
+                                   unsigned start_layer, unsigned num_layers);
+
 /**
  * Update the fast clear state for a miptree to indicate that it has been used
  * for rendering.