From 63a6fd6603574c1c01324fbeb0863e39d3864c16 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Tue, 6 Dec 2011 10:20:30 -0800 Subject: glx: Fix indirect fallback when a non-Mesa GLX extension is present. When driCreateScreen calls driConvertConfigs to try to convert the configs for swrast, it fails and returns NULL. Instead of checking, it just clobbers psc->base.configs. Then, when the application asks for the FBconfigs, there aren't any. Instead, make the caller responsible for freeing the old modes lists if both calls to driConvertConfigs succeed. Without the second fix, glxinfo fails unless you run it with LIBGL_ALWAYS_INDIRECT: $ glxinfo name of display: :0.0 Error: couldn't find RGB GLX visual or fbconfig $ LIBGL_ALWAYS_INDIRECT=1 glxinfo name of display: :0.0 display: :0 screen: 0 direct rendering: No (LIBGL_ALWAYS_INDIRECT set) server glx vendor string: NVIDIA Corporation server glx version string: 1.4 [...] Signed-off-by: Aaron Plattner Reviewed-and-tested-by: Ian Romanick Signed-off-by: Brian Paul --- src/glx/dri_common.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/glx/dri_common.c') diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index eb62c824f35..1482b88bd93 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -340,8 +340,6 @@ driConvertConfigs(const __DRIcoreExtension * core, tail = tail->next; } - glx_config_destroy_list(configs); - return head.next; } -- cgit v1.2.3