From: Wang Zhenyu Date: Mon, 11 Dec 2006 08:00:51 +0000 (-0800) Subject: if (tex width < 4), mipmap calculation will be out of range X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b4d9c0048f036c3c6b7449ab2cd5b22e37a46a2d;p=mesa.git if (tex width < 4), mipmap calculation will be out of range --- diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 1353325afff..bf7047f644e 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; }