intel/eu/validate: Validate integer multiplication source size restrictions

v2: Expect correct result on BDW in test_eu.

v3: Fix SNB type-size check. Noticed by Marcin.

Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19602>
This commit is contained in:
Ian Romanick
2020-03-11 15:37:14 -07:00
committed by Marge Bot
parent d668512f88
commit ee2a299661
2 changed files with 158 additions and 1 deletions
+8 -1
View File
@@ -2598,8 +2598,15 @@ TEST_P(validation_test, qword_low_power_no_64bit_arf)
brw_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
brw_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
/* Note: The Broadwell PRM also lists the restriction that destination
* of DWord multiplication cannot be the accumulator.
*/
if (devinfo.platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(&devinfo)) {
intel_device_info_is_9lp(&devinfo) ||
(devinfo.ver == 8 &&
inst[i].opcode == BRW_OPCODE_MUL &&
brw_inst_dst_reg_file(&devinfo, last_inst) == BRW_ARCHITECTURE_REGISTER_FILE &&
brw_inst_dst_da_reg_nr(&devinfo, last_inst) != BRW_ARF_NULL)) {
EXPECT_EQ(inst[i].expected_result, validate(p));
} else {
EXPECT_TRUE(validate(p));