summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_codegen.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-04-21 12:29:46 -0600
committerBrian <brian@yutani.localnet.net>2007-04-21 12:30:58 -0600
commite261d66d81d47c4a2380ffcb7b39164b8e191168 (patch)
tree311b36ca6bd99a64ebdc88fb444cd19714988e56 /src/mesa/shader/slang/slang_codegen.c
parentcd3e39340f057712fcf02a35dff85645e475053a (diff)
Remove all the USE_MEMPOOL debug code.
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c47
1 files changed, 6 insertions, 41 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 71ef132e38..ba97d6257b 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -460,11 +460,7 @@ static slang_ir_node *
new_node3(slang_ir_opcode op,
slang_ir_node *c0, slang_ir_node *c1, slang_ir_node *c2)
{
-#if USE_MEMPOOL
slang_ir_node *n = (slang_ir_node *) _slang_alloc(sizeof(slang_ir_node));
-#else
- slang_ir_node *n = (slang_ir_node *) calloc(1, sizeof(slang_ir_node));
-#endif
if (n) {
n->Opcode = op;
n->Children[0] = c0;
@@ -927,21 +923,12 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun,
assert(fun->param_count == totalArgs);
/* allocate temporary arrays */
-#if USE_MEMPOOL
paramMode = (ParamMode *)
_slang_alloc(totalArgs * sizeof(ParamMode));
substOld = (slang_variable **)
_slang_alloc(totalArgs * sizeof(slang_variable *));
substNew = (slang_operation **)
_slang_alloc(totalArgs * sizeof(slang_operation *));
-#else
- paramMode = (ParamMode *)
- _mesa_calloc(totalArgs * sizeof(ParamMode));
- substOld = (slang_variable **)
- _mesa_calloc(totalArgs * sizeof(slang_variable *));
- substNew = (slang_operation **)
- _mesa_calloc(totalArgs * sizeof(slang_operation *));
-#endif
#if 0
printf("Inline call to %s (total vars=%d nparams=%d)\n",
@@ -1142,11 +1129,9 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun,
}
}
-#if !USE_MEMPOOL
- _mesa_free(paramMode);
- _mesa_free(substOld);
- _mesa_free(substNew);
-#endif
+ _slang_free(paramMode);
+ _slang_free(substOld);
+ _slang_free(substNew);
#if 0
printf("Done Inline call to %s (total vars=%d nparams=%d)\n",
@@ -1204,9 +1189,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun,
/* Replace the function call with the inlined block */
slang_operation_destruct(oper);
*oper = *inlined;
-#if !USE_MEMPOOL
- _mesa_free(inlined);
-#endif
+ _slang_free(inlined);
#if 0
assert(inlined->locals);
@@ -1336,9 +1319,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper,
n->Store = n0->Store;
n->Writemask = writemask;
-#if !USE_MEMPOOL
- free(n0);
-#endif
+ _slang_free(n0);
}
return n;
@@ -1779,11 +1760,9 @@ _slang_gen_temporary(GLint size)
if (n) {
n->Store = store;
}
-#if !USE_MEMPOOL
else {
- free(store);
+ _slang_free(store);
}
-#endif
}
return n;
}
@@ -1892,13 +1871,6 @@ _slang_gen_logical_and(slang_assemble_ctx *A, slang_operation *oper)
select->children[2].literal_size = 1;
n = _slang_gen_select(A, select);
-
-#if !USE_MEMPOOL
- /* xxx wrong */
- free(select->children);
- free(select);
-#endif
-
return n;
}
@@ -1925,13 +1897,6 @@ _slang_gen_logical_or(slang_assemble_ctx *A, slang_operation *oper)
slang_operation_copy(&select->children[2], &oper->children[1]);
n = _slang_gen_select(A, select);
-
-#if !USE_MEMPOOL
- /* xxx wrong */
- free(select->children);
- free(select);
-#endif
-
return n;
}