summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-18 14:11:38 -0600
committerBrian Paul <brianp@vmware.com>2009-06-18 14:11:38 -0600
commit99daeea9e93bf14ffef60dddf5f5d05489837c2f (patch)
tree5fff1c30d9489cce27c1152470839c029a2074e0
parent228cd062b3e82031aaf3a09cae579e4d92f85e96 (diff)
glsl: added slang_assemble_ctx::EmitContReturn field, init
-rw-r--r--src/mesa/shader/slang/slang_codegen.h1
-rw-r--r--src/mesa/shader/slang/slang_compile.c3
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 ce6cc7cb8f..bb736585aa 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 d7ad879e97..c1b97c7cb7 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 */