[Mesa-dev] [PATCH 04/11] i965/vec4: Fix handling of multiple register reads and writes in split_virtual_grfs().

Francisco Jerez currojerez at riseup.net
Mon Mar 23 04:57:40 PDT 2015


Matt Turner <mattst88 at gmail.com> writes:

> On Fri, Mar 20, 2015 at 7:50 AM, Francisco Jerez <currojerez at riseup.net> wrote:
>> ---
>>  src/mesa/drivers/dri/i965/brw_vec4.cpp | 15 ++++++---------
>>  1 file changed, 6 insertions(+), 9 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
>> index ed9944d..ce02fe3 100644
>> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
>> @@ -1203,15 +1203,12 @@ vec4_visitor::split_virtual_grfs()
>>      * to split.
>>      */
>>     foreach_block_and_inst(block, vec4_instruction, inst, cfg) {
>> -      /* If there's a SEND message loading from a GRF on gen7+, it needs to be
>> -       * contiguous.
>> -       */
>> -      if (inst->is_send_from_grf()) {
>> -         for (int i = 0; i < 3; i++) {
>> -            if (inst->src[i].file == GRF) {
>> -               split_grf[inst->src[i].reg] = false;
>> -            }
>> -         }
>
> Wow, am I reading this right that we weren't setting split_grf[...] =
> false for any destinations?
>
Yeah, you were reading it right...

>> +      if (inst->dst.file == GRF && inst->regs_written > 1)
>> +         split_grf[inst->dst.reg] = false;
>> +
>> +      for (int i = 0; i < 3; i++) {
>> +         if (inst->src[i].file == GRF && inst->regs_read(i) > 1)
>> +            split_grf[inst->src[i].reg] = false;
>>        }
>>     }
>>
>> --
>> 2.1.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150323/cc39c6cb/attachment.sig>


More information about the mesa-dev mailing list