From: Connor Abbott Date: Thu, 9 Jul 2015 18:28:39 +0000 (-0400) Subject: nir/spirv: fix wrong writemask for ALU operations X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3318a86d12cfd2d436bf5418b73d363018678d84;p=mesa.git nir/spirv: fix wrong writemask for ALU operations --- diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index 5401908b15b..6819f88833a 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -1840,6 +1840,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode, nir_alu_instr *instr = nir_alu_instr_create(b->shader, op); nir_ssa_dest_init(&instr->instr, &instr->dest.dest, glsl_get_vector_elements(type), val->name); + instr->dest.write_mask = (1 << glsl_get_vector_elements(type)) - 1; val->ssa->def = &instr->dest.dest.ssa; for (unsigned i = 0; i < nir_op_infos[op].num_inputs; i++)