From: Nicolai Hähnle Date: Tue, 29 Nov 2016 11:59:48 +0000 (+0100) Subject: radeonsi: separate the call to si_llvm_emit_streamout from exports X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b41dd002354af06208056ad435a4ab6f0052b4c2;p=mesa.git radeonsi: separate the call to si_llvm_emit_streamout from exports Reviewed-by: Marek Olšák --- 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);