summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_emit.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-24 17:49:33 -0600
committerBrian Paul <[email protected]>2008-07-29 17:25:44 -0600
commit1b465f287fd26d14797eca7c7a3f6cd339923e00 (patch)
tree02b76c627b80dcd37dade41bbfcc1b41db556384 /src/mesa/shader/slang/slang_emit.c
parent16dc993d4f01f6882933953115abc6ec7d93ba0b (diff)
mesa: glsl: additional error detection
Plus begin some fixes for vec/matrix constructors.
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r--src/mesa/shader/slang/slang_emit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 1f4d962bdf6..9bff055ad56 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -625,7 +625,11 @@ emit_compare(slang_emit_info *emitInfo, slang_ir_node *n)
emit(emitInfo, n->Children[0]);
emit(emitInfo, n->Children[1]);
- assert(n->Children[0]->Store->Size == n->Children[1]->Store->Size);
+ if (n->Children[0]->Store->Size != n->Children[1]->Store->Size) {
+ slang_info_log_error(emitInfo->log, "invalid operands to == or !=");
+ return NULL;
+ }
+
size = n->Children[0]->Store->Size;
if (size == 1) {