Bug 486005

Summary: can not obtain a GLX visual when in 16bpp
Product: [Fedora] Fedora Reporter: Fabrice Bellet <fabrice>
Component: mesaAssignee: Adam Jackson <ajax>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: ajax, fabrice, fdc, mcepl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-25 23:35:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
output of glxinfo in 16 bpp
none
output of glxinfo in 24 bpp
none
Xorg.0.log (16 bpp config) none

Description Fabrice Bellet 2009-02-17 20:55:02 UTC
This bug comes from the impossibility to run FlightGear (fgfs) in 16 bpp on my rawhide laptop, using the xorg-x11-drv-ati driver. I tracked down the problem to the invocation of glXChooseVisual(), in OpenSceneGraph.

[bellet@rawhide glx]$ rpm -q mesa-libGL xorg-x11-server-Xorg xorg-x11-drv-ati
mesa-libGL-7.3-2.fc11.i386
xorg-x11-server-Xorg-1.5.99.902-12.fc11.i386
xorg-x11-drv-ati-6.10.0-3.fc11.i586

[bellet@rawhide glx]$ env DISPLAY=:0 glxinfo | grep OpenGL
OpenGL vendor string: Tungsten Graphics, Inc.
OpenGL renderer string: Mesa DRI R200 20060602 AGP 4x x86/MMX/SSE2 TCL
OpenGL version string: 1.3 Mesa 7.3
OpenGL extensions:

I noticed that when the Xserver runs in 24bpp, the psc->visuals list is not empty, and in 16bpp, it is. So  glXChooseVisual() in 16bpp always returns 0, whatever attributes are requested.

I also looked at glxinfo behaviour, and found that in 16bpp, in function print_screen_info(), the choice of the glx visual happens correctly in the part of code specific to glx version 1.3, when calling glXChooseFBConfig(), not with glXChooseVisual().

Is this a known behaviour ?

Comment 1 François Cami 2009-02-19 01:14:31 UTC
Fabrice,

What happens when you launch fgfs in software rendering mode ?
LIBGL_ALWAYS_SOFTWARE=1 fgfs

Could you post full glxinfo outputs in 16 and 24bpp modes, and /var/log/Xorg.0.log as uncompressed text/plain attachments please ?

Thanks

Comment 2 Fabrice Bellet 2009-02-23 18:46:22 UTC
After looking bit further, I noticed that the visual requested by fgfs, is available as a GLXFBConfig only in 16 bpp, and as a GLX Visual in 24bpp, because fgfs needs a GLX_STENCIL_SIZE of 8 bits. Information provided by glxinfo in 16 and 24 bpp is consistent with that.

I could not reproduce my observation of psc->visuals being nul. I've seen this with the debuginfo mesa package, and I've certainly been confused by source code non linear execution, due to optimization.

So I'd say this is probably not a bug.

Finally, I have applied a patch to OpenSceneGraph, that first tries  glXChooseVisual(), and falls back with glXChooseFBConfig()/glXGetVisualFromFBConfig() and this seems to work.

Comment 3 Fabrice Bellet 2009-02-23 18:47:27 UTC
Created attachment 332958 [details]
output of glxinfo in 16 bpp

Comment 4 Fabrice Bellet 2009-02-23 18:48:03 UTC
Created attachment 332959 [details]
output of glxinfo in 24 bpp

Comment 5 Fabrice Bellet 2009-02-23 18:50:17 UTC
Created attachment 332960 [details]
Xorg.0.log (16 bpp config)

Comment 6 Matěj Cepl 2009-02-25 23:35:46 UTC
(In reply to comment #2)
> So I'd say this is probably not a bug.

Thanks a lot for letting us know.