diff options
author | Zou Nan hai <nanhai.zou@intel.com> | 2007-07-04 10:52:35 +0800 |
---|---|---|
committer | Zou Nan hai <nanhai.zou@intel.com> | 2007-07-04 10:52:35 +0800 |
commit | fb9ee9b323bff93973a39560b2bc007aace4bddd (patch) | |
tree | 05e1e72e8f4d321cde2c48b8518e6d9736c680dd /src/mesa/shader/slang/slang_ir.c | |
parent | 285b326c606e9b2f90e4fe177b15b3fa23239b86 (diff) | |
parent | 7ff4359a3be1278b26950f96ab23014a667af838 (diff) |
Merge branch 'master' of git+ssh://znh@git.freedesktop.org/git/mesa/mesa into 965-glsl
Diffstat (limited to 'src/mesa/shader/slang/slang_ir.c')
-rw-r--r-- | src/mesa/shader/slang/slang_ir.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 0c2e65ab5e..a6903cc8b6 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -26,6 +26,7 @@ #include "imports.h" #include "context.h" #include "slang_ir.h" +#include "slang_mem.h" #include "prog_print.h" @@ -62,7 +63,7 @@ static const slang_ir_info IrInfo[] = { { IR_ABS, "IR_ABS", OPCODE_ABS, 4, 1 }, { IR_NEG, "IR_NEG", OPCODE_NOP, 4, 1 }, /* special case: emit_negation() */ { IR_DDX, "IR_DDX", OPCODE_DDX, 4, 1 }, - { IR_DDX, "IR_DDY", OPCODE_DDX, 4, 1 }, + { IR_DDY, "IR_DDY", OPCODE_DDY, 4, 1 }, { IR_SIN, "IR_SIN", OPCODE_SIN, 1, 1 }, { IR_COS, "IR_COS", OPCODE_COS, 1, 1 }, { IR_NOISE1, "IR_NOISE1", OPCODE_NOISE1, 1, 1 }, @@ -113,6 +114,7 @@ _slang_ir_name(slang_ir_opcode opcode) } +#if 0 /* no longer needed with mempool */ /** * Since many IR nodes might point to the same IR storage info, we need * to be careful when deleting things. @@ -131,6 +133,7 @@ _slang_refcount_storage(slang_ir_node *n) for (i = 0; i < 3; i++) _slang_refcount_storage(n->Children[i]); } +#endif static void @@ -140,20 +143,20 @@ _slang_free_ir(slang_ir_node *n) if (!n) return; +#if 0 if (n->Store) { n->Store->RefCount--; if (n->Store->RefCount == 0) { -#if 0 - free(n->Store); -#endif + _slang_free(n->Store); n->Store = NULL; } } +#endif for (i = 0; i < 3; i++) _slang_free_ir(n->Children[i]); /* Do not free n->List since it's a child elsewhere */ - free(n); + _slang_free(n); } @@ -163,7 +166,9 @@ _slang_free_ir(slang_ir_node *n) void _slang_free_ir_tree(slang_ir_node *n) { +#if 0 _slang_refcount_storage(n); +#endif _slang_free_ir(n); } |