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

Eric Anholt anholt at kemper.freedesktop.org
Tue Nov 1 22:57:57 UTC 2011


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

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Nov  1 09:24:47 2011 -0700

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

This reverts commit abaebcee787eeb8a89bf7a82ed4d1532fcde5e39.

The assertion I made was that "the zero-copy code in validation" would
zero copy.  Of course, I deleted that check back in January because
the two sites that would trigger it (glTexImage() and this one) both
immediately bound their mt to the object, making the other check
pointless.

Removes two extra blits in glx-tfp.  Also fixed the Android home
screen, which wasn't rendering because the extra copy broke the
relationship between the texture and the eglimage.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42152
Tested-by: Chad Versace <chad at chad-versace.us>
Tested-by: Eugeni Dodonov <eugeni.dodonov at intel.com>

---

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

diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index eaf034a..3fc2128 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -421,6 +421,8 @@ 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,
@@ -435,6 +437,9 @@ intel_set_texture_image_region(struct gl_context *ctx,
        return;
 
    intel_image->base.RowStride = region->pitch;
+
+   /* Immediately validate the image to the object. */
+   intel_miptree_reference(&intel_texobj->mt, intel_image->mt);
 }
 
 void




More information about the mesa-commit mailing list