From 96a28e9c914d7ae9b269f73a27b99cbd3c465ac8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 6 Mar 2014 18:50:07 -0800 Subject: [PATCH] glx: Clear new FBConfig attributes to 0 by default. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Michel Dänzer --- glx/glxdricommon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c index 69d4b297e..62cce131d 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;