[Mesa-dev] [v2 07/17] i965: Add interface for checking multiple slices if any is unresolved

Topi Pohjolainen topi.pohjolainen at gmail.com
Wed Nov 23 09:16:06 UTC 2016


Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 ++++++++
 src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 5 +++++
 2 files changed, 13 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 6bdf894..e4bda40 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index d98a2e1..222f9d5 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -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.
-- 
2.5.5



More information about the mesa-dev mailing list