radv: make vertex param sgpr count more explicit

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8788>
This commit is contained in:
Mike Blumenkrantz 2021-02-05 13:20:37 -05:00 committed by Marge Bot
parent 4e0a3c2527
commit da7ffc3b97
1 changed files with 3 additions and 2 deletions

View File

@ -108,11 +108,12 @@ static bool needs_view_index_sgpr(struct radv_shader_args *args,
static uint8_t
count_vs_user_sgprs(struct radv_shader_args *args)
{
uint8_t count = 0;
uint8_t count = 2;
if (args->shader_info->vs.has_vertex_buffers)
count++;
count += args->shader_info->vs.needs_draw_id ? 3 : 2;
if (args->shader_info->vs.needs_draw_id)
count++;
return count;
}