summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-25 15:02:23 -0700
committerJason Ekstrand <[email protected]>2017-06-07 22:18:53 -0700
commit46fd9248990b1bb596321866cac9e299a310a87c (patch)
tree956d3fb1dd823de835fbb842ab1107f03fce76a8 /src/mesa
parentf296c22989ff0b6d5c58f2aad89300a4a1a4d64c (diff)
i965: Delete most of the old resolve interface
Reviewed-by: Topi Pohjolainen <[email protected]> Acked-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c92
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.h49
2 files changed, 10 insertions, 131 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 3d207328356..4a11c8e1d0f 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -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,
@@ -2004,35 +1967,6 @@ intel_miptree_depth_hiz_resolve(struct brw_context *brw,
}
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);
}
}
}
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 41963365b51..5004ace95b3 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -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