summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-04-23 13:37:47 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-23 13:37:47 -0700
commit6aeada79662aa8a0c613158667dad66a6deb02a4 (patch)
tree386b356644f918eb53544885b158dbcfe816e4d6
parenteb56cea3b3011f46453d4bb7d06de2e9f6b12232 (diff)
Zero-out the entire parser state structure at initialization
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
-rw-r--r--glsl_parser_extras.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/glsl_parser_extras.cpp b/glsl_parser_extras.cpp
index 1f74cbb39d..c808052ee7 100644
--- a/glsl_parser_extras.cpp
+++ b/glsl_parser_extras.cpp
@@ -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;