summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_function.c
diff options
context:
space:
mode:
authorMichal Krol <mjkrol@gmail.org>2006-02-13 11:38:37 +0000
committerMichal Krol <mjkrol@gmail.org>2006-02-13 11:38:37 +0000
commit02eb9acc5e4307db09662592951ef44319a0cda5 (patch)
tree585a539ed6d6775801dcc9e685759521680da9f9 /src/mesa/shader/slang/slang_compile_function.c
parent44e9ccc708bb0a92dfeaf038ded60295dfe2d3ae (diff)
Get it running for ARB_vertex_shader.
Add experimental print functions to builtin library. Some functionality missing: - automatic arrays; - general constructors; - local variable initialization; - texture sampling and noise; - semantic error checking; - function prototypes.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_function.c')
-rw-r--r--src/mesa/shader/slang/slang_compile_function.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/shader/slang/slang_compile_function.c b/src/mesa/shader/slang/slang_compile_function.c
index 970c6faef0..d62b009e66 100644
--- a/src/mesa/shader/slang/slang_compile_function.c
+++ b/src/mesa/shader/slang/slang_compile_function.c
@@ -31,7 +31,6 @@
#include "imports.h"
#include "slang_utility.h"
#include "slang_compile_variable.h"
-#include "slang_compile_struct.h"
#include "slang_compile_operation.h"
#include "slang_compile_function.h"
@@ -91,15 +90,15 @@ void slang_function_scope_destruct (slang_function_scope *scope)
slang_alloc_free (scope->functions);
}
-int slang_function_scope_find_by_name (slang_function_scope *funcs, const char *name, int all_scopes)
+int slang_function_scope_find_by_name (slang_function_scope *funcs, slang_atom a_name, int all_scopes)
{
unsigned int i;
for (i = 0; i < funcs->num_functions; i++)
- if (slang_string_compare (name, funcs->functions[i].header.name) == 0)
+ if (a_name == funcs->functions[i].header.a_name)
return 1;
if (all_scopes && funcs->outer_scope != NULL)
- return slang_function_scope_find_by_name (funcs->outer_scope, name, 1);
+ return slang_function_scope_find_by_name (funcs->outer_scope, a_name, 1);
return 0;
}
@@ -110,10 +109,10 @@ slang_function *slang_function_scope_find (slang_function_scope *funcs, slang_fu
for (i = 0; i < funcs->num_functions; i++)
{
- slang_function *f = funcs->functions + i;
+ slang_function *f = &funcs->functions[i];
unsigned int j;
- if (slang_string_compare (fun->header.name, f->header.name) != 0)
+ if (fun->header.a_name != f->header.a_name)
continue;
if (fun->param_count != f->param_count)
continue;