From 7e7bb38bd8b12fec09afc0e515480bb6c5a8475a Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 4 May 2020 10:50:47 +0200 Subject: [PATCH] radeonsi: fix export count MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: --- src/amd/llvm/ac_llvm_build.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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; -- 2.30.2