summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-05-16 14:59:41 -0700
committerJason Ekstrand <[email protected]>2017-05-26 07:58:01 -0700
commitc16e840f9a9f7f6c18bc3a6d630c20c0fceea5bb (patch)
tree9e8f453f21c564ae974b15c23293fa09691acecd /src
parent554a1731a52c287c4c387923fea69a98d3a5fc2c (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_mipmap_tree.c2
1 files changed, 1 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 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 */