Bug 34265 - GLX fbconfigs without visuals erroneously set window and pixmap bits
Summary: GLX fbconfigs without visuals erroneously set window and pixmap bits
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/GLX (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Adam Jackson
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 10:00 UTC by Ian Romanick
Modified: 2014-04-10 15:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ian Romanick 2011-02-14 10:00:56 UTC
A recently updated version of glxinfo shows the following output with the -v option:

48 GLXFBConfigs:
FBConfig ID: 6d  Visual ID=0  depth=0  class=TrueColor, type=window,pixmap,pbuffer
    bufferSize=16 level=0 renderType=rgba doubleBuffer=0 stereo=0
    rgba: redSize=5 greenSize=6 blueSize=5 alphaSize=0 float=N sRGB=N
    auxBuffers=0 depthSize=0 stencilSize=0
    accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0
    multiSample=0  multiSampleBuffers=0
    visualCaveat=None
    Opaque.
FBConfig ID: 73  Visual ID=9d  depth=24  class=TrueColor, type=window,pixmap,pbuffer
    bufferSize=24 level=0 renderType=rgba doubleBuffer=0 stereo=0
    rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=0 float=N sRGB=N
    auxBuffers=0 depthSize=0 stencilSize=0
    accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0
    multiSample=0  multiSampleBuffers=0
    visualCaveat=None
    Opaque.

Note that the fbconfig with an associated visual ID of 0 says that it can be used to create a window, a pixmap, or a pbuffer.  While this may technically be legal (I see nothing in the GLX spec that strictly forbids it), it is utter nonsense.  It is possible to have an fbconfig that has a visual ID of 0 that may be compatible with some other visual.  However, no driver supported by xorg does this.

We should filter the window bit and the pixmap bit on fbconfigs that lack a visual.
Comment 1 Ian Romanick 2011-03-25 17:24:47 UTC
The piglit test glx-fbconfig-sanity reproduces this issue.
Comment 2 Adam Jackson 2014-04-10 15:36:09 UTC
Pretty sure this was fixed in:

commit 3e8270b869ebf788778d5d56107f6d47c7c050d0
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Apr 12 15:30:25 2011 -0400

    glx: Fix fbconfigs with no corresponding visual


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.