i965/vec4: Use UW type for multiply into accumulator on GEN8+

BDW adds the following restriction: "When multiplying DW x DW, the dst
cannot be accumulator."
This commit is contained in:
Jason Ekstrand 2016-01-14 12:04:20 -08:00
parent 45349acad0
commit 32f8bcb84f

View file

@ -1069,7 +1069,11 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
case nir_op_umul_high: {
struct brw_reg acc = retype(brw_acc_reg(8), dst.type);
emit(MUL(acc, op[0], op[1]));
if (devinfo->gen >=8)
emit(MUL(acc, op[0], retype(op[1], BRW_REGISTER_TYPE_UW)));
else
emit(MUL(acc, op[0], op[1]));
emit(MACH(dst, op[0], op[1]));
break;
}