i965: Ensure that texture validation is skipped for immutable textures.
authorChris Forbes <chrisf@ijw.co.nz>
Tue, 21 Jan 2014 09:48:30 +0000 (22:48 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 10 Apr 2014 06:27:41 +0000 (18:27 +1200)
If we were to relayout the miptree, we'd break any views that are
sharing it.

(Simplified based on suggestions from Eric)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/intel_tex_validate.c

index d8497a681e305593207e0a4909758beddbba83d3..48a41584cefcb57661be7646492c7d0398271686 100644 (file)
@@ -98,6 +98,11 @@ intel_finalize_mipmap_tree(struct brw_context *brw, GLuint unit)
       return true;
    }
 
+   /* Immutable textures should not get this far -- they should have been
+    * created in a validated state, and nothing can invalidate them.
+    */
+   assert(!tObj->Immutable);
+
    firstImage = intel_texture_image(tObj->Image[0][tObj->BaseLevel]);
 
    /* Check tree can hold all active levels.  Check tree matches