From eb7cd575da02f3ae60d05112ca86ce6c2cd27e3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 24 Jan 2020 17:12:10 -0500 Subject: [PATCH] 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: --- src/gallium/drivers/radeonsi/si_shader_llvm_vs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; -- 2.30.2