summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2016-01-14 12:08:57 -0800
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-22 11:36:43 +0000
commit615c5a7fc8afe09cfe9a5736be9c9f15d36c1b0f (patch)
treece3205f2a542594c46554335ff8126f7d69dfb83
parent681415e7f03c99f8d51852cd0b897c0357c16a38 (diff)
downloadmesa-615c5a7fc8afe09cfe9a5736be9c9f15d36c1b0f.tar.gz
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." Cc: "11.1,11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com> (cherry picked from commit 0a6811207fbe18d49c7ab95f93ed01f75ffcdda0)
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_nir.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 435b80ee1f9..2d737d4c4a7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1017,7 +1017,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;
}