intel: Drop the speculatively-use-firstImage-mt in validation.
authorEric Anholt <eric@anholt.net>
Mon, 10 Jan 2011 22:05:20 +0000 (14:05 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 11 Jan 2011 01:21:11 +0000 (17:21 -0800)
It's been replaced by just setting texObj->mt to image->mt at TexImage
time.

src/mesa/drivers/dri/intel/intel_tex_validate.c

index 81795e48d9a66b4282636c21d90b4172d17430cb..8537e7f3682b192b16aec156b117eb469950ab1a 100644 (file)
@@ -96,23 +96,6 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
       return GL_FALSE;
    }
 
-
-   /* If both firstImage and intelObj have a tree which can contain
-    * all active images, favour firstImage.  Note that because of the
-    * completeness requirement, we know that the image dimensions
-    * will match.
-    */
-   if (firstImage->mt &&
-       firstImage->mt != intelObj->mt &&
-       firstImage->mt->first_level <= tObj->BaseLevel &&
-       firstImage->mt->last_level >= intelObj->_MaxLevel) {
-
-      if (intelObj->mt)
-         intel_miptree_release(intel, &intelObj->mt);
-
-      intel_miptree_reference(&intelObj->mt, firstImage->mt);
-   }
-
    if (_mesa_is_format_compressed(firstImage->base.TexFormat)) {
       comp_byte = intel_compressed_num_bytes(firstImage->base.TexFormat);
       cpp = comp_byte;