[Mesa-dev] [PATCH 09/10] i965/fs: Allow spilling of non-contiguous registers.

Francisco Jerez currojerez at riseup.net
Tue May 17 19:22:54 UTC 2016


Jason Ekstrand <jason at jlekstrand.net> writes:

> On Mon, May 16, 2016 at 9:23 PM, Francisco Jerez <currojerez at riseup.net>
> wrote:
>
>> This should be working fine now.
>>
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94997
>
Thanks for the link and R-bs!

>
>> ---
>>  src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp | 21
>> ++-------------------
>>  1 file changed, 2 insertions(+), 19 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
>> b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
>> index ff40c42..d686f30 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
>> @@ -835,30 +835,13 @@ fs_visitor::choose_spill_reg(struct ra_graph *g)
>>      */
>>     foreach_block_and_inst(block, fs_inst, inst, cfg) {
>>        for (unsigned int i = 0; i < inst->sources; i++) {
>> -        if (inst->src[i].file == VGRF) {
>> +        if (inst->src[i].file == VGRF)
>>              spill_costs[inst->src[i].nr] += loop_scale;
>> -
>> -            /* Register spilling logic assumes full-width registers;
>> smeared
>> -             * registers have a width of 1 so if we try to spill them
>> we'll
>> -             * generate invalid assembly.  This shouldn't be a problem
>> because
>> -             * smeared registers are only used as short-term temporaries
>> when
>> -             * loading pull constants, so spilling them is unlikely to
>> reduce
>> -             * register pressure anyhow.
>> -             */
>> -            if (!inst->src[i].is_contiguous()) {
>> -               no_spill[inst->src[i].nr] = true;
>> -            }
>> -        }
>>        }
>>
>> -      if (inst->dst.file == VGRF) {
>> +      if (inst->dst.file == VGRF)
>>           spill_costs[inst->dst.nr] += inst->regs_written * loop_scale;
>>
>> -         if (!inst->dst.is_contiguous()) {
>> -            no_spill[inst->dst.nr] = true;
>> -         }
>> -      }
>> -
>>        switch (inst->opcode) {
>>
>>        case BRW_OPCODE_DO:
>> --
>> 2.7.3
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160517/c1618c11/attachment.sig>


More information about the mesa-dev mailing list