summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_function.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-12-12 09:56:13 -0700
committerBrian Paul <brianp@vmware.com>2009-01-06 09:08:35 -0700
commit593073a3b39486398f245800633d6eeaf7989f5c (patch)
treedfbf97691efc64f59ed5d85da1790697bf12ce1d /src/mesa/shader/slang/slang_compile_function.c
parent0d293f66877486a37682bd0537ea1d3c5fc126db (diff)
mesa: checkpoint: GLSL 1.20 array constructors
(cherry picked from commit ade777ea1b62e2280c9f05fa09927a8f9bb63f4f)
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_function.c')
-rw-r--r--src/mesa/shader/slang/slang_compile_function.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c
index 8405d7f778..bc926e6c0e 100644
--- a/src/mesa/shader/slang/slang_compile_function.c
+++ b/src/mesa/shader/slang/slang_compile_function.c
@@ -86,8 +86,8 @@ slang_function_construct(slang_function * func)
_slang_variable_scope_ctr(func->parameters);
func->param_count = 0;
func->body = NULL;
- func->address = ~0;
- slang_fixup_table_init(&func->fixups);
+ //func->address = ~0;
+ //slang_fixup_table_init(&func->fixups);
return 1;
}
@@ -101,9 +101,23 @@ slang_function_destruct(slang_function * func)
slang_operation_destruct(func->body);
_slang_free(func->body);
}
- slang_fixup_table_free(&func->fixups);
+ //slang_fixup_table_free(&func->fixups);
}
+
+slang_function *
+slang_new_function(slang_function_kind kind)
+{
+ slang_function *fun = (slang_function *)
+ _mesa_malloc(sizeof(slang_function));
+ if (fun) {
+ slang_function_construct(fun);
+ fun->kind = kind;
+ }
+ return fun;
+}
+
+
/*
* slang_function_scope
*/