diff options
author | Topi Pohjolainen <[email protected]> | 2014-10-20 11:46:37 +0300 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-05-10 11:25:02 +0200 |
commit | 9add73f641401775867824a5d799813474d34112 (patch) | |
tree | c1c07d91431fb8566e7ea3dcbf72871eb571e4b5 | |
parent | 367e762a714f2a254b3891ce8691d65a2a0e4b4e (diff) |
i965/eu: Allow 3-src float ops with doubles
v2:
- set 3src_src_type for BRW_REGISTER_TYPE_DF (Connor)
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 24 |
1 files changed, 18 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 5b142525752..e5057a05af1 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -881,8 +881,9 @@ brw_alu3(struct brw_codegen *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 (devinfo->gen == 6) { brw_inst_set_3src_dst_reg_file(devinfo, inst, @@ -937,6 +938,10 @@ brw_alu3(struct brw_codegen *p, unsigned opcode, struct brw_reg dest, brw_inst_set_3src_src_type(devinfo, inst, BRW_3SRC_TYPE_F); brw_inst_set_3src_dst_type(devinfo, inst, BRW_3SRC_TYPE_F); break; + case BRW_REGISTER_TYPE_DF: + brw_inst_set_3src_src_type(devinfo, inst, BRW_3SRC_TYPE_DF); + brw_inst_set_3src_dst_type(devinfo, inst, BRW_3SRC_TYPE_DF); + break; case BRW_REGISTER_TYPE_D: brw_inst_set_3src_src_type(devinfo, inst, BRW_3SRC_TYPE_D); brw_inst_set_3src_dst_type(devinfo, inst, BRW_3SRC_TYPE_D); @@ -991,10 +996,17 @@ brw_inst *brw_##OP(struct brw_codegen *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); \ } |