For the W or UW (signed or unsigned word) source types, the 16-bit value must be replicated in both the low and high words of the 32-bit immediate value. v2: Fix replication in other places as well V3: fix a few nits (Matt Turner) Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>tags/19.2-branchpoint
| mul->src[1].type = BRW_REGISTER_TYPE_UW; | mul->src[1].type = BRW_REGISTER_TYPE_UW; | ||||
| mul->src[1].stride *= 2; | mul->src[1].stride *= 2; | ||||
| if (mul->src[1].file == IMM) { | |||||
| mul->src[1] = brw_imm_uw(mul->src[1].ud); | |||||
| } | |||||
| } else if (devinfo->gen == 7 && !devinfo->is_haswell && | } else if (devinfo->gen == 7 && !devinfo->is_haswell && | ||||
| inst->group > 0) { | inst->group > 0) { | ||||
| /* Among other things the quarter control bits influence which | /* Among other things the quarter control bits influence which |
| brw_MOV(p, suboffset(stride(dst, 2, 2, 1), 3), | brw_MOV(p, suboffset(stride(dst, 2, 2, 1), 3), | ||||
| brw_imm_ud(src0.ud * src1.ud)); | brw_imm_ud(src0.ud * src1.ud)); | ||||
| } else { | } else { | ||||
| if (src1.file == BRW_IMMEDIATE_VALUE) { | |||||
| src1 = brw_imm_uw(src1.ud); | |||||
| } | |||||
| brw_MUL(p, suboffset(stride(dst, 2, 2, 1), 3), stride(src0, 8, 2, 4), | brw_MUL(p, suboffset(stride(dst, 2, 2, 1), 3), stride(src0, 8, 2, 4), | ||||
| retype(src1, BRW_REGISTER_TYPE_UW)); | retype(src1, BRW_REGISTER_TYPE_UW)); | ||||
| } | } |