/* Reparent the name to the new variable */
ralloc_steal(nvar, nvar->name);
- /* Reparent the constant initializer (if any) */
- ralloc_steal(nvar, nvar->constant_initializer);
+ assert(nvar->constant_initializer == NULL);
/* Give the original a new name with @<mode>-temp appended */
const char *mode = (temp->data.mode == nir_var_shader_in) ? "in" : "out";
temp->data.mode = nir_var_global;
temp->data.read_only = false;
temp->data.fb_fetch_output = false;
- temp->constant_initializer = NULL;
return nvar;
}