GL Visual Initialization

Ben Gamari ben at mw0.ath.cx
Mon May 26 09:51:28 PDT 2008


Hey all,

For a few months now I've been experiencing an odd bug with GL visual
initialization (#15641) where the default root visual is not being
exported as a supported GL visual. This, for obvious reasons, causes
some issues when running some software (most notably, compiz). While
school has kept me from putting too much time into debuggin to-date, now
since classes are over, I have a bit of time to put into finally nailing
this bug down (and cease the weekly pokes of krh; sorry about that krh).

I guess my first question is what is the relationship between FBConfigs,
GLX Visuals, and X Visuals (and "Modes" which are occassionally
mentioned in the source)? While the respective specs give definitions,
these really don't offer much help when it comes to how they are all
generated and interact within the X server.

Thusfar, I've tried poking around in the X server to identify the code
path of GL visual initialization and have come up with this,

- __glXDRIscreenProbe() ->
  - driCreateNewScreen() ->
    - intelInitScreen() ->  (I'm on Intel hardware)
      - intelFillInModes() ->
        - driCreateConfigs(): (Generate __GLcontextModes, and __DRIconfigs)
  - glxConvertConfigs() ->  (Generate FBConfigs (aka Modes?) from DRI Configs?)
    - createModeFromConfig()
  - __glXScreenInit() ->
    - filterOutNativeConfigs()
    - addFullSet() -> 
      - AddScreenVisuals()  

Does this look about right? Did I miss any steps? I have been able to
figure out what some of this code does but without basic background, it
has been a little tough. From what I can tell, the configs pertaining to
my default visual (0x21) are being looked at by
filterOutNativeConfigs(). What precisely is this function supposed to
do?

I would be quite grateful if someone with experience with this code
could spare a few minutes and write down some background and perhaps
answer some of my previous questions. Thanks a ton,

 - Ben




More information about the xorg mailing list