Mesa (main): nouveau/nv50: Set the primid sysval flag if it's in the sysval list, too.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 20 22:13:40 UTC 2022


Module: Mesa
Branch: main
Commit: d9b6b2acd7b4f81e315e762ed1248edf3039519c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9b6b2acd7b4f81e315e762ed1248edf3039519c

Author: Emma Anholt <emma at anholt.net>
Date:   Thu Apr 14 11:13:14 2022 -0700

nouveau/nv50: Set the primid sysval flag if it's in the sysval list, too.

It's declared an input in TGSI, even though it's an SV in the backend.  In
NIR, it shows up as an SV, so it's in this list.  Fixes NIR regressions in
primitive-id-in and primitive-id-restart.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>

---

 src/gallium/drivers/nouveau/nv50/nv50_program.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_program.c b/src/gallium/drivers/nouveau/nv50/nv50_program.c
index dd67a19d30c..7c4cf066e1a 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_program.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_program.c
@@ -71,6 +71,9 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info_out *info)
          prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID;
          prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID_DRAW_ARRAYS_ADD_START;
          continue;
+      case TGSI_SEMANTIC_PRIMID:
+         prog->vp.attrs[2] |= NV50_3D_VP_GP_BUILTIN_ATTR_EN_PRIMITIVE_ID;
+         break;
       default:
          break;
       }



More information about the mesa-commit mailing list