This seems to work now. Also fix i945 set_level_info, need to match i915
behaviour for storing mip height, as it's assumed to be the mip width
(in texels) elsewhere and the division by 4 is done later (untested).
if (mt->compressed)
img_height = MAX2(1, height / 4);
else
- img_height = MAX2(2, height);
+ img_height = (MAX2(2, height) + 1) & ~1;
mt->total_height += img_height;
- mt->total_height += 1;
- mt->total_height &= ~1;
width = minify(width);
height = minify(height);
GLuint img_height;
intel_miptree_set_level_info(mt, level, 1, x, y, width,
- mt->compressed ? height/4 : height, 1);
+ height, 1);
if (mt->compressed)
img_height = MAX2(1, height/4);