<p dir="ltr">I haven't checked spirv for the specific naming, but note that prim ID can be an output in gs.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Nov 11, 2016 1:34 AM, "Jason Ekstrand" <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Before, we were treating it as an output which is just completely bogus.<br>
We could go for an input but a system value makes more sense.<br>
<br>
Cc: "13.0" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.<wbr>freedesktop.org</a>><br>
---<br>
 src/compiler/spirv/vtn_<wbr>variables.c | 4 ++--<br>
 1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/spirv/vtn_<wbr>variables.c b/src/compiler/spirv/vtn_<wbr>variables.c<br>
index bbcca14..a4d5367 100644<br>
--- a/src/compiler/spirv/vtn_<wbr>variables.c<br>
+++ b/src/compiler/spirv/vtn_<wbr>variables.c<br>
@@ -806,8 +806,8 @@ vtn_get_builtin_location(<wbr>struct vtn_builder *b,<br>
       set_mode_system_value(mode);<br>
       break;<br>
    case SpvBuiltInPrimitiveId:<br>
-      *location = VARYING_SLOT_PRIMITIVE_ID;<br>
-      *mode = nir_var_shader_out;<br>
+      *location = SYSTEM_VALUE_PRIMITIVE_ID;<br>
+      set_mode_system_value(mode);<br>
       break;<br>
    case SpvBuiltInInvocationId:<br>
       *location = SYSTEM_VALUE_INVOCATION_ID;<br>
--<br>
2.5.0.400.gff86faf<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>