radv: configure the number of SGPRs/VGPRs directly from the arguments

Instead of copying the values to radv_shader_info.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13542>
This commit is contained in:
Samuel Pitoiset
2021-10-27 10:20:24 +02:00
committed by Marge Bot
parent 990a8ee5eb
commit 3bbc226d7a
6 changed files with 19 additions and 21 deletions

View File

@@ -743,11 +743,6 @@ radv_declare_shader_args(const struct radv_nir_compiler_options *options,
unreachable("Shader stage not implemented");
}
info->num_input_vgprs = 0;
info->num_input_sgprs = 2;
info->num_input_sgprs += args->ac.num_sgprs_used;
info->num_input_vgprs = args->ac.num_vgprs_used;
uint8_t user_sgpr_idx = 0;
set_loc_shader_ptr(info, AC_UD_SCRATCH_RING_OFFSETS, &user_sgpr_idx);
@@ -811,5 +806,5 @@ radv_declare_shader_args(const struct radv_nir_compiler_options *options,
unreachable("Shader stage not implemented");
}
info->num_user_sgprs = user_sgpr_idx;
args->num_user_sgprs = user_sgpr_idx;
}