X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fir_clone.cpp;h=069bb85e8ded0978e477359e612bd45fd60a8a23;hb=a2a6799fbefc6900f2371efab778c5bc2bf5a6e9;hp=2c0574dc6bf9bb5059808856cff23a12f191f6f9;hpb=b922a0ce12916a91cfc3e56714913fcf63279ff2;p=mesa.git diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index 2c0574dc6bf..069bb85e8de 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -53,6 +53,18 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const var->origin_upper_left = this->origin_upper_left; var->pixel_center_integer = this->pixel_center_integer; var->explicit_location = this->explicit_location; + + var->num_state_slots = this->num_state_slots; + if (this->state_slots) { + /* FINISHME: This really wants to use something like talloc_reference, but + * FINISHME: ralloc doesn't have any similar function. + */ + var->state_slots = ralloc_array(var, ir_state_slot, + this->num_state_slots); + memcpy(var->state_slots, this->state_slots, + sizeof(this->state_slots[0]) * var->num_state_slots); + } + if (this->explicit_location) var->location = this->location;