| Summary: | SDL reports it 'Can't find matching GLX visual' when requesting an sRGB capable framebuffer | ||
|---|---|---|---|
| Product: | SDL | Reporter: | manwiuxas |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | triage-2.0.4 |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | reproduction case | ||
|
Description
manwiuxas
2015-03-02 10:06:30 UTC
I remember hearing something about this. We'll look at this for 2.0.4. --ryan. Created attachment 2106 [details]
reproduction case
This program fails to make a GL context on X11 with Nvidia's proprietary drivers (prints "(nil)") It works on Intel's open source drivers, at least on this machine (prints a valid pointer address for the GL context).
--ryan.
Hmm, the Nvidia drivers don't like when you choose a visual with:
attribs[i++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB;
...it instead wants...
attribs[i++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB;
attribs[i++] = True;
(which appears to be incorrect, according to the GLX specification.)
Mesa seems to allow this, though, so I guess we'll just force that True item for now.
--ryan.
(In reply to Ryan C. Gordon from comment #3) > Hmm, the Nvidia drivers don't like when you choose a visual with: > > attribs[i++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB; > > ...it instead wants... > > attribs[i++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB; > attribs[i++] = True; > > (which appears to be incorrect, according to the GLX specification.) Uh, wait, Mesa wants the same thing, maybe it was just more forgiving about picking a visual, or some other cosmic force stepped in. http://cgit.freedesktop.org/mesa/mesa/tree/src/glx/glxext.c?id=5e59f895c468c1ac497ad925b8bddd7f227c89a2#n548 It's not clear to me where it says this attribute needs a "True" specified; other boolean items in the Mesa implementation don't do this (look for FETCH_OR_SET). I'm confused. But at least the fix is easy now! --ryan. Oh well, this should be fixed now in http://hg.libsdl.org/SDL/rev/f5b468964b0b --ryan. |