Sign in to follow this  
Forlom

Problems with floating point texture formats and intel graphics under linux

Recommended Posts

Forlom    124
Hi folks,

I've tried to create a texture with the GL_RGBA32F format. That works fine under windows but returns an GL_INVALID_VALUE error under linux (ubuntu 11.04). the used hardware is an integrated intel 4 graphics series chipset. The driver is the one installed at os installation (i915 is the name I suppose)

[code]

GLuint tex;
glGenTextures( 1, &tex );

glBindTexture( GL_TEXTURE_2D, tex );

glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA32F, 128, 128, 0, GL_RGBA, GL_FLOAT, 0);

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );

qDebug() << "Error: " << glGetError();

[/code]


Other floating point format don't work, too.

Has anybody made any experience with linux, this intel integrated graphics and floating point textures? I couldn't figure out what I did wrong.

Thanks in advance

Bye
Forlom

Share this post


Link to post
Share on other sites
V-man    813
GL_RGBA32F requires a GL 3.0 context. [url="http://www.opengl.org/wiki/Tutorials"]http://www.opengl.org/wiki/Tutorials[/url]

Or you need to use GL_RGBA32F_ARB which requires GL_ARB_texture_float
You can find the spec at [url="http://www.opengl.org/registry/"]http://www.opengl.org/registry/[/url]

Share this post


Link to post
Share on other sites
Forlom    124
[quote name='V-man' timestamp='1305476112' post='4811116']
GL_RGBA32F requires a GL 3.0 context. [url="http://www.opengl.org/wiki/Tutorials"]http://www.opengl.org/wiki/Tutorials[/url]

Or you need to use GL_RGBA32F_ARB which requires GL_ARB_texture_float
You can find the spec at [url="http://www.opengl.org/registry/"]http://www.opengl.org/registry/[/url]
[/quote]

Thanks for the fast reply.

I've tried GL_RGBA32F_ARB. It worked on windows, but not on Linux. The GL_ARB_texture_float extension is supported by the chipset, but I don't know if the linux driver supports it.

I'm using Qt and a QGLWidget. I couldn't figure out if it already creates a 3.0 context.




Share this post


Link to post
Share on other sites
Yours3!f    1532
from OpenGL wiki:
[quote]
Intel does not provide a proper, up-to-date OpenGL implementation for their integrated GPUs. There is nothing that can be done about this. NVIDIA and ATI provide good support for their integrated GPUs.
[/quote]

therefore you should check for the related extensions (use glGetString)

Qt only creates a basic 2.1 context, you should use GLEW to grab the extensions

Share this post


Link to post
Share on other sites
V-man    813
You just need to call glGetString with Gl_extensions and analyze the string. No need for GLEW.

Share this post


Link to post
Share on other sites
Yann L    1802
[quote name='Forlom' timestamp='1305485794' post='4811175']
Thanks for all your answers. I figured out, that the driver doesn't support the needed extension.
[/quote]
Linux Intel drivers use Mesa to provide OpenGL support. Mesa, being open source software, is not allowed to use floating point textures, as this is a patented feature. You can compile the newest mesa with a [url="http://www.phoronix.com/scan.php?page=news_item&px=OTMzMg"]specific flag[/url] to get floating point support in the base package, but the Intel drivers still won't support it at this time. And even if they did, it is extremely unlikely that this flag will be set by default anytime soon by any major Linux distribution, due to legal concerns. So you could only use FP textures on machines where the user has recompiled both Mesa and the Intel driver on their own, specifically adding said compile flag manually. Rather unlikely to happen in practice.

In short, don't expect to get floating point support anytime soon under Linux open source drivers. Linux closed source drivers from NVidia and AMD are not affected by this, and will provide full FP support.

(and yes, software patents are indeed evil)

Share this post


Link to post
Share on other sites
Forlom    124
[quote name='Yann L' timestamp='1305489289' post='4811193']
[quote name='Forlom' timestamp='1305485794' post='4811175']
Thanks for all your answers. I figured out, that the driver doesn't support the needed extension.
[/quote]
Linux Intel drivers use Mesa to provide OpenGL support. Mesa, being open source software, is not allowed to use floating point textures, as this is a patented feature. You can compile the newest mesa with a [url="http://www.phoronix.com/scan.php?page=news_item&px=OTMzMg"]specific flag[/url] to get floating point support in the base package, but the Intel drivers still won't support it at this time. And even if they did, it is extremely unlikely that this flag will be set by default anytime soon by any major Linux distribution, due to legal concerns. So you could only use FP textures on machines where the user has recompiled both Mesa and the Intel driver on their own, specifically adding said compile flag manually. Rather unlikely to happen in practice.

In short, don't expect to get floating point support anytime soon under Linux open source drivers. Linux closed source drivers from NVidia and AMD are not affected by this, and will provide full FP support.

(and yes, software patents are indeed evil)
[/quote]

Thanks again for the detailed reply. That's pretty interesting.


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this