fs_reg zero = bld.vgrf(BRW_REGISTER_TYPE_F);
/* The destination stride must be at least as big as the source stride. */
- tmp16.type = devinfo->ver > 7
- ? BRW_REGISTER_TYPE_HF : BRW_REGISTER_TYPE_W;
- tmp16.stride = 2;
+ tmp16 = subscript(tmp16, BRW_REGISTER_TYPE_HF, 0);
/* Check for denormal */
fs_reg abs_src0 = op[0];
retype(op[0], BRW_REGISTER_TYPE_UD),
brw_imm_ud(0x80000000));
/* Do the actual F32 -> F16 -> F32 conversion */
- bld.emit(BRW_OPCODE_F32TO16, tmp16, op[0]);
- bld.emit(BRW_OPCODE_F16TO32, tmp32, tmp16);
+ bld.F32TO16(tmp16, op[0]);
+ bld.F16TO32(tmp32, tmp16);
/* Select that or zero based on normal status */
inst = bld.SEL(result, zero, tmp32);
inst->predicate = BRW_PREDICATE_NORMAL;