Zero-out the entire parser state structure at initialization
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 23 Apr 2010 20:37:47 +0000 (13:37 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 23 Apr 2010 20:37:47 +0000 (13:37 -0700)
Among other things, this ensures that all of the extension flags are
initially disabled.

This causes the following tests to pass:

    glslparsertest/glsl2/draw_buffers-02.frag

glsl_parser_extras.cpp

index 1f74cbb..c808052 100644 (file)
@@ -719,6 +719,8 @@ main(int argc, char **argv)
       return EXIT_FAILURE;
    }
 
+   memset(& state, 0, sizeof(state));
+
    switch (argv[1][0]) {
    case 'v':
       state.target = vertex_shader;