diff -up mesa-20080331/src/glx/x11/glxcmds.c~ mesa-20080331/src/glx/x11/glxcmds.c
--- mesa-20080331/src/glx/x11/glxcmds.c~	2008-04-15 09:34:23.000000000 +0200
+++ mesa-20080331/src/glx/x11/glxcmds.c	2008-04-15 09:34:23.000000000 +0200
@@ -1281,6 +1281,14 @@ PUBLIC XVisualInfo *glXChooseVisual(Disp
 	}
     }
 
+    for ( modes = psc->configs ; modes != NULL ; modes = modes->next ) {
+	if ( fbconfigs_compatible( & test_config, modes )
+	     && ((best_config == NULL)
+		 || (fbconfig_compare( (const __GLcontextModes * const * const)&modes, &best_config ) < 0)) ) {
+	    best_config = modes;
+	}
+    }
+
     /*
     ** If no visual is acceptable, return None
     ** Otherwise, create an XVisualInfo list with just the selected X visual