<p dir="ltr"><br>
On Jul 28, 2015 2:43 AM, "Francisco Jerez" <<a href="mailto:currojerez@riseup.net">currojerez@riseup.net</a>> wrote:<br>
><br>
> register_coalesce() was considering the exec_size of the MOV<br>
> instruction alone to decide whether the register at offset+1 of the<br>
> source VGRF was being copied to inst->dst.reg_offset+1 of the<br>
> destination VGRF, which is only a valid assumption if the move has a<br>
> 32-bit execution type.  Use regs_read() instead to find out the number<br>
> of registers copied by the instruction.<br>
> ---<br>
>  src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp | 2 +-<br>
>  1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp<br>
> index a253c81..4544122 100644<br>
> --- a/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp<br>
> +++ b/src/mesa/drivers/dri/i965/brw_fs_register_coalesce.cpp<br>
> @@ -195,7 +195,7 @@ fs_visitor::register_coalesce()<br>
>              continue;<br>
>           }<br>
>           reg_to_offset[offset] = inst->dst.reg_offset;<br>
> -         if (inst->exec_size == 16)<br>
> +         if (inst->regs_read(0) > 1)<br>
>              reg_to_offset[offset + 1] = inst->dst.reg_offset + 1;<br>
>           mov[offset] = inst;<br>
>           channels_remaining -= inst->regs_written;</p>
<p dir="ltr">And then we use regs_written directly below...</p>
<p dir="ltr">Off you want it to be more consistent, we could use regs_written for both.  Either wary,</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>></p>
<p dir="ltr">> --<br>
> 2.4.6<br>
><br>
</p>