diff options
author | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2014-10-20 11:46:37 +0300 |
---|---|---|
committer | Topi Pohjolainen <topi.pohjolainen@intel.com> | 2014-10-20 15:16:28 +0300 |
commit | 570f89e6cb11ef42eb1ef2aedd717293cb5695da (patch) | |
tree | b8aad748f39f4778fed4ed98c9e7daf8025d8e28 | |
parent | 5ecb539e7d1466f8a1261e9d2bf50d1b31943b79 (diff) |
i965/eu: Allow 3-src float ops with doubles
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 8c8ac367d0..d0d4a965fe 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -918,8 +918,9 @@ brw_alu3(struct brw_compile *p, unsigned opcode, struct brw_reg dest, dest.file == BRW_MESSAGE_REGISTER_FILE); assert(dest.nr < 128); assert(dest.address_mode == BRW_ADDRESS_DIRECT); - assert(dest.type == BRW_REGISTER_TYPE_F || - dest.type == BRW_REGISTER_TYPE_D || + assert(dest.type == BRW_REGISTER_TYPE_F || + dest.type == BRW_REGISTER_TYPE_DF || + dest.type == BRW_REGISTER_TYPE_D || dest.type == BRW_REGISTER_TYPE_UD); if (brw->gen == 6) { brw_inst_set_3src_dst_reg_file(brw, inst, @@ -1027,10 +1028,17 @@ brw_inst *brw_##OP(struct brw_compile *p, \ struct brw_reg src1, \ struct brw_reg src2) \ { \ - assert(dest.type == BRW_REGISTER_TYPE_F); \ - assert(src0.type == BRW_REGISTER_TYPE_F); \ - assert(src1.type == BRW_REGISTER_TYPE_F); \ - assert(src2.type == BRW_REGISTER_TYPE_F); \ + assert(dest.type == BRW_REGISTER_TYPE_F || \ + dest.type == BRW_REGISTER_TYPE_DF); \ + if (dest.type == BRW_REGISTER_TYPE_F) { \ + assert(src0.type == BRW_REGISTER_TYPE_F); \ + assert(src1.type == BRW_REGISTER_TYPE_F); \ + assert(src2.type == BRW_REGISTER_TYPE_F); \ + } else if (dest.type == BRW_REGISTER_TYPE_DF) { \ + assert(src0.type == BRW_REGISTER_TYPE_DF); \ + assert(src1.type == BRW_REGISTER_TYPE_DF); \ + assert(src2.type == BRW_REGISTER_TYPE_DF); \ + } \ return brw_alu3(p, BRW_OPCODE_##OP, dest, src0, src1, src2); \ } |