diff options
author | Brian Paul <[email protected]> | 2008-07-24 17:49:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-07-25 08:26:53 -0600 |
commit | 03de81aea1c02d8b29784950a456e43b4fc9d538 (patch) | |
tree | 42cfcb2601ac00deb2e0ab70ca405af623c91528 /src/mesa/shader/slang/slang_emit.c | |
parent | 2acf917f00b570274b58ad7e58688715730253d0 (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.c | 6 |
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) { |