From: Ilia Mirkin Date: Sat, 28 Jun 2014 01:55:16 +0000 (-0400) Subject: nvc0/ir: avoid creating restarts with non-0 stream X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5cdbdecd262dfc405f1f09e7a1b272778f61f33;p=mesa.git nvc0/ir: avoid creating restarts with non-0 stream Signed-off-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index 2ba3c1c8e0f..9b7c49000a4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -2546,11 +2546,15 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) } /* fallthrough */ case TGSI_OPCODE_ENDPRIM: - // get vertex stream if specified (must be immediate) - src0 = tgsi.srcCount() ? - mkImm(tgsi.getSrc(0).getValueU32(0, info)) : zero; + { + // get vertex stream (must be immediate) + unsigned int stream = tgsi.getSrc(0).getValueU32(0, info); + if (stream && op == OP_RESTART) + break; + src0 = mkImm(stream); mkOp1(op, TYPE_U32, NULL, src0)->fixed = 1; break; + } case TGSI_OPCODE_IF: case TGSI_OPCODE_UIF: {