diff options
author | Timothy Arceri <[email protected]> | 2018-01-19 16:30:37 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-23 09:30:00 +1100 |
commit | 324d2fe6a754e84df79db75cdbc3a8c4c32a7279 (patch) | |
tree | c85215f9440a52c8cdb450ed2c6f0f8a2159be56 /src/amd/common | |
parent | 271067967ae24d0fc6deb96821824b2fc19cf2c8 (diff) |
ac: fix emit vertex stream parameter
Fixes the following piglit test on radeonsi:
./bin/arb_enhanced_layouts-gs-stream-location-aliasing
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index b90c31320c0..53f5782eac5 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4162,6 +4162,8 @@ visit_emit_vertex(struct ac_shader_abi *abi, unsigned stream, LLVMValueRef *addr int idx; struct nir_to_llvm_context *ctx = nir_to_llvm_context_from_abi(abi); + assert(stream == 0); + /* Write vertex attribute values to GSVS ring */ gs_next_vertex = LLVMBuildLoad(ctx->builder, ctx->gs_next_vertex, @@ -4468,8 +4470,7 @@ static void visit_intrinsic(struct ac_nir_context *ctx, result = visit_interp(ctx->nctx, instr); break; case nir_intrinsic_emit_vertex: - assert(instr->const_index[0] == 0); - ctx->abi->emit_vertex(ctx->abi, 0, ctx->outputs); + ctx->abi->emit_vertex(ctx->abi, nir_intrinsic_stream_id(instr), ctx->outputs); break; case nir_intrinsic_end_primitive: ctx->abi->emit_primitive(ctx->abi, nir_intrinsic_stream_id(instr)); |