*/
assert(ir->write_mask == (1 << ir->lhs->type->components()) - 1);
- /* Smear the float across all the channels for the masked write. */
- val_swiz = new(mem_ctx) ir_swizzle(val, 0, 0, 0, 0,
- ir->lhs->type->components());
- assign = new(mem_ctx) ir_assignment(lhs, val_swiz, NULL, (1 << elem));
+ assign = new(mem_ctx) ir_assignment(lhs, val, NULL, (1 << elem));
ir->insert_before(assign);
}
if (rhs) {
new_rhs = new(mem_ctx) ir_dereference_variable(rhs->components[i]);
- /* If we're writing into a writemask, smear it out to that channel. */
- if (!lhs)
- new_rhs = new(mem_ctx) ir_swizzle(new_rhs, i, i, i, i, i + 1);
} else {
new_rhs = new(mem_ctx) ir_swizzle(ir->rhs->clone(mem_ctx, NULL),
i, i, i, i, 1);