Jason Ekstrand <[email protected]> writes:

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

>> --
>> 2.4.6
>>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to