From eec04d76a39a7334de4e00ef9f0f6e44c92b3d91 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 fc902729d..a97d027a8 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;