Same issue with liveness analysis. If we store out a vec3, we should not
reference the .w component.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
emit_explicit_constant(ctx, reg, reg);
unsigned component = nir_intrinsic_component(instr);
+ unsigned nr_comp = nir_src_num_components(instr->src[0]);
midgard_instruction st = m_st_vary_32(reg, offset);
st.load_store.arg_1 = 0x9E;
st.load_store.arg_2 = 0x1E;
- st.load_store.swizzle = SWIZZLE_XYZW << (2*component);
+ st.load_store.swizzle = swizzle_of(nr_comp) << (2*component);
emit_mir_instruction(ctx, st);
} else {
DBG("Unknown store\n");