summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorZou Nan hai <[email protected]>2006-12-13 13:24:35 -0800
committerZou Nan hai <[email protected]>2006-12-13 13:24:35 -0800
commit696fe3f52e0e7893740b430835f8c95611de3dd3 (patch)
treeff0ec2953735c2dbf125c5f9bcbacf148430b239 /src/mesa/drivers/dri/i965
parent9a94dae4c292bfc2aa94a3f86865550e2217b870 (diff)
if (tex width < 4), mipmap calculation will be out of range
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex_layout.c2
1 files changed, 1 insertions, 1 deletions
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;
}