From c16e840f9a9f7f6c18bc3a6d630c20c0fceea5bb Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 16 May 2017 14:59:41 -0700 Subject: i965/miptree: Take first_level into account when converting to ISL ISL doesn't have a concept of a partial miptree. Instead, we need to subtract off first_level. Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 24d01aa32a9..6acf48e8501 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -3258,7 +3258,7 @@ intel_miptree_get_isl_surf(struct brw_context *brw, surf->phys_level0_sa.array_len = mt->physical_depth0; } - surf->levels = mt->last_level + 1; + surf->levels = mt->last_level - mt->first_level + 1; surf->samples = MAX2(mt->num_samples, 1); surf->size = 0; /* TODO */ -- cgit v1.2.3