summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_codegen.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-01-28 12:49:47 -0700
committerBrian <[email protected]>2007-01-28 12:49:47 -0700
commit4de6fac4daecac25bb3f4339610312022b457b46 (patch)
tree5b05109132bca7c6a9ede0fe80da0d3ed70e8c06 /src/mesa/shader/slang/slang_codegen.c
parent602dc1a63888af10b2ae491bdbb3afcb28004770 (diff)
Lots of vartable clean-ups, fixes. Report an error message when we run out
of registers, rather than crash.
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index ff42db9def5..3dc4fb36e71 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2141,13 +2141,13 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper)
{
slang_ir_node *n;
- A->vartable = _slang_push_var_table(A->vartable);
+ _slang_push_var_table(A->vartable);
oper->type = slang_oper_block_no_new_scope; /* temp change */
n = _slang_gen_operation(A, oper);
oper->type = slang_oper_block_new_scope; /* restore */
- A->vartable = _slang_pop_var_table(A->vartable);
+ _slang_pop_var_table(A->vartable);
if (n)
n = new_node(IR_SCOPE, n, NULL);
@@ -2640,7 +2640,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun)
A->CurFunction->end_label = slang_atom_pool_gen(A->atoms, "__endOfFunc_main_");
/* push new vartable scope */
- A->vartable = _slang_push_var_table(A->vartable);
+ _slang_push_var_table(A->vartable);
/* Generate IR tree for the function body code */
n = _slang_gen_operation(A, fun->body);
@@ -2648,7 +2648,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun)
n = new_node(IR_SCOPE, n, NULL);
/* pop vartable, restore previous */
- A->vartable = _slang_pop_var_table(A->vartable);
+ _slang_pop_var_table(A->vartable);
if (!n) {
/* XXX record error */