From: "\"Ian Romanick\"" <i...@freedesktop.org> From: Ian Romanick <ian.d.roman...@intel.com>
Use the ir_assignment constructor that takes the write mask as a parameter. This skips some work that was done in the other constructor. Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> --- src/compiler/glsl/ir_clone.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/compiler/glsl/ir_clone.cpp b/src/compiler/glsl/ir_clone.cpp index e08f0c8..9cc962c 100644 --- a/src/compiler/glsl/ir_clone.cpp +++ b/src/compiler/glsl/ir_clone.cpp @@ -251,11 +251,9 @@ ir_texture::clone(void *mem_ctx, struct hash_table *ht) const ir_assignment * ir_assignment::clone(void *mem_ctx, struct hash_table *ht) const { - ir_assignment *cloned = - new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht), - this->rhs->clone(mem_ctx, ht)); - cloned->write_mask = this->write_mask; - return cloned; + return new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht), + this->rhs->clone(mem_ctx, ht), + this->write_mask); } ir_function * -- 2.9.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev