radv: fix computation of the number of user SGPRS for NGG GS state

The NGG GS state uses one user SGPR.

Cc: 21.1 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10485>
This commit is contained in:
Samuel Pitoiset 2021-04-27 17:01:45 +02:00 committed by Marge Bot
parent 4b52a7f245
commit c425b67c76
1 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,9 @@ allocate_user_sgprs(struct radv_shader_args *args, gl_shader_stage stage, bool h
break;
case MESA_SHADER_GEOMETRY:
if (has_previous_stage) {
if (args->options->key.vs_common_out.as_ngg)
user_sgpr_count++; /* NGG GS state */
if (previous_stage == MESA_SHADER_VERTEX) {
user_sgpr_count += count_vs_user_sgprs(args);
}