<div dir="ltr">On 12 August 2013 13:18, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Necessary to avoid combining a bitcast and a modifier into a single<br>
operation. Otherwise if safe, the MOV should be removed by<br>
copy-propagation or register coalescing.<br>
---<br>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 ++--<br>
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 ++--<br>
2 files changed, 4 insertions(+), 4 deletions(-)<br></blockquote><div><br></div><div>This patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereoytpe441@gmail.com">stereoytpe441@gmail.com</a>><br></div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
index ee7728c..fa4554b 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp<br>
@@ -361,12 +361,12 @@ fs_visitor::visit(ir_expression *ir)<br>
break;<br>
case ir_unop_neg:<br>
op[0].negate = !op[0].negate;<br>
- this->result = op[0];<br>
+ emit(MOV(this->result, op[0]));<br>
break;<br>
case ir_unop_abs:<br>
op[0].abs = true;<br>
op[0].negate = false;<br>
- this->result = op[0];<br>
+ emit(MOV(this->result, op[0]));<br>
break;<br>
case ir_unop_sign:<br>
temp = fs_reg(this, ir->type);<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 8d4a5d4..05c0091 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp<br>
@@ -1391,12 +1391,12 @@ vec4_visitor::visit(ir_expression *ir)<br>
break;<br>
case ir_unop_neg:<br>
op[0].negate = !op[0].negate;<br>
- this->result = op[0];<br>
+ emit(MOV(result_dst, op[0]));<br>
break;<br>
case ir_unop_abs:<br>
op[0].abs = true;<br>
op[0].negate = false;<br>
- this->result = op[0];<br>
+ emit(MOV(result_dst, op[0]));<br>
break;<br>
<br>
case ir_unop_sign:<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.2<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></span></blockquote></div><br></div></div>