[Mesa-dev] [PATCH 01/16] i965/miptree: Tell if anything got resolved
Topi Pohjolainen
topi.pohjolainen at gmail.com
Fri Feb 17 19:32:04 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 ++++++--
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b339f99..717a320 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2297,21 +2297,25 @@ intel_miptree_resolve_color(struct brw_context *brw,
return resolved;
}
-void
+bool
intel_miptree_all_slices_resolve_color(struct brw_context *brw,
struct intel_mipmap_tree *mt,
int flags)
{
if (!intel_miptree_needs_color_resolve(brw, mt, flags))
- return;
+ return false;
+ bool resolved = false;
foreach_list_typed_safe(struct intel_resolve_map, map, link,
&mt->color_resolve_map) {
assert(map->fast_clear_state != INTEL_FAST_CLEAR_STATE_RESOLVED);
brw_blorp_resolve_color(brw, mt, map->level, map->layer);
intel_resolve_map_remove(map);
+ resolved = true;
}
+
+ return resolved;
}
/**
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 27bcdfb..0337bf0 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -947,7 +947,7 @@ intel_miptree_resolve_color(struct brw_context *brw,
unsigned start_layer, unsigned num_layers,
int flags);
-void
+bool
intel_miptree_all_slices_resolve_color(struct brw_context *brw,
struct intel_mipmap_tree *mt,
int flags);
--
2.5.5
More information about the mesa-dev
mailing list