From: Brian Paul Date: Mon, 4 Aug 2008 19:05:49 +0000 (-0600) Subject: mesa: glsl: stop code emit after error is recorded X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=02d223a7812c5cdf4bac5a83a8c9ce94a88fdba1;p=mesa.git mesa: glsl: stop code emit after error is recorded --- diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 3d76c80b584..323fc511a6e 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -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);