Bug 15186 - value of GL_AUX_BUFFERS is zero
Summary: value of GL_AUX_BUFFERS is zero
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 22:36 UTC by WuNian
Modified: 2009-08-24 12:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description WuNian 2008-03-23 22:36:45 UTC
As i965 support drawbuffers and support 4 other buffers, the call  glGetIntegerv(GL_AUX_BUFFERS, &nAuxBufs)
should return 4, but now it is zero. (please refer to opengl spec2.1 Page299 for this constant)

And call
glGetIntegerv(GL_MAX_DRAW_BUFFERS, &nMaxBufs);
it return 4. If i965 driver supports 4 AUX buffer, the MAX_DRAW_BUFFERS should be 6(4 AUX buffers + double buffers). (refer to openGL spec2.1 Page 216, the last of second paragraph).

You can use attachment #13391 [details] to reproduce this bug.
Comment 1 WuNian 2008-03-24 01:04:55 UTC
Mesa core bug, reassigned.

With soft rendering, 
glGetIntegerv(GL_AUX_BUFFERS, &nAuxBufs)
also return 0. Should be 4 as mesa implemented.
Comment 2 Brian Paul 2008-03-24 09:13:52 UTC
With glxinfo do you see 4 in the "ax bf" column?  The GL_AUX_BUFFERS query is just returning the value found in the visual info record.  If you're seeing 0, the code that sets up the GLX visuals probably needs fixing.

As for GL_MAX_DRAW_BUFFERS, I think it's possible for this value to be less than 2 + numAuxBuffers.  I believe it advertises the number of color outputs supported by the fragment shader, not the number of possible drawing surfaces.

You can set ctx->Const.MaxDrawBuffers in the driver to whatever is appropriate.  Though, you may have to increase MAX_DRAW_BUFFERS in config.h too...
Comment 3 WuNian 2008-03-24 18:33:51 UTC
(In reply to comment #2)
> With glxinfo do you see 4 in the "ax bf" column?  The GL_AUX_BUFFERS query is
> just returning the value found in the visual info record.  If you're seeing 0,
> the code that sets up the GLX visuals probably needs fixing.

The glxinfo tells 0 in the "ax bf" column. GLX code needs fixing.
Comment 4 Shuang He 2009-06-03 19:04:55 UTC
This issue has gone
Comment 5 Shuang He 2009-06-03 19:06:38 UTC
verified on GM45 against:
Libdrm:		(master)00fae87f96e1fc5198311feec81866bf9c53d0e1
Mesa:		(master)9f6ec50f8c79283583eeebdebd16bf7dcd134816
Xserver:		(master)7f027d9dc0146e229802aeac342ea2dbab63264a
Xf86_video_intel:		(master)b8e360bf2b77d28559d15a7c0f9c766848eb6ced
Kernel:       (for-linus)07f4f3e8a24138ca2f3650723d670df25687cd05
Comment 6 Adam Jackson 2009-08-24 12:29:41 UTC
Mass version move, cvs -> git


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.