Configuration: - Intel SandyBridge PC Mainboard DH61AG and integrated Intel HD Graphics 3000 - Dual OS: Windows 7 32bit and Ubuntu 12.04 32bit When using OpenGL sampler objects for configuring textures, on Ubuntu Linux you have to create a mipmap chain by calling “glGenerateMipmap()”. Otherwise the texture sampling will not work (e.g. returns black). Take the following example: // Init int texture; glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); glTexImage2D(…); int sampler; glGenSamplers(1, &sampler); glSamplerParameteri(sampler, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glSamplerParameteri(sampler, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Render loop glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); glBindSampler(0, sampler); … This works perfectly on Windows but not on Ubuntu Linux. For Ubuntu Linux I have to add the following: //Init … glTexImage2D(…); glGenerateMipmap(GL_TEXTURE_2D); Without the mipmap the texture sampling does not work, although mipmaps are not used. When using the traditional texture filter configuration, this problem does not occur and the code behaves the same on Windows and Linux: // Render loop glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
Thanks, I'll take a look at this as soon as I can. It may be a driver issue on our part.
I had taken a look for some likely bugs and didn't find them. At this point it's a matter of writing an actual test app for piglit. (Or maybe just updating to Master -- Brian did some rewrite related to sampler objects I think).
Is this still an issue? Ken do you think we can close this one now?
Sorry we never figured this one out. If it's still a problem, feel free to reopen.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.