diff options
author | Brian <brian@yutani.localnet.net> | 2007-02-03 17:24:24 -0700 |
---|---|---|
committer | Brian <brian@yutani.localnet.net> | 2007-02-03 17:24:24 -0700 |
commit | 93b975a1d9fcc4a10987676f7368809522f27d71 (patch) | |
tree | ebf408cfd8fbca10dea39eb594346e4fe03636b9 /src/mesa/shader/slang/slang_compile_operation.c | |
parent | 5ee684cba9b1f63090e184125e5890da4fc1d28c (diff) |
Add literal_size field to slang_operation.
Used to track the number of components in a float/int/bool literal.
Helps with some typechecking things.
Fixes problems with calls such as "distance(v2, vec2(1.0, 2.0))"
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_operation.c')
-rw-r--r-- | src/mesa/shader/slang/slang_compile_operation.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c index c16ec7f807..51a64ca30b 100644 --- a/src/mesa/shader/slang/slang_compile_operation.c +++ b/src/mesa/shader/slang/slang_compile_operation.c @@ -60,6 +60,7 @@ 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); + /*#define FREE_MEMORY*/ #ifdef FREE_MEMORY /* XXX revisit and fix memory coruption here ! */ slang_variable_scope_destruct(oper->locals); @@ -106,6 +107,7 @@ slang_operation_copy(slang_operation * x, const slang_operation * y) z.literal[1] = y->literal[1]; z.literal[2] = y->literal[2]; z.literal[3] = y->literal[3]; + z.literal_size = y->literal_size; z.a_id = y->a_id; if (y->locals) { if (!slang_variable_scope_copy(z.locals, y->locals)) { |