<div dir="ltr"><div>First off, you should add an index to the intrinsic if you're going to do this and it should probably be set elsewhere.  Otherwise, it becomes this magic secret radeonsi thing.<br><br></div>Second, do you really want this on the intrinsic or would it be better as part of shader_info?  It's always been weird to me that it's a layout qualifier on gl_FragCoord.  In SPIR-V, it comes in as an execution mode which is a very global thing.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 13, 2018 at 9:02 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">radeonsi needs to gather this information.<br>
---<br>
 src/compiler/nir/nir_lower_<wbr>system_values.c | 9 +++++++++<br>
 1 file changed, 9 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_<wbr>system_values.c b/src/compiler/nir/nir_lower_<wbr>system_values.c<br>
index 3594f4ae5c..f8d8463f7f 100644<br>
--- a/src/compiler/nir/nir_lower_<wbr>system_values.c<br>
+++ b/src/compiler/nir/nir_lower_<wbr>system_values.c<br>
@@ -133,6 +133,15 @@ convert_block(nir_block *block, nir_builder *b)<br>
          break;<br>
       }<br>
<br>
+      case SYSTEM_VALUE_FRAG_COORD: {<br>
+         nir_intrinsic_op sysval_op =<br>
+            nir_intrinsic_from_system_<wbr>value(var->data.location);<br>
+         int idx = 0;<br>
+         if (var->data.pixel_center_<wbr>integer) {<br>
+            idx = 1;<br>
+         }<br>
+         sysval = nir_load_system_value(b, sysval_op, idx);<br>
+      }<br>
       default:<br>
          break;<br>
       }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.3<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>
</font></span></blockquote></div><br></div>