aboutsummaryrefslogtreecommitdiffstats
path: root/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2010-04-23 13:37:47 -0700
committerIan Romanick <[email protected]>2010-04-23 13:37:47 -0700
commit6aeada79662aa8a0c613158667dad66a6deb02a4 (patch)
tree386b356644f918eb53544885b158dbcfe816e4d6 /glsl_parser_extras.cpp
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
Diffstat (limited to 'glsl_parser_extras.cpp')
-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 1f74cbb39dc..c808052ee78 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;