Catch a couple of cases where we would have to delete and recreate the
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 21 Sep 2006 10:06:18 +0000 (10:06 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 21 Sep 2006 10:06:18 +0000 (10:06 +0000)
miptree object.

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

index 5f65242458aa95b13224d8d18a3ae6390d44ae25..91ae0970a04f1d43c67b4ed9eff3a35af93196fa 100644 (file)
@@ -166,12 +166,15 @@ GLuint intel_finalize_mipmap_tree( struct intel_context *intel,
     * target, imageFormat, etc.
     */
    if (intelObj->mt &&
-       (intelObj->mt->first_level != intelObj->firstLevel ||
-       intelObj->mt->last_level != intelObj->lastLevel ||
+       (intelObj->mt->target != intelObj->base.Target ||
        intelObj->mt->internal_format != firstImage->InternalFormat ||
+       intelObj->mt->first_level != intelObj->firstLevel ||
+       intelObj->mt->last_level != intelObj->lastLevel ||
        intelObj->mt->width0 != firstImage->Width ||
        intelObj->mt->height0 != firstImage->Height ||
-       intelObj->mt->depth0 != firstImage->Depth)) 
+       intelObj->mt->depth0 != firstImage->Depth ||
+       intelObj->mt->cpp != firstImage->TexFormat->TexelBytes ||
+       intelObj->mt->compressed != firstImage->IsCompressed)) 
    {
       intel_miptree_destroy(intel, intelObj->mt);
       intelObj->mt = NULL;