From 93fa16bdd13e67bc3a824bf3408f207c4ff0e894 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 21 Jan 2014 22:48:30 +1300 Subject: i965: Ensure that texture validation is skipped for immutable textures. 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 Reviewed-by: Kenneth Graunke Acked-by: Eric Anholt --- src/mesa/drivers/dri/i965/intel_tex_validate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_tex_validate.c b/src/mesa/drivers/dri/i965/intel_tex_validate.c index d8497a681e3..48a41584cef 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_validate.c +++ b/src/mesa/drivers/dri/i965/intel_tex_validate.c @@ -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 -- cgit v1.2.3