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>
(cherry picked from commit c425b67c76)
This commit is contained in:
Samuel Pitoiset 2021-04-27 17:01:45 +02:00 committed by Dylan Baker
parent d0fa20ba17
commit a3237b0dd3
2 changed files with 4 additions and 1 deletions

View file

@ -40,7 +40,7 @@
"description": "radv: fix computation of the number of user SGPRS for NGG GS state",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": null
},

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);
}