Mesa (master): intel: Drop the immediate validation of the texture object in TFP.

Eric Anholt anholt at kemper.freedesktop.org
Mon Sep 26 22:38:35 UTC 2011


Module: Mesa
Branch: master
Commit: abaebcee787eeb8a89bf7a82ed4d1532fcde5e39
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=abaebcee787eeb8a89bf7a82ed4d1532fcde5e39

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Sep 21 15:20:20 2011 -0700

intel: Drop the immediate validation of the texture object in TFP.

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 at bitplanet.net>
Acked-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/intel/intel_tex_image.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index 30e1776..cbc9a49 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -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




More information about the mesa-commit mailing list