The OpenGL 3.3 specification does not seem to ask that the mipmap generation be done in linear space. All I can find is the following:
The internal formats of the derived mipmap arrays all match those of the levelbase array, and the dimensions of the derived arrays follow the requirements described in section 3.8.14. The contents of the derived arrays are computed by repeated, filtered reduction of the levelbase array. For one- and two-dimensional array textures, each layer is filtered independently. No particular filter algorithm is required, though a box filter is recommended as the default filter.
I understand that the result of calling glGenerateMipMap is in sRGB if the original image is in sRGB and I have no problem with that. But what happens in-between? Surely we do not want to average colors that are on a log scale. Is that implementation-specific?