summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-28 10:04:10 +0300
committerTopi Pohjolainen <[email protected]>2017-07-22 00:14:16 +0300
commitd84f929d85916c4b83b66ad891ab62b79889ee4c (patch)
tree75cff100620388af3c26b4e2d3114e87474dca9d
parentdbde58dd311a77c08d316362f9365b4c0b6852fe (diff)
i965/miptree: Prepare has_color_unresolved() for isl based
Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 56f524abca5..3cbdf3c938a 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -2197,7 +2197,11 @@ intel_miptree_has_color_unresolved(const struct intel_mipmap_tree *mt,
num_levels = last_level - start_level + 1;
for (uint32_t level = start_level; level <= last_level; level++) {
- const uint32_t level_layers = MIN2(num_layers, mt->level[level].depth);
+ uint32_t level_layers = mt->surf.size > 0 ?
+ get_num_phys_layers(&mt->surf, level) : mt->level[level].depth;
+
+ level_layers = MIN2(num_layers, level_layers);
+
for (unsigned a = 0; a < level_layers; a++) {
enum isl_aux_state aux_state =
intel_miptree_get_aux_state(mt, level, start_layer + a);