glsl: added slang_assemble_ctx::EmitContReturn field, init

This commit is contained in:
Brian Paul
2009-06-18 14:11:38 -06:00
parent eb1eee03a6
commit c20bb48d3a
2 changed files with 4 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ typedef struct slang_assemble_ctx_
struct slang_ir_node_ *CurLoop; struct slang_ir_node_ *CurLoop;
struct slang_function_ *CurFunction; struct slang_function_ *CurFunction;
GLboolean UnresolvedRefs; GLboolean UnresolvedRefs;
GLboolean EmitContReturn;
} slang_assemble_ctx; } slang_assemble_ctx;

View File

@@ -1953,6 +1953,7 @@ static int
parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O, parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O,
const slang_fully_specified_type * type) const slang_fully_specified_type * type)
{ {
GET_CURRENT_CONTEXT(ctx); /* a hack */
slang_variable *var; slang_variable *var;
slang_atom a_name; slang_atom a_name;
@@ -2066,6 +2067,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O,
A.vartable = O->vartable; A.vartable = O->vartable;
A.log = C->L; A.log = C->L;
A.curFuncEndLabel = NULL; A.curFuncEndLabel = NULL;
A.EmitContReturn = ctx->Shader.EmitContReturn;
if (!_slang_codegen_global_variable(&A, var, C->type)) if (!_slang_codegen_global_variable(&A, var, C->type))
RETURN0; RETURN0;
} }
@@ -2430,6 +2432,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
A.program = o.program; A.program = o.program;
A.pragmas = &shader->Pragmas; A.pragmas = &shader->Pragmas;
A.vartable = o.vartable; A.vartable = o.vartable;
A.EmitContReturn = ctx->Shader.EmitContReturn;
A.log = C->L; A.log = C->L;
/* main() takes no parameters */ /* main() takes no parameters */