From: Marek Olšák Date: Fri, 24 Jan 2020 22:12:10 +0000 (-0500) Subject: radeonsi: fix a regression since the addition of si_shader_llvm_vs.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb7cd575da02f3ae60d05112ca86ce6c2cd27e3c;p=mesa.git radeonsi: fix a regression since the addition of si_shader_llvm_vs.c Fixes: cd5b99c541d241d - radeonsi: move VS shader code into si_shader_llvm_vs.c Closes: #2416 Tested-by: Marge Bot Part-of: --- diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_vs.c b/src/gallium/drivers/radeonsi/si_shader_llvm_vs.c index 4a56bdf81cf..39c06f41ece 100644 --- a/src/gallium/drivers/radeonsi/si_shader_llvm_vs.c +++ b/src/gallium/drivers/radeonsi/si_shader_llvm_vs.c @@ -859,10 +859,11 @@ void si_llvm_build_vs_prolog(struct si_shader_context *ctx, LLVMValueRef ret, func; int num_returns, i; unsigned first_vs_vgpr = key->vs_prolog.num_merged_next_stage_vgprs; - unsigned num_input_vgprs = key->vs_prolog.num_merged_next_stage_vgprs + 4; + unsigned num_input_vgprs = key->vs_prolog.num_merged_next_stage_vgprs + 4 + + (key->vs_prolog.has_ngg_cull_inputs ? 1 : 0); struct ac_arg input_sgpr_param[key->vs_prolog.num_input_sgprs]; - struct ac_arg input_vgpr_param[9]; - LLVMValueRef input_vgprs[9]; + struct ac_arg input_vgpr_param[10]; + LLVMValueRef input_vgprs[10]; unsigned num_all_input_regs = key->vs_prolog.num_input_sgprs + num_input_vgprs; unsigned user_sgpr_base = key->vs_prolog.num_merged_next_stage_vgprs ? 8 : 0;