I don't remember why the alignment was there, but it seems to be
no longer needed. I guess it was a dirty fix for some other bug.
height = align(height, tile_height);
/* This is needed for the kernel checker, unfortunately. */
- height = util_next_power_of_two(height);
+ if ((tex->b.b.target != PIPE_TEXTURE_1D &&
+ tex->b.b.target != PIPE_TEXTURE_2D) ||
+ tex->b.b.last_level != 0) {
+ height = util_next_power_of_two(height);
+ }
}
return util_format_get_nblocksy(tex->b.b.format, height);