From: Jason Ekstrand Date: Tue, 16 May 2017 21:59:41 +0000 (-0700) Subject: i965/miptree: Take first_level into account when converting to ISL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c16e840f9a9f7f6c18bc3a6d630c20c0fceea5bb;p=mesa.git 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 --- 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 */