On 28 August 2011 21:45, Eric Anholt <span dir="ltr">&lt;<a href="mailto:eric@anholt.net">eric@anholt.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
This DP4 had one of its operands missing, so we were generating<br>
garbage clip distances.  Using the per-opcode instruction generators<br>
made it obvious.<br></blockquote><div><br>IMHO, the fact that this refactor made the bug obvious speaks highly in favor of this entire patch series.  Nice work.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

---<br>
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |    6 +++---<br>
 1 files changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
index 68c0ed9..7334a38 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
@@ -1854,9 +1854,9 @@ vec4_visitor::emit_vue_header_gen6(int header_mrf)<br>
         else<br>
            m = brw_message_reg(header_mrf + 1);<br>
<br>
-        emit(BRW_OPCODE_DP4,<br>
-             dst_reg(brw_writemask(m, 1 &lt;&lt; (i &amp; 3))),<br>
-             src_reg(c-&gt;userplane[i]));<br>
+        emit(DP4(dst_reg(brw_writemask(m, 1 &lt;&lt; (i &amp; 3))),<br>
+                 src_reg(output_reg[VERT_RESULT_HPOS]),<br>
+                 src_reg(c-&gt;userplane[i])));<br>
       }<br>
       header_mrf += 2;<br>
    }<br>
<font color="#888888">--<br>
1.7.5.4<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="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br>