Fix cubemaps mipmap generation for gl2 path.