summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-08 14:48:34 -0700
committerBrian <[email protected]>2007-03-08 14:48:34 -0700
commitee931f8d4de7c3f04ea80cfaa556d1058942e523 (patch)
tree2e7c32847e5158d0eab0b957994ca93b982354b9 /src/mesa
parentec89aba7c6de29e1dc24b04740b0716e18028b12 (diff)
; and {} statements were broken
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index de78c2b8c77..5da98550dca 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2260,7 +2260,10 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper)
#endif
return tree;
}
- break;
+ else {
+ return new_node0(IR_NOP);
+ }
+
case SLANG_OPER_EXPRESSION:
return _slang_gen_operation(A, &oper->children[0]);
@@ -2485,9 +2488,9 @@ _slang_gen_operation(slang_assemble_ctx * A, slang_operation *oper)
}
case SLANG_OPER_NONE:
- return NULL;
case SLANG_OPER_VOID:
- return NULL;
+ /* returning NULL here would generate an error */
+ return new_node0(IR_NOP);
default:
printf("Unhandled node type %d\n", oper->type);