i965: Only change type of 0.0f to VF if destination stride == 1
authorMatt Turner <mattst88@gmail.com>
Tue, 1 Aug 2017 17:12:56 +0000 (10:12 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 21 Aug 2017 21:05:23 +0000 (14:05 -0700)
The destination stride must be equivalent to a dword if VF is used.

Also, since the only compaction table entires with "i:vf" have the
destination as "r:f" specifically check that the destination is of type
float.

Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
src/intel/compiler/brw_eu_compact.c

index bf57ddf85c22e45fb6361e32ea3c62b15325aa09..79103d78837bb57e64f5de17bd9b3abfb9500b35 100644 (file)
@@ -1014,7 +1014,8 @@ precompact(const struct gen_device_info *devinfo, brw_inst inst)
     */
    if (brw_inst_imm_ud(devinfo, &inst) == 0x0 &&
        brw_inst_src0_reg_type(devinfo, &inst) == BRW_HW_REG_TYPE_F &&
-       brw_inst_dst_reg_type(devinfo, &inst) != GEN7_HW_REG_NON_IMM_TYPE_DF) {
+       brw_inst_dst_reg_type(devinfo, &inst) == BRW_HW_REG_TYPE_F &&
+       brw_inst_dst_hstride(devinfo, &inst) == BRW_HORIZONTAL_STRIDE_1) {
       brw_inst_set_src0_reg_type(devinfo, &inst, BRW_HW_REG_IMM_TYPE_VF);
    }