From 593073a3b39486398f245800633d6eeaf7989f5c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 12 Dec 2008 09:56:13 -0700 Subject: mesa: checkpoint: GLSL 1.20 array constructors (cherry picked from commit ade777ea1b62e2280c9f05fa09927a8f9bb63f4f) --- src/mesa/shader/slang/slang_compile_function.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/mesa/shader/slang/slang_compile_function.c') 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 */ -- cgit v1.2.3