From 1b465f287fd26d14797eca7c7a3f6cd339923e00 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 24 Jul 2008 17:49:33 -0600 Subject: mesa: glsl: additional error detection Plus begin some fixes for vec/matrix constructors. --- src/mesa/shader/slang/slang_emit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/shader/slang/slang_emit.c') 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) { -- cgit v1.2.3