diff options
author | Brian <[email protected]> | 2007-03-07 12:59:01 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-07 12:59:01 -0700 |
commit | 35d25c0ce4104d41feead679573543427f99a031 (patch) | |
tree | 7165ff01cef64558b5a215105756c6957aa87e07 /src/mesa/shader/slang/slang_emit.c | |
parent | 5b5a80d011d143f1bbd9be39dc4ca6a0af4bad7c (diff) |
Fix problem with nested function calls such as y = f(f(x))
Replace CurFunction with curFuncEndLabel.
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r-- | src/mesa/shader/slang/slang_emit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 9532e070f78..55338d64596 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -899,6 +899,8 @@ static struct prog_instruction * emit_jump(slang_emit_info *emitInfo, slang_ir_node *n) { struct prog_instruction *inst; + assert(n); + assert(n->Label); inst = new_instruction(emitInfo, OPCODE_BRA); inst->DstReg.CondMask = COND_TR; /* always branch */ inst->BranchTarget = _slang_label_get_location(n->Label); @@ -1557,6 +1559,8 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n) case IR_LABEL: return emit_label(emitInfo, n); case IR_JUMP: + assert(n); + assert(n->Label); return emit_jump(emitInfo, n); case IR_CJUMP0: return emit_cjump(emitInfo, n, 0); |