logbase2(max(width, height, depth)) ==
max(logbase2(width), logbase2(height), logbase2(depth)), but in 60
bytes less code.
GLuint width = intelImage->base.Width;
GLuint height = intelImage->base.Height;
GLuint depth = intelImage->base.Depth;
- GLuint l2width, l2height, l2depth;
GLuint i, comp_byte = 0;
GLuint texelBytes;
lastLevel = firstLevel;
}
else {
- l2width = logbase2(width);
- l2height = logbase2(height);
- l2depth = logbase2(depth);
- lastLevel = firstLevel + MAX2(MAX2(l2width, l2height), l2depth);
+ lastLevel = firstLevel + logbase2(MAX2(MAX2(width, height), depth));
}
assert(!intelObj->mt);