I performed glGenerateMipmap(GL_TEXTURE_2D)
on a texture that used as FBO rendering target. It works well on several Windows computers, but when I test it on a Linux laptop with Intel HD3000 graphics card, it raises GL_INVALID_OPERATION error.
I checked the program with AMD CodeXL. When this error raised, the GL_TEXTURE_BINDING_2D
has correct value, and bounded texture has correct properties:
# of mipmaps: 10 levels;
dimensions: 600x520
internal format: GL_DEPTH_STENCIL;
GL_TEXTURE_MIN_FILTER: GL_LINEAR_MIPMAP_LINEAR.
GL_TEXTURE_MIN_LOD: -1000
GL_TEXTURE_MAX_LOD: 1000
GL_TEXTURE_BASE_LEVEL: 0
GL_TEXTURE_MAX_LEVEL: 1000
It seems caused by generating mipmap on DEPTH24_STENCIL8
texture. Temporarily I masked mipmap generation of all those depth-stencil textures, and all this kind of warnings eliminated.
Non-power-of-2 texture size does not looks like the cause, because I have many other same sized textures that works well.
I have known that the Intel HD Graphics Linux drivers have many limits, such as not support #version 150
GLSL. And now I've got one more limit :)