diff --git a/src/compiler/nir/nir_opt_varyings.c b/src/compiler/nir/nir_opt_varyings.c index 07b2f565600..58a44712d10 100644 --- a/src/compiler/nir/nir_opt_varyings.c +++ b/src/compiler/nir/nir_opt_varyings.c @@ -2241,11 +2241,11 @@ clone_ssa_impl(struct linkage_info *linkage, nir_builder *b, nir_def *ssa) NIR_MAX_VEC_COMPONENTS); } + clone = nir_builder_alu_instr_finish_and_insert(b, alu_clone); + alu_clone->def.num_components = alu->def.num_components; alu_clone->def.bit_size = alu->def.bit_size; - clone = nir_builder_alu_instr_finish_and_insert(b, alu_clone); - /* nir_builder_alu_instr_finish_and_insert overwrites fp_math_ctrl. */ alu_clone->fp_math_ctrl = alu->fp_math_ctrl; alu_clone->no_signed_wrap = alu->no_signed_wrap;