Mesa (master): Fix __glXInitializeVisualConfigFromTags' s handling of unrecognized fbconfig tags.

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


Module: Mesa
Branch: master
Commit: ad7d36e91933a49ce3f6ed2c14ae585a8a84fdf5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad7d36e91933a49ce3f6ed2c14ae585a8a84fdf5

Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Apr 22 09:30:42 2010 -0700

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

---

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

diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 5289354..6d6f89e 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -539,6 +539,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