if (tex width < 4), mipmap calculation will be out of range

This commit is contained in:
Zou Nan hai 2006-12-13 13:24:35 -08:00
parent 9a94dae4c2
commit 696fe3f52e

View file

@ -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;
}