intel: Drop the immediate validation of the texture object in TFP.
authorEric Anholt <eric@anholt.net>
Wed, 21 Sep 2011 22:20:20 +0000 (15:20 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 26 Sep 2011 22:33:42 +0000 (15:33 -0700)
It's totally gratuitous -- the image's miptree will be checked for
binding to the object later, anyway, with zero-copy or blitting as
appropriate.

Tested-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/intel/intel_tex_image.c

index 30e1776baa917b53282d076a1e23b581936bdfc4..cbc9a49cb10e398e93f5a4769c57a0d4fea427ae 100644 (file)
@@ -679,8 +679,6 @@ intel_set_texture_image_region(struct gl_context *ctx,
 {
    struct intel_context *intel = intel_context(ctx);
    struct intel_texture_image *intel_image = intel_texture_image(image);
-   struct gl_texture_object *texobj = image->TexObject;
-   struct intel_texture_object *intel_texobj = intel_texture_object(texobj);
 
    _mesa_init_teximage_fields(&intel->ctx, target, image,
                              region->width, region->height, 1,
@@ -695,14 +693,6 @@ intel_set_texture_image_region(struct gl_context *ctx,
        return;
 
    image->RowStride = region->pitch;
-
-   /* Immediately validate the image to the object. */
-   if (intel_texobj->mt)
-      intel_miptree_release(intel, &intel_texobj->mt);
-   intel_miptree_reference(&intel_texobj->mt, intel_image->mt);
-
-   if (!intel_miptree_match_image(intel_texobj->mt, &intel_image->base.Base))
-      fprintf(stderr, "miptree doesn't match image\n");
 }
 
 void