Mesa (staging/21.1): radv: fix computation of the number of user SGPRS for NGG GS state

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 30 03:41:02 UTC 2021


Module: Mesa
Branch: staging/21.1
Commit: a3237b0dd37e87a99f46cd2af9e81e2aca9686c8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a3237b0dd37e87a99f46cd2af9e81e2aca9686c8

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Tue Apr 27 17:01:45 2021 +0200

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 at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10485>
(cherry picked from commit c425b67c76b86fca046bfdda063695daf3d46766)

---

 .pick_status.json                 | 2 +-
 src/amd/vulkan/radv_shader_args.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index d7e6673fb3f..652f042db8a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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
     },
diff --git a/src/amd/vulkan/radv_shader_args.c b/src/amd/vulkan/radv_shader_args.c
index 75f70d6c475..d480928b3dc 100644
--- a/src/amd/vulkan/radv_shader_args.c
+++ b/src/amd/vulkan/radv_shader_args.c
@@ -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);
          }



More information about the mesa-commit mailing list