[Intel-gfx] OpenGL sampler objects on sandybridge with Ubuntu Linux 12.04

Mark Newiger Mark.Newiger at seefront.com
Wed May 16 11:58:45 CEST 2012


Hello,

We are using an MiniPC with the following 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 I 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. 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 I am not using any mipmaps.
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);

Seems to be a driver bug for me. Or did I oversee something ?

Thanks and best regards
Mark


Best regards,
Mark Newiger | Senior Software Engineer
SeeFront GmbH
Esplanade 41 | D-20354 Hamburg, Germany
Office: +49 40 416 22 64-83
mark.newiger at seefront.com<mailto:mark.newiger at seefront.com> | www.seefront.com<http://www.seefront.com>

Managing Director: Christoph Grossmann
Registered seat of the company: Hamburg
Register Court: Amtsgericht Hamburg HRB 98205 VAT-ID-No. DE248406189

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120516/ced6b9cc/attachment.html>


More information about the Intel-gfx mailing list