mesa: glsl: stop code emit after error is recorded
authorBrian Paul <brian.paul@tungstengraphics.com>
Mon, 4 Aug 2008 19:05:49 +0000 (13:05 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Mon, 4 Aug 2008 23:14:48 +0000 (17:14 -0600)
src/mesa/shader/slang/slang_emit.c

index 3d76c80b584393060ef80def33d09ac581530e5b..323fc511a6e615de24166186ed8e5759f6bfb92f 100644 (file)
@@ -1633,12 +1633,18 @@ emit(slang_emit_info *emitInfo, slang_ir_node *n)
    if (!n)
       return NULL;
 
+   if (emitInfo->log->error_flag) {
+      return NULL;
+   }
+
    switch (n->Opcode) {
    case IR_SEQ:
       /* sequence of two sub-trees */
       assert(n->Children[0]);
       assert(n->Children[1]);
       emit(emitInfo, n->Children[0]);
+      if (emitInfo->log->error_flag)
+         return NULL;
       inst = emit(emitInfo, n->Children[1]);
 #if 0
       assert(!n->Store);