Bug 28280 - Regression in mesa branches 7.7/7.8: glXChooseVisual fails to find visual
Summary: Regression in mesa branches 7.7/7.8: glXChooseVisual fails to find visual
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 05:09 UTC by Matthias Liertzer
Modified: 2010-06-03 08:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
small test program that showsthe regression (726 bytes, text/x-csrc)
2010-05-27 05:09 UTC, Matthias Liertzer
Details
patch for glxext.c adding GLX_USE_GL (411 bytes, patch)
2010-05-27 06:19 UTC, Matthias Liertzer
Details | Splinter Review
Patch backported from master branch (460 bytes, patch)
2010-05-29 06:13 UTC, Matthias Liertzer
Details | Splinter Review

Description Matthias Liertzer 2010-05-27 05:09:27 UTC
Created attachment 35884 [details]
small test program that showsthe regression

Commit 942ec8722d4d903 with the commit message "Fix __glXInitializeVisualConfigFromTags's handling of unrecognized fbconfig" breaks the glx function glXChooseVisual, i.e. no visual can be found and the function always returns 0.

This bug occurs on two completely different PCs (laptop with intel graphics card/iMac running debian with amd graphics card).

Reverting the commit fixes the bug on both PCs.

I attached a small test program, that shows the regression; several older libraries (e.g.. the togl/tk library ) still depend on this function and it is there that I experienced the bug for the first time.

Cheers,
Matthias
Comment 1 Matthias Liertzer 2010-05-27 06:19:55 UTC
Created attachment 35885 [details] [review]
patch for glxext.c adding GLX_USE_GL

The real problem seems to be that the togl library as well as my test program both set the GLX_USE_GL attribute. The open gl reference states that this attribute is of no importance nowadays and should be ignored by the implementation. The aforementioned commit assumes that all unknown attributes are followed by a value, which is not the case here. Therefore adding GLX_USE_GL to the attribute list above fixes the issue. See the patch.
Comment 2 Matthias Liertzer 2010-05-28 08:27:31 UTC
The regression is also present in the mesa 7.8 branch and has only been fixed in the master branch, see commit 26a9b7e4.
Comment 3 Matthias Liertzer 2010-05-29 06:13:11 UTC
Created attachment 35934 [details] [review]
Patch backported from master branch
Comment 4 Julien Cristau 2010-06-02 12:49:02 UTC
On Sat, May 29, 2010 at 06:13:11 -0700, bugzilla-daemon@freedesktop.org wrote:

> https://bugs.freedesktop.org/show_bug.cgi?id=28280
> 
> --- Comment #3 from Matthias Liertzer <m_liertzer@gmx.at> 2010-05-29 06:13:11 PDT ---
> Created an attachment (id=35934)
>  View: https://bugs.freedesktop.org/attachment.cgi?id=35934
>  Review: https://bugs.freedesktop.org/review?bug=28280&attachment=35934
> 
> Patch backported from master branch
> 
Can somebody please apply this regression fix to the 7.7 and 7.8
branches?  26a9b7e4c737c89b47844303bb7413ceab0280a5 can probably be
cherry-picked as-is to 7.8, but 7.7 has different paths so needs the
above backport.

Thanks,
Julien
Comment 5 Brian Paul 2010-06-02 15:10:39 UTC
I've applied the patch to the 7.8 branch (with fix-ups).

I'm not planning on any more releases from the 7.7 branch.
Comment 6 Julien Cristau 2010-06-03 01:19:36 UTC
> --- Comment #5 from Brian Paul <brian.e.paul@gmail.com> 2010-06-02 15:10:39 PDT ---
> I've applied the patch to the 7.8 branch (with fix-ups).
> 
Thanks.

> I'm not planning on any more releases from the 7.7 branch.
> 
I'm not asking for a new release.  The regression happened after the 7.7.1
release, so just having the fix on the branch would be good.
Comment 7 Brian Paul 2010-06-03 08:45:53 UTC
OK, I've committed the fix to the 7.7 branch too.
Closing this bug now.


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.