From: Chris Forbes Date: Tue, 21 Jan 2014 09:48:30 +0000 (+1300) Subject: i965: Ensure that texture validation is skipped for immutable textures. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93fa16bdd13e67bc3a824bf3408f207c4ff0e894;p=mesa.git 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 --- 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