We had similar issues with using depth in determining the lastLevel of array
textures.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
intelImage->base.Base.Level == firstLevel &&
(intel->gen < 4 || firstLevel == 0)) {
lastLevel = firstLevel;
- } else if (intelObj->base.Target == GL_TEXTURE_EXTERNAL_OES) {
- lastLevel = firstLevel;
} else {
- lastLevel = firstLevel + _mesa_logbase2(MAX2(MAX2(width, height), depth));
+ lastLevel = (firstLevel +
+ _mesa_get_tex_max_num_levels(intelObj->base.Target,
+ width, height, depth) - 1);
}
}