radeonsi: fix a regression since the addition of si_shader_llvm_vs.c
authorMarek Olšák <marek.olsak@amd.com>
Fri, 24 Jan 2020 22:12:10 +0000 (17:12 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 25 Jan 2020 05:59:24 +0000 (05:59 +0000)
Fixes: cd5b99c541d241d - radeonsi: move VS shader code into si_shader_llvm_vs.c
Closes: #2416
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3561>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3561>

src/gallium/drivers/radeonsi/si_shader_llvm_vs.c

index 4a56bdf81cf4403e13dfc260fb4038d010773280..39c06f41ecea441b8dc1f0be4e89fa97901d969c 100644 (file)
@@ -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;