[PATCH] glx: Clear new FBConfig attributes to 0 by default.

Eric Anholt eric at anholt.net
Thu Mar 6 19:07:23 PST 2014


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 at anholt.net>
---
 glx/glxdricommon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
index 69d4b29..62cce13 100644
--- a/glx/glxdricommon.c
+++ b/glx/glxdricommon.c
@@ -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;
 
-- 
1.9.0



More information about the xorg-devel mailing list