diff options
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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: { |