[Mesa-dev] [PATCH] glsl: initialise const force glsl extension warning in fake ctx

Dave Airlie airlied at gmail.com
Tue Mar 13 07:53:25 PDT 2012


From: Dave Airlie <airlied at redhat.com>

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 at redhat.com>
---
 src/glsl/builtins/tools/generate_builtins.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 72d12bb..bd15c4d 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -156,6 +156,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
    fakeCtx.API = API_OPENGL;
    fakeCtx.Const.GLSLVersion = 130;
    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);
-- 
1.7.7.6



More information about the mesa-dev mailing list