Mesa (mesa_7_7_branch): Fix __glXInitializeVisualConfigFromTags' s handling of unrecognized fbconfig

Ian Romanick idr at kemper.freedesktop.org
Fri Apr 23 18:57:10 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 942ec8722d4d903820a5c9b0720f9aff0f938888
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=942ec8722d4d903820a5c9b0720f9aff0f938888

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Fri Apr 23 11:53:50 2010 -0700

Fix __glXInitializeVisualConfigFromTags's handling of unrecognized fbconfig

__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 <aplattner at nvidia.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>

---

 src/glx/x11/glxext.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 5633a3e..bdc6e31 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -442,6 +442,8 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count,
          i = count;
          break;
       default:
+         /* Ignore the unrecognized tag's value */
+         bp++;
          break;
       }
    }




More information about the mesa-commit mailing list