glx: Clear new FBConfig attributes to 0 by default.
authorEric Anholt <eric@anholt.net>
Fri, 7 Mar 2014 02:50:07 +0000 (18:50 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 10 Mar 2014 20:57:21 +0000 (13:57 -0700)
The visualSelectGroup wasn't getting set (since our DRI drivers don't
use it), and and since it's the top priority in the sort order, you
got random sorting of your visuals unless malloc really returned you
new memory.  This manifested as Xephyr -glamor rendering to a
multisampled window on my system, which as you might guess was
slightly lower performance than expected.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
glx/glxdricommon.c

index 69d4b29..62cce13 100644 (file)
@@ -132,7 +132,7 @@ createModeFromConfig(const __DRIcoreExtension * core,
     unsigned int attrib, value;
     int i;
 
-    config = malloc(sizeof *config);
+    config = calloc(1, sizeof *config);
 
     config->driConfig = driConfig;