Mesa (7.9): glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.

Ian Romanick idr at kemper.freedesktop.org
Tue Mar 1 00:04:39 UTC 2011


Module: Mesa
Branch: 7.9
Commit: 2eb481693946ab61518203166f09955cbde20fcd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2eb481693946ab61518203166f09955cbde20fcd

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Feb  1 23:47:26 2011 -0800

glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.

This has probably existed since e5e34ab18eeaffa465 or so.

NOTE: This is a candidate for the 7.9 and 7.10 branches.
(cherry picked from commit dfdb9fda826bb6c5dac2c55d9efcd1644a0dd2b9)

---

 src/glsl/builtins/tools/generate_builtins.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index 6b55d4f..f1807cb 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -142,6 +142,8 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
 {
    GLcontext fakeCtx;
    fakeCtx.API = API_OPENGL;
+   fakeCtx.Const.GLSLVersion = 130;
+   fakeCtx.Extensions.ARB_ES2_compatibility = true;
    gl_shader *sh = _mesa_new_shader(NULL, 0, target);
    struct _mesa_glsl_parse_state *st =
       new(sh) _mesa_glsl_parse_state(&fakeCtx, target, sh);




More information about the mesa-commit mailing list