diff options
author | Eric Anholt <[email protected]> | 2012-11-13 12:45:35 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-11-17 12:55:54 -0800 |
commit | df3361df01e35aae9f379f0687490ba409841cfb (patch) | |
tree | 7224ccffe4099dcb85f7050dc36389819364632b | |
parent | 02652eaa25f1114b16762cac7a49f210a8c41c19 (diff) |
intel: Use core mesa support for determining lastLevel.
We had similar issues with using depth in determining the lastLevel of array
textures.
Reviewed-by: Chad Versace <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_tex_image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c index 7b9638f666a..8e623f05b5a 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_image.c +++ b/src/mesa/drivers/dri/intel/intel_tex_image.c @@ -84,10 +84,10 @@ intel_miptree_create_for_teximage(struct intel_context *intel, 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); } } |