diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index 7d07875e92b..2012e611d42 100644 --- a/src/intel/compiler/brw_eu_validate.c +++ b/src/intel/compiler/brw_eu_validate.c @@ -2195,24 +2195,21 @@ instruction_restrictions(const struct brw_isa_info *isa, if (brw_eu_inst_dpas_3src_exec_type(devinfo, inst->raw) == BRW_ALIGN1_3SRC_EXEC_TYPE_FLOAT) { + ERROR_IF(src1_type != BRW_TYPE_HF && + src1_type != BRW_TYPE_BF, + "DPAS src1 type must be HF or BF."); + ERROR_IF(src2_type != BRW_TYPE_HF && + src2_type != BRW_TYPE_BF, + "DPAS src2 type must be HF or BF."); + ERROR_IF(src1_type != src2_type, + "DPAS src1 and src2 with types must match when using float types."); + if (devinfo->ver < 20) { - ERROR_IF(src1_type != BRW_TYPE_HF, - "DPAS src1 type must be HF in Gfx12."); - ERROR_IF(src2_type != BRW_TYPE_HF, - "DPAS src2 type must be HF in Gfx12."); ERROR_IF(dst_type != BRW_TYPE_F, "DPAS destination type must be F in Gfx12."); ERROR_IF(src0_type != BRW_TYPE_F, "DPAS src0 type must be F in Gfx12."); } else { - ERROR_IF(src1_type != BRW_TYPE_HF && - src1_type != BRW_TYPE_BF, - "DPAS src1 type must be HF or BF in Gfx20+."); - ERROR_IF(src2_type != BRW_TYPE_HF && - src2_type != BRW_TYPE_BF, - "DPAS src2 type must be HF or BF in Gfx20+."); - ERROR_IF(src1_type != src2_type, - "DPAS src1 and src2 with types must match when using float types."); ERROR_IF(dst_type != BRW_TYPE_F && dst_type != src1_type, "DPAS destination type must be F or match Src1/Src2 in Gfx20+."); diff --git a/src/intel/compiler/test_eu_validate.cpp b/src/intel/compiler/test_eu_validate.cpp index a946b84a589..0c8724fcbe6 100644 --- a/src/intel/compiler/test_eu_validate.cpp +++ b/src/intel/compiler/test_eu_validate.cpp @@ -3206,7 +3206,7 @@ TEST_P(validation_test, dpas_types) TV( F, F, F, HF, false), TV( F, F, HF, F, false), - TV( F, F, BF, BF, devinfo.ver >= 20), + TV( F, F, BF, BF, true), TV(BF, BF, BF, BF, devinfo.ver >= 20), TV(BF, F, BF, BF, devinfo.ver >= 20), TV( F, BF, BF, BF, devinfo.ver >= 20),