i965: add intel_miptree_set_all_slices_need_depth_resolve
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 29 Jul 2013 20:54:47 +0000 (13:54 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Sun, 4 Aug 2013 18:52:38 +0000 (11:52 -0700)
This function marks all slices of a renderbuffer at a particular
level as needing a depth resolve.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index 900e1c2a063a6251acc7e5fec6078f080f946a1c..d6643ca4d729fb06a0c37e78d4becea9eae914e3 100644 (file)
@@ -1341,6 +1341,18 @@ intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt,
                         level, layer, GEN6_HIZ_OP_DEPTH_RESOLVE);
 }
 
+void
+intel_miptree_set_all_slices_need_depth_resolve(struct intel_mipmap_tree *mt,
+                                                uint32_t level)
+{
+   uint32_t layer;
+   uint32_t end_layer = mt->level[level].depth;
+
+   for (layer = 0; layer < end_layer; layer++) {
+      intel_miptree_slice_set_needs_depth_resolve(mt, level, layer);
+   }
+}
+
 static bool
 intel_miptree_slice_resolve(struct brw_context *brw,
                            struct intel_mipmap_tree *mt,
index 8face46433cc4bcf2c1ba7cf3a6ff7e333d40a0f..d7181255edb4587f92b359293ab083de5f1f2201 100644 (file)
@@ -630,6 +630,10 @@ intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt,
                                             uint32_t level,
                                            uint32_t depth);
 
+void
+intel_miptree_set_all_slices_need_depth_resolve(struct intel_mipmap_tree *mt,
+                                                uint32_t level);
+
 /**
  * \return false if no resolve was needed
  */