glsl: initialise const force glsl extension warning in fake ctx
authorDave Airlie <airlied@redhat.com>
Tue, 13 Mar 2012 14:53:25 +0000 (14:53 +0000)
committerDave Airlie <airlied@redhat.com>
Sun, 25 Mar 2012 16:12:24 +0000 (17:12 +0100)
valgrind complained about an uninitialised value being used in
glsl_parser_extras.cpp, and this was the one it was giving out about.

Just initialise the value in the fakectx.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/glsl/builtins/tools/generate_builtins.py

index 9c1aeb562424b933fd862276b7fab46ae8a83dc1..0d97140174fa263f17db16845aa77ad457e4cb0a 100755 (executable)
@@ -164,6 +164,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
    fakeCtx.API = API_OPENGL;
    fakeCtx.Const.GLSLVersion = 140;
    fakeCtx.Extensions.ARB_ES2_compatibility = true;
+   fakeCtx.Const.ForceGLSLExtensionsWarn = false;
    gl_shader *sh = _mesa_new_shader(NULL, 0, target);
    struct _mesa_glsl_parse_state *st =
       new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);