diff options
author | Brian Paul <[email protected]> | 2009-06-18 14:11:38 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-06-26 13:16:32 -0600 |
commit | c20bb48d3a897fd616bf4c7d4eb67ea34475985d (patch) | |
tree | 27d57ac96c2cd8129aa631046c92ef519ac6bf3e /src | |
parent | eb1eee03a6796e0d7651ca77fea0ea705b41d70a (diff) |
glsl: added slang_assemble_ctx::EmitContReturn field, init
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.h | 1 | ||||
-rw-r--r-- | src/mesa/shader/slang/slang_compile.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h index ce6cc7cb8f0..bb736585aa1 100644 --- a/src/mesa/shader/slang/slang_codegen.h +++ b/src/mesa/shader/slang/slang_codegen.h @@ -43,6 +43,7 @@ typedef struct slang_assemble_ctx_ struct slang_ir_node_ *CurLoop; struct slang_function_ *CurFunction; GLboolean UnresolvedRefs; + GLboolean EmitContReturn; } slang_assemble_ctx; diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c index d7ad879e97a..c1b97c7cb70 100644 --- a/src/mesa/shader/slang/slang_compile.c +++ b/src/mesa/shader/slang/slang_compile.c @@ -1953,6 +1953,7 @@ static int parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, const slang_fully_specified_type * type) { + GET_CURRENT_CONTEXT(ctx); /* a hack */ slang_variable *var; slang_atom a_name; @@ -2066,6 +2067,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, A.vartable = O->vartable; A.log = C->L; A.curFuncEndLabel = NULL; + A.EmitContReturn = ctx->Shader.EmitContReturn; if (!_slang_codegen_global_variable(&A, var, C->type)) RETURN0; } @@ -2430,6 +2432,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit, A.program = o.program; A.pragmas = &shader->Pragmas; A.vartable = o.vartable; + A.EmitContReturn = ctx->Shader.EmitContReturn; A.log = C->L; /* main() takes no parameters */ |