<p dir="ltr"><br>
On Sep 1, 2015 11:58 PM, "Matt Turner" <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
><br>
> The lowered code reads from the destination, which isn't possible from<br>
> message registers.<br>
><br>
> Fixes the dEQP functional.shaders.precision.int.highp_mul_fragment test<br>
> on SNB.</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>></p>
<p dir="ltr">You should probably cc stable before you push. I just looked and we need both 11.0 and 10.6.<br>
--Jason</p>
<p dir="ltr">> ---<br>
> src/mesa/drivers/dri/i965/brw_fs.cpp | 8 ++++----<br>
> 1 file changed, 4 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
> index 269914d..e28eb5d 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp<br>
> @@ -3192,7 +3192,8 @@ fs_visitor::lower_integer_multiplication()<br>
> * schedule multi-component multiplications much better.<br>
> */<br>
><br>
> - if (inst->conditional_mod && inst->dst.is_null()) {<br>
> + fs_reg orig_dst = inst->dst;<br>
> + if (orig_dst.is_null() || orig_dst.file == MRF) {<br>
> inst->dst = fs_reg(GRF, alloc.allocate(dispatch_width / 8),<br>
> inst->dst.type);<br>
> }<br>
> @@ -3258,10 +3259,9 @@ fs_visitor::lower_integer_multiplication()<br>
><br>
> ibld.ADD(dst, low, high);<br>
><br>
> - if (inst->conditional_mod) {<br>
> - fs_reg null(retype(ibld.null_reg_f(), inst->dst.type));<br>
> + if (inst->conditional_mod || orig_dst.file == MRF) {<br>
> set_condmod(inst->conditional_mod,<br>
> - ibld.MOV(null, inst->dst));<br>
> + ibld.MOV(orig_dst, inst->dst));<br>
> }<br>
> }<br>
><br>
> --<br>
> 2.4.6<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">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>