<div dir="ltr">This patch is no good. The bug is real but this patch is insufficient. I've got another one running through CI which I should be posting shortly.<br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 31, 2018 at 6:38 AM Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Otherwise, only the first vec4 of a matrix or other complex type will<br>
get marked as flat and we'll interpolate the others. This was caught by<br>
a dEQP test which started failing because it did a SSO vs. non-SSO<br>
comparison. Previously, we did the interpolation wrong consistently in<br>
both versions. However, with one of Tim Arceri's NIR linkingpatches, we<br>
started splitting the matrix input into vectors at link time in the<br>
non-SSO version and it started getting correctly interpolated which<br>
didn't match the broken SSO version. As of this commit, they both get<br>
correctly interpolated.<br>
<br>
Fixes: e61cc87c757f8bc "i965/fs: Add a flat_inputs field to prog_data"<br>
---<br>
src/intel/compiler/brw_fs.cpp | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp<br>
index 7ddbd285fe2..55cd5c6e72a 100644<br>
--- a/src/intel/compiler/brw_fs.cpp<br>
+++ b/src/intel/compiler/brw_fs.cpp<br>
@@ -6886,8 +6886,10 @@ brw_compute_flat_inputs(struct brw_wm_prog_data *prog_data,<br>
continue;<br>
<br>
/* flat shading */<br>
- if (var->data.interpolation == INTERP_MODE_FLAT)<br>
- prog_data->flat_inputs |= (1 << input_index);<br>
+ if (var->data.interpolation == INTERP_MODE_FLAT) {<br>
+ unsigned slots = glsl_count_attribute_slots(var->type, false);<br>
+ prog_data->flat_inputs |= (((1 << slots) - 1) << input_index);<br>
+ }<br>
}<br>
}<br>
<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>