From b41dd002354af06208056ad435a4ab6f0052b4c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 29 Nov 2016 12:59:48 +0100 Subject: [PATCH] radeonsi: separate the call to si_llvm_emit_streamout from exports MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index abcdeddbf56..758e4185aa2 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2364,10 +2364,6 @@ static void si_llvm_export_vs(struct lp_build_tgsi_context *bld_base, unsigned pos_idx; int i; - if (outputs && ctx->shader->selector->so.num_outputs) { - si_llvm_emit_streamout(ctx, outputs, noutput); - } - for (i = 0; i < noutput; i++) { semantic_name = outputs[i].semantic_name; semantic_index = outputs[i].semantic_index; @@ -2913,6 +2909,8 @@ static void si_llvm_emit_vs_epilogue(struct lp_build_tgsi_context *bld_base) get_primitive_id(bld_base, 0)), VS_EPILOG_PRIMID_LOC, ""); + if (ctx->shader->selector->so.num_outputs) + si_llvm_emit_streamout(ctx, outputs, i); si_llvm_export_vs(bld_base, outputs, i); FREE(outputs); } @@ -6400,6 +6398,8 @@ si_generate_gs_copy_shader(struct si_screen *sscreen, } } + if (gs_selector->so.num_outputs) + si_llvm_emit_streamout(&ctx, outputs, gsinfo->num_outputs); si_llvm_export_vs(bld_base, outputs, gsinfo->num_outputs); LLVMBuildRetVoid(gallivm->builder); -- 2.30.2