[Mesa-dev] [PATCH] nir/lower_outputs_to_temporaries: Reparent the output name

Eduardo Lima Mitev elima at igalia.com
Mon Sep 14 01:21:56 PDT 2015


On 09/11/2015 05:58 PM, Jason Ekstrand wrote:
> On Fri, Sep 11, 2015 at 5:45 AM, Eduardo Lima Mitev <elima at igalia.com> wrote:
>> Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
> 
> One side-note: Could you please reply-all when reviewing patches.
> That way you keep the Cc list alive.  While I still get it, my e-mail
> client flags things that are specifically Cc'd to me so I notice them.
> Thanks!
> --Jason
> 

Ok, note taken. Sorry for hte mess.
My mail client UI plays me bad sometimes, since the reply-all and
reply-list are the same button with a drop-down to choose between.

Eduardo

>> On 09/10/2015 10:58 PM, Jason Ekstrand wrote:
>>> We copy the output, make the old output the temporary, and give the
>>> temporary a new name.  The copy keeps the pointer to the old name.  This
>>> works just fine up until the point where we lower things to SSA and delete
>>> the old variable and, with it, the name.  Instead, we should re-parent to
>>> the copy.
>>> ---
>>>  src/glsl/nir/nir_lower_outputs_to_temporaries.c | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/src/glsl/nir/nir_lower_outputs_to_temporaries.c b/src/glsl/nir/nir_lower_outputs_to_temporaries.c
>>> index fb8070c..9d3a913 100644
>>> --- a/src/glsl/nir/nir_lower_outputs_to_temporaries.c
>>> +++ b/src/glsl/nir/nir_lower_outputs_to_temporaries.c
>>> @@ -97,6 +97,9 @@ nir_lower_outputs_to_temporaries(nir_shader *shader)
>>>        /* The orignal is now the temporary */
>>>        nir_variable *temp = var;
>>>
>>> +      /* Reparent the name to the new variable */
>>> +      ralloc_steal(output, output->name);
>>> +
>>>        /* Give the output a new name with @out-temp appended */
>>>        temp->name = ralloc_asprintf(var, "%s at out-temp", output->name);
>>>        temp->data.mode = nir_var_global;
>>>
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list