summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile_operation.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-03-07 11:26:47 -0700
committerBrian <brian@yutani.localnet.net>2007-03-07 11:26:47 -0700
commit5b5a80d011d143f1bbd9be39dc4ca6a0af4bad7c (patch)
treeafd256ae5d4dadda81c54547e08ac5de50c04b7d /src/mesa/shader/slang/slang_compile_operation.c
parentab673c852724e81365ab9d979881da7464131854 (diff)
s/equal/EQUAL/, fix bugs in logical or/and code.
Diffstat (limited to 'src/mesa/shader/slang/slang_compile_operation.c')
-rw-r--r--src/mesa/shader/slang/slang_compile_operation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile_operation.c b/src/mesa/shader/slang/slang_compile_operation.c
index aa66be8895..cf82080066 100644
--- a/src/mesa/shader/slang/slang_compile_operation.c
+++ b/src/mesa/shader/slang/slang_compile_operation.c
@@ -42,6 +42,7 @@ slang_operation_construct(slang_operation * oper)
oper->children = NULL;
oper->num_children = 0;
oper->literal[0] = 0.0;
+ oper->literal_size = 1;
oper->a_id = SLANG_ATOM_NULL;
oper->locals = _slang_variable_scope_new(NULL);
if (oper->locals == NULL)
@@ -104,6 +105,8 @@ slang_operation_copy(slang_operation * x, const slang_operation * y)
z.literal[2] = y->literal[2];
z.literal[3] = y->literal[3];
z.literal_size = y->literal_size;
+ assert(y->literal_size >= 1);
+ assert(y->literal_size <= 4);
z.a_id = y->a_id;
if (y->locals) {
if (!slang_variable_scope_copy(z.locals, y->locals)) {