This patch should make invesalius work again (#59269). Note that if you run your apps with LIBGL_DIAGNOSTIC=1 mesa will act as if this patch was not applied (making invesalius crash). It reverts the following commit from mesa 7.8 branch: From ad7d36e91933a49ce3f6ed2c14ae585a8a84fdf5 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Thu, 22 Apr 2010 16:30:42 +0000 Subject: Fix __glXInitializeVisualConfigFromTags's handling of unrecognized fbconfig tags. __glXInitializeVisualConfigFromTags doesn't skip the payload of unrecognized tags. Instead, it treats the value as if it were the next tag, which can happen if the server's GLX extension is not Mesa's. For example, this falls down when NVIDIA sends a GLX_FLOAT_COMPONENTS_NV = 0 pair, causing __glXInitializeVisualConfigFromTags to bail out early. Signed-off-by: Aaron Plattner Signed-off-by: Ian Romanick diff -p -up ./src/glx/glxext.c.orig ./src/glx/glxext.c --- ./src/glx/glxext.c.orig 2010-10-02 00:51:28.000000000 +0200 +++ ./src/glx/glxext.c 2010-10-05 21:04:00.000000000 +0200 @@ -568,9 +568,6 @@ __glXInitializeVisualConfigFromTags(stru long int tagvalue = *bp++; fprintf(stderr, "WARNING: unknown GLX tag from server: " "tag 0x%lx value 0x%lx\n", tag, tagvalue); - } else { - /* Ignore the unrecognized tag's value */ - bp++; } break; }