Skip to content

glxinfo: show the swap method when listing visuals

Martin Roukala requested to merge mupuf/demos:swap_method into main

I am working on getting mesa#106 (closed) fixed, and using glxinfo to list the swap method of every visual is quite practical.

Since at least some applications are relying on the GLX_SWAP_METHOD_OML extension, I thought this might be beneficial to more people than just me, hence why I am proposing this merge request.

The additional column brings us exactly to 80 characters in the default mode.

Here are some sample outputs (faked to show the different modes):

Default

504 GLX Visuals
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer  ms  sw cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b ap eat
----------------------------------------------------------------------------
0x021 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 u  None
0x022 24 dc  0  32  0 r  y .   8  8  8  8 .  .  0 24  8  0  0  0  0  0 0 e  None
0x4b5 24 tc  0  32  0 r  . .   8  8  8  8 .  .  0  0  0  0  0  0  0  0 0 c  None

Long

504 GLX Visuals
Vis   Vis   Visual Trans  buff lev render DB ste  r   g   b   a      s  aux dep ste  accum buffer   MS   MS  swap        
 ID  Depth   Type  parent size el   type     reo sz  sz  sz  sz flt rgb buf th  ncl  r   g   b   a  num bufs mthd caveats
-------------------------------------------------------------------------------------------------------------------------
0x 21 24 TrueColor    0     32  0  rgba   1   0   8   8   8   8  .   .   0   24  8   0   0   0   0   0   0    u   None
0x 22 24 DirectColor  0     32  0  rgba   1   0   8   8   8   8  .   .   0   24  8   0   0   0   0   0   0    e   None
0x4b5 24 TrueColor    0     32  0  rgba   0   0   8   8   8   8  .   .   0    0  0   0   0   0   0   0   0    c   None

Verbose

504 GLX Visuals
Visual ID: 21  depth=24  class=TrueColor, type=window,pixmap,pbuffer
    bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0
    rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 float=N sRGB=N
    auxBuffers=0 depthSize=24 stencilSize=8
    accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0
    multiSample=0  multiSampleBuffers=0
    visualCaveat=None
    Opaque.
    SwapMethod=Undefined
Visual ID: 22  depth=24  class=DirectColor, type=window,pixmap,pbuffer
    bufferSize=32 level=0 renderType=rgba doubleBuffer=1 stereo=0
    rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 float=N sRGB=N
    auxBuffers=0 depthSize=24 stencilSize=8
    accum: redSize=0 greenSize=0 blueSize=0 alphaSize=0
    multiSample=0  multiSampleBuffers=0
    visualCaveat=None
    Opaque.
    SwapMethod=Exchange
Visual ID: 4b5  depth=24  class=TrueColor, type=window,pixmap,pbuffer
    bufferSize=32 level=0 renderType=rgba doubleBuffer=0 stereo=0
    rgba: redSize=8 greenSize=8 blueSize=8 alphaSize=8 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.
    SwapMethod=Copy

Merge request reports