[Mesa-dev] [PATCH V3 12/30] i965: Ensure that texture validation is skipped for immutable textures.

Chris Forbes chrisf at ijw.co.nz
Wed Apr 2 01:05:08 PDT 2014


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 at ijw.co.nz>
---
 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 d8497a6..48a4158 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
-- 
1.9.1



More information about the mesa-dev mailing list