Bug 88506 - GL_ARB_texture_float is half float only
Summary: GL_ARB_texture_float is half float only
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-16 19:01 UTC by kaillasse91
Modified: 2015-01-20 23:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kaillasse91 2015-01-16 19:01:57 UTC
Not sure this is a bug or a choice but glxinfo report GL_ARB_texture_float for my gma 4500HD mobile. But it seems to be clamped to 16bits.

I suspect that as it's opengl 2.1 and texture_float is an extension, it's up to the implementation to decide if 16 bits is close enough to 32 bits to advertise GL_ARB_texture_float as supported. 

If I create an fbo and attach a texture with something like:

glTexImage2D(GL_TEXTURE_RECTANGLE, 0,  GL_RGBA32F, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, 0);

then

glCheckFramebufferStatusEXT(GL_FRAMEBUFFER)

returns 

GL_FRAMEBUFFER_COMPLETE_EXT.

But in fact I only get GL_RGBA16F as internal format.

My problem is that it does it silently instead of telling me that this format is unsupported so I can choose what to do.

Please excuse me if I'm not clear enough, I only have limited experienced with opengl, but if you confirm me this is not the intended behaviour I can provide further informations.

thanks.
Comment 1 Tapani Pälli 2015-01-20 07:33:36 UTC
Could you supply a test case or apitrace for this? Which Mesa version are you using?
Comment 2 kaillasse91 2015-01-20 14:36:35 UTC
I just found this old bug report :

https://bugs.freedesktop.org/show_bug.cgi?id=44039

Is it not related to what I've found (silently fallback to 16 bits format when 32 bits asked) ?


OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset 
OpenGL version string: 2.1 Mesa 10.5.0-devel (git-461103e 2015-01-18 trusty-oibaf-ppa)
OpenGL shading language version string: 1.20
Comment 3 Ian Romanick 2015-01-20 21:42:34 UTC
(In reply to kaillasse91 from comment #2)
> I just found this old bug report :
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=44039

Oh.  Yeah, that's the problem.  Like I mentioned in one of the comments on that bug, "the problem is that GEN4 can't do filtering on 32-bit float formats."  Your GM45 is GEN4.  We could either not support floating point textures at all, or we can give 16-bit formats when the application asks for GL_RGBA32F.  It's one of those "all solutions are bad" situations.

> Is it not related to what I've found (silently fallback to 16 bits format
> when 32 bits asked) ?
> 
> 
> OpenGL vendor string: Intel Open Source Technology Center
> OpenGL renderer string: Mesa DRI Mobile Intel® GM45 Express Chipset 
> OpenGL version string: 2.1 Mesa 10.5.0-devel (git-461103e 2015-01-18
> trusty-oibaf-ppa)
> OpenGL shading language version string: 1.20

(In reply to kaillasse91 from comment #0)
> My problem is that it does it silently instead of telling me that this
> format is unsupported so I can choose what to do.

I think if you query GL_TEXTURE_RED_SIZE it will tell you the number of bits actually used by the implementation.  Skimming Mesa code, I'm pretty sure it will return 16 if GL_RGBA16F was used and 32 if GL_RGBA32F was used.

Can you try that?
Comment 4 kaillasse91 2015-01-20 23:23:37 UTC
Querying GL_TEXTURE_RED_SIZE returns the size really used (16 in both case here), I guess I will use this to check the framebuffer status  manually  for formats  unsupported.

Thanks for the answers.


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.