From: Pierre-Eric Pelloux-Prayer Date: Mon, 4 May 2020 08:50:47 +0000 (+0200) Subject: radeonsi: fix export count X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e7bb38bd8b12fec09afc0e515480bb6c5a8475a;p=mesa.git radeonsi: fix export count Fixes: 17acff01a00 ("radeonsi: skip vs output optimizations for some outputs") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2877 Reviewed-by: Marek Olšák Part-of: --- diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index e826811eefc..0066a885c95 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -3125,9 +3125,6 @@ void ac_optimize_vs_outputs(struct ac_llvm_context *ctx, target -= V_008DFC_SQ_EXP_PARAM; - if ((1u << target) & skip_output_mask) - continue; - /* Parse the instruction. */ memset(&exp, 0, sizeof(exp)); exp.offset = target; @@ -3151,12 +3148,13 @@ void ac_optimize_vs_outputs(struct ac_llvm_context *ctx, } /* Eliminate constant and duplicated PARAM exports. */ - if (ac_eliminate_const_output(vs_output_param_offset, - num_outputs, &exp) || - ac_eliminate_duplicated_output(ctx, - vs_output_param_offset, - num_outputs, &exports, - &exp)) { + if (!((1u << target) & skip_output_mask) && + (ac_eliminate_const_output(vs_output_param_offset, + num_outputs, &exp) || + ac_eliminate_duplicated_output(ctx, + vs_output_param_offset, + num_outputs, &exports, + &exp))) { removed_any = true; } else { exports.exp[exports.num++] = exp;