summaryrefslogtreecommitdiff
path: root/hw/xfree86/dixmods
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-02-08 12:37:50 +0100
committerEric Anholt <eric@anholt.net>2009-02-10 17:59:03 -0800
commit619c4d60eb3a8a51a8300ccf8ab5b98a688e6e12 (patch)
tree7e1bfbca6baaac8dc839713f5d5b841fedcdccc1 /hw/xfree86/dixmods
parent7bbf05d9aa75b536a5321abf51f37852b8f109ed (diff)
glx: Replace broken GLX visual setup with a fixed "all" mode.
With trying to match depths so that you didn't end up with a depth 24 fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth 24 X visual, which angered other applications. But in fixing that, the pickFBconfigs code for "minimal" also could end up breaking GLX visuals if the same FBconfig was chosen for more than one X visual. We have no reason to not expose as many visuals as possible, but the old "all" mode didn't match any existing X visuals to GLX visuals, so normal GL apps didn't work at all. Instead, replace it with a simple combination of the two modes: Create GLX visuals by picking unique FBconfigs with as many features as possible for each X visual in order. Then, for all remaining FBconfigs that are appropriate for display, add a corresponding X and GLX visual. This gets all applications (even ones that aren't smart enough to do FBconfigs) get all the options to get the visual configuration they want. The only potential downside is that the composite ARGB visual is unique and gets a nearly full-featured GLX visual (except that the root visual might have taken the tastiest FBconfig), which means that a dumb compositing manager could waste resources. Write compositing managers using FBconfigs instead, please.
Diffstat (limited to 'hw/xfree86/dixmods')
-rw-r--r--hw/xfree86/dixmods/glxmodule.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/hw/xfree86/dixmods/glxmodule.c b/hw/xfree86/dixmods/glxmodule.c
index f6fda4b07..62a047e26 100644
--- a/hw/xfree86/dixmods/glxmodule.c
+++ b/hw/xfree86/dixmods/glxmodule.c
@@ -101,21 +101,6 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin)
GlxPushProvider(provider);
}
- switch (xf86Info.glxVisuals) {
- case XF86_GlxVisualsMinimal:
- GlxSetVisualConfig(GLX_MINIMAL_VISUALS);
- xf86Msg(xf86Info.aiglxFrom, "Exporting only minimal set of GLX visuals\n");
- break;
- case XF86_GlxVisualsTypical:
- GlxSetVisualConfig(GLX_TYPICAL_VISUALS);
- xf86Msg(xf86Info.aiglxFrom, "Exporting typical set of GLX visuals\n");
- break;
- case XF86_GlxVisualsAll:
- GlxSetVisualConfig(GLX_ALL_VISUALS);
- xf86Msg(xf86Info.aiglxFrom, "Exporting all GLX visuals\n");
- break;
- }
-
LoadExtension(&GLXExt, FALSE);
return module;