pan/mdg: fix src_type in instructions that need a implicit zero
[mesa.git] / src / panfrost / midgard / midgard_compile.c
index 0a249d57f3d46007cd8f8ea550f176d54b56fab7..44db10463d547ab14fa6dd0f02c4abc36ad300d5 100644 (file)
@@ -1266,7 +1266,7 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 /* Lots of instructions need a 0 plonked in */
                 ins.has_inline_constant = false;
                 ins.src[1] = SSA_FIXED_REGISTER(REGISTER_CONSTANT);
-                ins.src_types[1] = nir_type_uint32;
+                ins.src_types[1] = ins.src_types[0];
                 ins.has_constants = true;
                 ins.constants.u32[0] = 0;