diff options
author | Alan Hourihane <[email protected]> | 2009-03-19 22:38:01 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2009-03-19 22:38:01 +0000 |
commit | 114bb54324f22cb53bcd14607234d0acd74d37bd (patch) | |
tree | 762fa5542d2cc0fa62435bd5a8e15795ebf32af6 /src/mesa/shader | |
parent | e3aedec86808490fbb5a966b1e4dc15bff046f13 (diff) |
slang: initialize the context
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index aa080228694..fb7128841c4 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -2056,6 +2056,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, /* emit code for global var decl */ if (C->global_scope) { slang_assemble_ctx A; + memset(&A, 0, sizeof(slang_assemble_ctx)); A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2073,7 +2074,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, if (C->global_scope) { if (var->initializer != NULL) { slang_assemble_ctx A; - + memset(&A, 0, sizeof(slang_assemble_ctx)); A.atoms = C->atoms; A.space.funcs = O->funs; A.space.structs = O->structs; @@ -2415,7 +2416,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, if (mainFunc) { /* assemble (generate code) for main() */ slang_assemble_ctx A; - + memset(&A, 0, sizeof(slang_assemble_ctx)); A.atoms = C->atoms; A.space.funcs = o.funs; A.space.structs = o.structs; |