i965: Assert that relayout laid out something that won't need it again.
authorEric Anholt <eric@anholt.net>
Tue, 18 Dec 2012 19:55:16 +0000 (11:55 -0800)
committerEric Anholt <eric@anholt.net>
Sat, 22 Dec 2012 21:46:04 +0000 (13:46 -0800)
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@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/intel/intel_tex_validate.c

index 2f1b3542535302d30d78039b96433f4186d1959b..3f21601a8a97693a6e896b4bbbd39d6bdc0467b9 100644 (file)
@@ -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));
       }
    }