OSDN Git Service

nir/lower_outputs_to_temporaries: Reparent the output name
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 10 Sep 2015 20:56:08 +0000 (13:56 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Sep 2015 15:55:51 +0000 (08:55 -0700)
commit794355e77167291a3acc8d42249c760c24f54f38
tree16fea1f06094dcc55382eb78f21bd2764fa38e88
parentd4e29af2344c06490913efc35430f93a966061bb
nir/lower_outputs_to_temporaries: Reparent the output name

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.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
src/glsl/nir/nir_lower_outputs_to_temporaries.c