aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_clone.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-30 06:43:04 +0000
committermarha <marha@users.sourceforge.net>2011-03-30 06:43:04 +0000
commit2039567395da75a3ae318fb82738cdcf2caa05a1 (patch)
tree23caaf9e0f6867d85f5cffc284d008c591ae99cb /mesalib/src/glsl/ir_clone.cpp
parent24abc56b37a3ec32a03b7eafccd96607ae13ea89 (diff)
downloadvcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.gz
vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.bz2
vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.zip
mesa git update 30 Mar 2011
Diffstat (limited to 'mesalib/src/glsl/ir_clone.cpp')
-rw-r--r--mesalib/src/glsl/ir_clone.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir_clone.cpp b/mesalib/src/glsl/ir_clone.cpp
index 2c0574dc6..069bb85e8 100644
--- a/mesalib/src/glsl/ir_clone.cpp
+++ b/mesalib/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;