diff options
author | Michal Krol <mjkrol@gmail.org> | 2006-02-13 11:38:37 +0000 |
---|---|---|
committer | Michal Krol <mjkrol@gmail.org> | 2006-02-13 11:38:37 +0000 |
commit | 02eb9acc5e4307db09662592951ef44319a0cda5 (patch) | |
tree | 585a539ed6d6775801dcc9e685759521680da9f9 /src/mesa/shader/slang/slang_compile_operation.c | |
parent | 44e9ccc708bb0a92dfeaf038ded60295dfe2d3ae (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_operation.c')
-rw-r--r-- | src/mesa/shader/slang/slang_compile_operation.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index f6d371a44b..6783f1dc78 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -31,9 +31,7 @@ #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"
/* slang_operation */
@@ -43,7 +41,7 @@ int slang_operation_construct (slang_operation *oper) oper->children = NULL;
oper->num_children = 0;
oper->literal = (float) 0;
- oper->identifier = NULL;
+ oper->a_id = SLANG_ATOM_NULL;
oper->locals = (slang_variable_scope *) slang_alloc_malloc (sizeof (slang_variable_scope));
if (oper->locals == NULL)
return 0;
@@ -62,7 +60,6 @@ void slang_operation_destruct (slang_operation *oper) for (i = 0; i < oper->num_children; i++)
slang_operation_destruct (oper->children + i);
slang_alloc_free (oper->children);
- slang_alloc_free (oper->identifier);
slang_variable_scope_destruct (oper->locals);
slang_alloc_free (oper->locals);
}
@@ -94,15 +91,7 @@ int slang_operation_copy (slang_operation *x, const slang_operation *y) return 0;
}
z.literal = y->literal;
- if (y->identifier != NULL)
- {
- z.identifier = slang_string_duplicate (y->identifier);
- if (z.identifier == NULL)
- {
- slang_operation_destruct (&z);
- return 0;
- }
- }
+ z.a_id = y->a_id;
if (!slang_variable_scope_copy (z.locals, y->locals))
{
slang_operation_destruct (&z);
|