summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-19 08:33:03 +1100
committerTimothy Arceri <[email protected]>2018-01-23 09:18:36 +1100
commitfdc2fb4d88377213991c70dbcfafb70004912515 (patch)
treecc8e44bcac11f29021d6ad940a92c7a9c1b6a786
parent6bf1c93fe07603b3bcc9de88ce92cec61954bb4a (diff)
ac: add stream handling to visit_end_primitive()
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/amd/common/ac_nir_to_llvm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 82f29c05880..76edb8d06a3 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4207,10 +4207,9 @@ visit_emit_vertex(struct ac_shader_abi *abi, unsigned stream, LLVMValueRef *addr
}
static void
-visit_end_primitive(struct nir_to_llvm_context *ctx,
- const nir_intrinsic_instr *instr)
+visit_end_primitive(struct nir_to_llvm_context *ctx, unsigned stream)
{
- ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_CUT | AC_SENDMSG_GS | (0 << 8), ctx->gs_wave_id);
+ ac_build_sendmsg(&ctx->ac, AC_SENDMSG_GS_OP_CUT | AC_SENDMSG_GS | (stream << 8), ctx->gs_wave_id);
}
static LLVMValueRef
@@ -4458,7 +4457,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx,
ctx->abi->emit_vertex(ctx->abi, 0, ctx->outputs);
break;
case nir_intrinsic_end_primitive:
- visit_end_primitive(ctx->nctx, instr);
+ visit_end_primitive(ctx->nctx, nir_intrinsic_stream_id(instr));
break;
case nir_intrinsic_load_tess_coord: {
LLVMTypeRef type = ctx->nctx ?