aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_clone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ir_clone.cpp')
-rw-r--r--mesalib/src/glsl/ir_clone.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/mesalib/src/glsl/ir_clone.cpp b/mesalib/src/glsl/ir_clone.cpp
index 311c992be..167b80c9f 100644
--- a/mesalib/src/glsl/ir_clone.cpp
+++ b/mesalib/src/glsl/ir_clone.cpp
@@ -265,10 +265,12 @@ ir_assignment::clone(void *mem_ctx, struct hash_table *ht) const
if (this->condition)
new_condition = this->condition->clone(mem_ctx, ht);
- return new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht),
- this->rhs->clone(mem_ctx, ht),
- new_condition,
- this->write_mask);
+ ir_assignment *cloned =
+ new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht),
+ this->rhs->clone(mem_ctx, ht),
+ new_condition);
+ cloned->write_mask = this->write_mask;
+ return cloned;
}
ir_function *