i965: Delete most of the old resolve interface
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 May 2017 22:02:23 +0000 (15:02 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Jun 2017 05:18:53 +0000 (22:18 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Acked-by: Chad Versace <chadversary@chromium.org>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h

index 3d207328356149d9b237380b120f305bec912b36..4a11c8e1d0fdee863b2c5ed4071cf0486752425a 100644 (file)
@@ -1939,43 +1939,6 @@ intel_miptree_level_has_hiz(struct intel_mipmap_tree *mt, uint32_t level)
    return mt->level[level].has_hiz;
 }
 
-void
-intel_miptree_slice_set_needs_hiz_resolve(struct intel_mipmap_tree *mt,
-                                         uint32_t level,
-                                         uint32_t layer)
-{
-   if (!intel_miptree_level_has_hiz(mt, level))
-      return;
-
-   intel_resolve_map_set(&mt->hiz_map,
-                        level, layer, BLORP_HIZ_OP_HIZ_RESOLVE);
-}
-
-
-void
-intel_miptree_slice_set_needs_depth_resolve(struct intel_mipmap_tree *mt,
-                                            uint32_t level,
-                                            uint32_t layer)
-{
-   if (!intel_miptree_level_has_hiz(mt, level))
-      return;
-
-   intel_resolve_map_set(&mt->hiz_map,
-                        level, layer, BLORP_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_depth_hiz_resolve(struct brw_context *brw,
                                 struct intel_mipmap_tree *mt,
@@ -2003,35 +1966,6 @@ intel_miptree_depth_hiz_resolve(struct brw_context *brw,
    return did_resolve;
 }
 
-bool
-intel_miptree_slice_resolve_hiz(struct brw_context *brw,
-                               struct intel_mipmap_tree *mt,
-                               uint32_t level,
-                               uint32_t layer)
-{
-   return intel_miptree_depth_hiz_resolve(brw, mt, level, 1, layer, 1,
-                                          BLORP_HIZ_OP_HIZ_RESOLVE);
-}
-
-bool
-intel_miptree_slice_resolve_depth(struct brw_context *brw,
-                                 struct intel_mipmap_tree *mt,
-                                 uint32_t level,
-                                 uint32_t layer)
-{
-   return intel_miptree_depth_hiz_resolve(brw, mt, level, 1, layer, 1,
-                                          BLORP_HIZ_OP_DEPTH_RESOLVE);
-}
-
-bool
-intel_miptree_all_slices_resolve_hiz(struct brw_context *brw,
-                                    struct intel_mipmap_tree *mt)
-{
-   return intel_miptree_depth_hiz_resolve(brw, mt,
-                                          0, UINT32_MAX, 0, UINT32_MAX,
-                                          BLORP_HIZ_OP_HIZ_RESOLVE);
-}
-
 bool
 intel_miptree_all_slices_resolve_depth(struct brw_context *brw,
                                       struct intel_mipmap_tree *mt)
@@ -2162,7 +2096,7 @@ intel_miptree_needs_color_resolve(const struct brw_context *brw,
    return true;
 }
 
-bool
+static bool
 intel_miptree_resolve_color(struct brw_context *brw,
                             struct intel_mipmap_tree *mt,
                             uint32_t start_level, uint32_t num_levels,
@@ -2211,15 +2145,6 @@ intel_miptree_resolve_color(struct brw_context *brw,
    return resolved;
 }
 
-void
-intel_miptree_all_slices_resolve_color(struct brw_context *brw,
-                                       struct intel_mipmap_tree *mt,
-                                       int flags)
-{
-
-   intel_miptree_resolve_color(brw, mt, 0, UINT32_MAX, 0, UINT32_MAX, flags);
-}
-
 static inline uint32_t
 miptree_level_range_length(const struct intel_mipmap_tree *mt,
                            uint32_t start_level, uint32_t num_levels)
@@ -2315,17 +2240,20 @@ intel_miptree_finish_write(struct brw_context *brw,
    } else if (mt->format == MESA_FORMAT_S_UINT8) {
       /* Nothing to do for stencil */
    } else {
+      if (!intel_miptree_level_has_hiz(mt, level))
+         return;
+
       if (written_with_aux) {
          for (unsigned a = 0; a < num_layers; a++) {
             intel_miptree_check_level_layer(mt, level, start_layer);
-            intel_miptree_slice_set_needs_depth_resolve(mt, level,
-                                                        start_layer + a);
+            intel_resolve_map_set(&mt->hiz_map, level, start_layer + a,
+                                  BLORP_HIZ_OP_DEPTH_RESOLVE);
          }
       } else {
          for (unsigned a = 0; a < num_layers; a++) {
             intel_miptree_check_level_layer(mt, level, start_layer);
-            intel_miptree_slice_set_needs_hiz_resolve(mt, level,
-                                                      start_layer + a);
+            intel_resolve_map_set(&mt->hiz_map, level, start_layer + a,
+                                  BLORP_HIZ_OP_HIZ_RESOLVE);
          }
       }
    }
@@ -2393,8 +2321,8 @@ intel_miptree_set_aux_state(struct brw_context *brw,
    } else {
       for (unsigned a = 0; a < num_layers; a++) {
          intel_miptree_check_level_layer(mt, level, start_layer);
-         intel_miptree_slice_set_needs_depth_resolve(mt, level,
-                                                     start_layer + a);
+         intel_resolve_map_set(&mt->hiz_map, level, start_layer + a,
+                               BLORP_HIZ_OP_DEPTH_RESOLVE);
       }
    }
 }
index 41963365b51f5120b4928ea6cd07bd5d239ffd05..5004ace95b31f9ac5b90dd0784a3cba1e40d52dc 100644 (file)
@@ -853,44 +853,6 @@ intel_miptree_alloc_hiz(struct brw_context *brw,
 bool
 intel_miptree_level_has_hiz(struct intel_mipmap_tree *mt, uint32_t level);
 
-void
-intel_miptree_slice_set_needs_hiz_resolve(struct intel_mipmap_tree *mt,
-                                          uint32_t level,
-                                         uint32_t depth);
-void
-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
- */
-bool
-intel_miptree_slice_resolve_hiz(struct brw_context *brw,
-                               struct intel_mipmap_tree *mt,
-                               unsigned int level,
-                               unsigned int depth);
-
-/**
- * \return false if no resolve was needed
- */
-bool
-intel_miptree_slice_resolve_depth(struct brw_context *brw,
-                                 struct intel_mipmap_tree *mt,
-                                 unsigned int level,
-                                 unsigned int depth);
-
-/**
- * \return false if no resolve was needed
- */
-bool
-intel_miptree_all_slices_resolve_hiz(struct brw_context *brw,
-                                    struct intel_mipmap_tree *mt);
-
 /**
  * \return false if no resolve was needed
  */
@@ -935,17 +897,6 @@ intel_miptree_used_for_rendering(const struct brw_context *brw,
  */
 #define INTEL_MIPTREE_IGNORE_CCS_E (1 << 0)
 
-bool
-intel_miptree_resolve_color(struct brw_context *brw,
-                            struct intel_mipmap_tree *mt,
-                            uint32_t start_level, uint32_t num_levels,
-                            uint32_t start_layer, uint32_t num_layers,
-                            int flags);
-
-void
-intel_miptree_all_slices_resolve_color(struct brw_context *brw,
-                                       struct intel_mipmap_tree *mt,
-                                       int flags);
 
 #define INTEL_REMAINING_LAYERS UINT32_MAX
 #define INTEL_REMAINING_LEVELS UINT32_MAX