Mesa (main): spirv: Declare PointCoord as a sysval

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 7 20:13:56 UTC 2021


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

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Mon Sep 27 15:20:49 2021 +0200

spirv: Declare PointCoord as a sysval

Now that all drivers have been patched to convert sysvals to input
varyings when they have too, we can safely declare PointCoord as a sysval
too.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13017>

---

 src/compiler/spirv/vtn_variables.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 98d7f9fb023..f12ed7ec5c3 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -883,8 +883,9 @@ vtn_get_builtin_location(struct vtn_builder *b,
       *location = SYSTEM_VALUE_FRAG_COORD;
       break;
    case SpvBuiltInPointCoord:
-      *location = VARYING_SLOT_PNTC;
       vtn_assert(*mode == nir_var_shader_in);
+      set_mode_system_value(b, mode);
+      *location = SYSTEM_VALUE_POINT_COORD;
       break;
    case SpvBuiltInFrontFacing:
       *location = SYSTEM_VALUE_FRONT_FACE;



More information about the mesa-commit mailing list