Mesa (master): i965: Assert that relayout laid out something that won' t need it again.

Eric Anholt anholt at kemper.freedesktop.org
Sun Dec 23 00:05:39 UTC 2012


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

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Dec 18 11:55:16 2012 -0800

i965: Assert that relayout laid out something that won't need it again.

The ETC1 changes failed at this, so let's make sure it will be caught in
testing next time.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

---

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

diff --git a/src/mesa/drivers/dri/intel/intel_tex_validate.c b/src/mesa/drivers/dri/intel/intel_tex_validate.c
index 2f1b354..3f21601 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_validate.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_validate.c
@@ -113,6 +113,12 @@ intel_finalize_mipmap_tree(struct intel_context *intel, GLuint unit)
          if (intelObj->mt != intelImage->mt) {
             intel_miptree_copy_teximage(intel, intelImage, intelObj->mt);
          }
+
+         /* After we're done, we'd better agree that our layout is
+          * appropriate, or we'll end up hitting this function again on the
+          * next draw
+          */
+         assert(intel_miptree_match_image(intelObj->mt, &intelImage->base.Base));
       }
    }
 




More information about the mesa-commit mailing list