<p dir="ltr">Seems reasonable. Rb</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Jul 22, 2016 11:04 AM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">"flat centroid" and "flat sample" both just mean "flat", so we should<br>
ignore interpolateAtCentroid/Sample and just return the flat value.<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=97032" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=97032</a><br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/compiler/nir/nir_lower_io.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c<br>
index bf8296f..b36836f 100644<br>
--- a/src/compiler/nir/nir_lower_io.c<br>
+++ b/src/compiler/nir/nir_lower_io.c<br>
@@ -340,6 +340,10 @@ lower_interpolate_at(nir_intrinsic_instr *intrin, struct lower_io_state *state,<br>
<br>
    assert(var->data.mode == nir_var_shader_in);<br>
<br>
+   /* Ignore interpolateAt() for flat variables - flat is flat. */<br>
+   if (var->data.interpolation == INTERP_MODE_FLAT)<br>
+      return lower_load(intrin, state, NULL, offset);<br>
+<br>
    nir_intrinsic_op bary_op;<br>
    switch (intrin->intrinsic) {<br>
    case nir_intrinsic_interp_var_at_centroid:<br>
--<br>
2.9.0<br>
<br>
_______________________________________________<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/mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>