nir/spirv/glsl450: Use the correct write mask
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 5 Sep 2015 01:47:56 +0000 (18:47 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 5 Sep 2015 01:50:14 +0000 (18:50 -0700)
src/glsl/nir/spirv_glsl450_to_nir.c

index 8bfa16e6d2f252bf22ae3aa1be8f1252c73631bf..60bd597820c28a1e7117dd5876e72a8c3b901053 100644 (file)
@@ -150,6 +150,7 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
    nir_alu_instr *instr = nir_alu_instr_create(b->shader, op);
    nir_ssa_dest_init(&instr->instr, &instr->dest.dest,
                      glsl_get_vector_elements(val->ssa->type), val->name);
+   instr->dest.write_mask = (1 << instr->dest.dest.ssa.num_components) - 1;
    val->ssa->def = &instr->dest.dest.ssa;
 
    for (unsigned i = 0; i < nir_op_infos[op].num_inputs; i++)