[Mesa-dev] [PATCH 06/15] i965: Prepare slice validator for isl based miptrees
Topi Pohjolainen
topi.pohjolainen at gmail.com
Tue Jun 13 14:50:04 UTC 2017
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
index 8479b285cb..0b85bc12ef 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h
@@ -748,7 +748,13 @@ intel_miptree_check_level_layer(const struct intel_mipmap_tree *mt,
assert(level >= mt->first_level);
assert(level <= mt->last_level);
- assert(layer < mt->level[level].depth);
+
+ if (mt->surf.size > 0)
+ assert(layer < (mt->surf.dim == ISL_SURF_DIM_3D ?
+ mt->surf.phys_level0_sa.depth :
+ mt->surf.phys_level0_sa.array_len));
+ else
+ assert(layer < mt->level[level].depth);
}
void intel_miptree_reference(struct intel_mipmap_tree **dst,
--
2.11.0
More information about the mesa-dev
mailing list