question about GlxVisual

Kristian Høgsberg krh at bitplanet.net
Mon Nov 19 10:48:51 PST 2007


On Nov 16, 2007 1:14 AM, Wu, Nian <nian.wu at intel.com> wrote:
> Hi, Kristian,
>
> Before Otc 18th you changed the GlxVisual related code, there are 17
> visuals, below was the glxinfo's output:
>
>    visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
>  id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
> ----------------------------------------------------------------------
> 0x23 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
...
> 0x68 32 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
>
> After your commit introduced, there are 39 visuals as the xdpyinfo and
> glxinfo reports:
>
>    visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
>  id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
> ----------------------------------------------------------------------
> 0x21 24 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
> 0x22 24 dc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
> 0x7c 24 tc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
> 0x7d 24 tc  0 32  0 r  .  .  8  8  8  8  0  0  0 16 16 16 16  0 0 Slow
> 0x7e 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
> 0x7f 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0 16 16 16 16  0 0 Slow
> 0x80 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
> ......skip some....
> 0x93 24 dc  0 32  0 r  y  .  8  8  8  8  0  0  0 16 16 16 16  0 0 Slow
> 0x94 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
> 0x95 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
> 0x96 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
> 0x97 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
> 0x98 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  0 0 None
> 0x99 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  0 0 Slow
> 0x9a 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
> 0x9b 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
> 0x9c 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
> 0x9d 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
> 0x9e 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
> 0x9f 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
> 0xa0 32 tc  1  0  0 c  .  .  0  0  0  0  0  0  0  0  0  0  0  0 0 None
>
> Why there are so many visual type increased? Some visual are duplicated,
> such as 0x96 and 0x98, 0x97 and 0x99, 0x9c and 0x9e.
>
> By the way, I use intel driver.

The list of visuals correspond exactly to the list of fbconfigs when
you set the new GlxVisuals flag to "all".  It used to be that the DDX
driver created the list of visuals which the DRI drivers fbconfigs
would then be filtered against.  This meant that when the DRI driver
supported fbconfigs that the DDX didn't know about, those would just
get filtered out.

What we have now instead, is that the DRI driver returns the list of
fbconfigs it can do and the X server will create a configurable
subsets of these as glx visuals too.  As mentioned, if you specify
"all" you get all fbconfigs as glx visuals, but there are also
"minimal" and a "typical" settings, which will give you the minimal
conforming set of visuals or a hopefully useful, typical set of
visuals.

In the case of the intel chipset, the DRI driver supports an extra
buffer swap mode (defined by GLX_SWAP_COPY_OML, see intelFillInModes
in i915/intel_screen.c) that the DDX driver doesn't know about.  With
the above changes, this fbconfig is now also available as a glx
visual, but glxinfo doesn't list that attribute (GLX_SWAP_METHOD_OML).

cheers,
Kristian



More information about the xorg mailing list