[Mesa-dev] [PATCH 04/43] i965/miptree: Take first_level into account when converting to ISL

Jason Ekstrand jason at jlekstrand.net
Tue May 16 22:44:58 UTC 2017


ISL doesn't have a concept of a partial miptree.  Instead, we need to
subtract off first_level.
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index 24d01aa..6acf48e 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 */
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list