Mesa (staging/21.3): radeonsi/nir: Check for VARYING_SLOT_PRIMITIVE_ID not SYSTEM_VALUE
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Dec 17 19:44:19 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: af17b6e8ce63b5748a55d9a030a9066c980f3066
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=af17b6e8ce63b5748a55d9a030a9066c980f3066
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Thu Dec 16 23:20:31 2021 -0600
radeonsi/nir: Check for VARYING_SLOT_PRIMITIVE_ID not SYSTEM_VALUE
This function is called on load/store_input/output. It makes no sense
for it to get a SYSTEM_VALUE enum. This only doesn't explode because
SYSTEM_VALUE_PRIMITIVE_ID happens to be below VARYING_SLOT_VAR0 so it
doesn't interact with any actual varyings. The next commit is going to
add another system value which will push SYSTEM_VALUE_PRIMITIVE_ID up by
one so it will equal VARYING_SLOT_VAR0 and then the first FS input will
always get smashed to flat which isn't what we want.
Fixes: b59bb9c07ae4 ("radeonsi: force flat for PrimID early in si_nir_scan_shader")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14198>
(cherry picked from commit 732b234ddba7ed697cb1ed351d56cc4a8b56539a)
---
.pick_status.json | 2 +-
src/gallium/drivers/radeonsi/si_shader_nir.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 68d70f315ef..94507641cf0 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -94,7 +94,7 @@
"description": "radeonsi/nir: Check for VARYING_SLOT_PRIMITIVE_ID not SYSTEM_VALUE",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "b59bb9c07ae47f9f59bd7fcad6af77c591bb3611"
},
diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
index 3d968dcda8a..ffc031075f0 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -115,7 +115,7 @@ static void scan_io_usage(struct si_shader_info *info, nir_intrinsic_instr *intr
info->input[loc].semantic = semantic + i;
- if (semantic == SYSTEM_VALUE_PRIMITIVE_ID)
+ if (semantic == VARYING_SLOT_PRIMITIVE_ID)
info->input[loc].interpolate = INTERP_MODE_FLAT;
else
info->input[loc].interpolate = interp;
More information about the mesa-commit
mailing list