I have a problem with OpenGL code that only appears with Intel UHD GPUs/drivers (tried with different UHD and driver versions (Builds 26.20.100.7810, 27.20.100.8190)).
Basically glGetTexParameterIuiv(name, GL_TEXTURE_TARGET, &textureTarget) seems to not work at all. It always gives a GL_INVALID_ENUM error.
The driver reports OpenGL 4.6, the specs say GL_TEXTURE_TARGET is supported from v4.5 (with Nvidia drivers it works as expected, i.e. I get the type of the texture)
This is sample code reproducing the problem:
GLuint tex1;
glGenTextures(1, &tex1);
glBindTexture(GL_TEXTURE_2D, tex1);
glBindTexture(GL_TEXTURE_2D, 0);
GLuint tex2;
glGenTextures(1, &tex2);
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, tex2);
glBindTexture(GL_TEXTURE_2D_MULTISAMPLE, 0);
GLenum rslt1 = GL_INVALID_ENUM;
GLenum rslt2 = GL_INVALID_ENUM;
glGetTextureParameterIuiv(tex1, GL_TEXTURE_TARGET, &rslt1);
assert(glGetError() == GL_NO_ERROR);
glGetTextureParameterIuiv(tex2, GL_TEXTURE_TARGET, &rslt2);
assert(glGetError() == GL_NO_ERROR);
With Intel drivers the assertions fail. My question is now: IS it a bug? Or am I missing something and the NVidia driver is just more forgiving?