diff options
author | Ilia Mirkin <[email protected]> | 2014-06-27 21:55:16 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-07-01 11:34:40 -0400 |
commit | e5cdbdecd262dfc405f1f09e7a1b272778f61f33 (patch) | |
tree | 1a2e09954ee10b2a85dc09961878005483e933d4 /src/gallium | |
parent | 40b8aec25128e1f4712babddafe2d7515085d4ca (diff) |
nvc0/ir: avoid creating restarts with non-0 stream
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-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: { |