From 696fe3f52e0e7893740b430835f8c95611de3dd3 Mon Sep 17 00:00:00 2001 From: Zou Nan hai Date: Wed, 13 Dec 2006 13:24:35 -0800 Subject: [PATCH] if (tex width < 4), mipmap calculation will be out of range --- src/mesa/drivers/dri/i965/brw_tex_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 1353325..bf7047f 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -138,7 +138,7 @@ GLboolean brw_miptree_layout( struct intel_mipmap_tree *mt ) /* Layout_below: step right after second mipmap. */ - if (level == mt->first_level + 1) { + if (level == mt->first_level + 1 && mt->pitch > 4) { x += mt->pitch / 2; x = (x + 3) & ~ 3; } -- 2.7.4