From: Eric Anholt Date: Wed, 21 Dec 2011 23:15:09 +0000 (-0800) Subject: intel: Don't consider miptrees for other texture targets to match. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab7794cada02f3b3b5e3a642c20eeedeb17b65a6;p=mesa.git intel: Don't consider miptrees for other texture targets to match. We would have done a relayout at validate time, but it's senseless to store into a miptree if it's going to force relayout. --- diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index e0f9632838b..9e0f2014556 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -333,6 +333,9 @@ intel_miptree_match_image(struct intel_mipmap_tree *mt, GLuint level = intelImage->base.Base.Level; int width, height, depth; + if (target_to_target(image->TexObject->Target) != mt->target) + return false; + if (image->TexFormat != mt->format && !(image->TexFormat == MESA_FORMAT_S8_Z24 && mt->format == MESA_FORMAT_X8_Z24 && diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c index b0daa2c4de3..63938dd4fe2 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_validate.c +++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c @@ -62,7 +62,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit) */ if (intelObj->mt && (!intel_miptree_match_image(intelObj->mt, &firstImage->base.Base) || - intelObj->mt->target != intelObj->base.Target || intelObj->mt->first_level != tObj->BaseLevel || intelObj->mt->last_level < intelObj->_MaxLevel)) { intel_miptree_release(&intelObj->mt);