result = LLVMBuildExtractElement(ctx->ac.builder, result, ctx->ac.i32_0, "");
break;
case nir_op_f2f16_rtne:
- case nir_op_f2f16_undef:
+ case nir_op_f2f16:
case nir_op_f2f32:
case nir_op_f2f64:
src[0] = ac_to_float(&ctx->ac, src[0]);
bit_sizes = [8, 16, 32, 64]
for bit_size in bit_sizes:
if bit_size == 16 and dst_t == tfloat and src_t == tfloat:
- rnd_modes = ['rtne', 'rtz', 'undef']
+ rnd_modes = ['_rtne', '_rtz', '']
for rnd_mode in rnd_modes:
- unop_convert("{0}2{1}{2}_{3}".format(src_t[0], dst_t[0],
+ unop_convert("{0}2{1}{2}{3}".format(src_t[0], dst_t[0],
bit_size, rnd_mode),
dst_t + str(bit_size), src_t, "src0")
else:
case ${dst_bits}:
% if src_t == 'float' and dst_t == 'float' and dst_bits == 16:
switch(rnd) {
-% for rnd_t in ['rtne', 'rtz', 'undef']:
- case nir_rounding_mode_${rnd_t}:
- return ${'nir_op_{0}2{1}{2}_{3}'.format(src_t[0], dst_t[0],
- dst_bits, rnd_t)};
+% for rnd_t in [('rtne', '_rtne'), ('rtz', '_rtz'), ('undef', '')]:
+ case nir_rounding_mode_${rnd_t[0]}:
+ return ${'nir_op_{0}2{1}{2}{3}'.format(src_t[0], dst_t[0],
+ dst_bits, rnd_t[1])};
% endfor
default:
unreachable("Invalid 16-bit nir rounding mode");
case nir_op_f2f32:
case nir_op_f2f16_rtne:
case nir_op_f2f16_rtz:
- case nir_op_f2f16_undef:
+ case nir_op_f2f16:
case nir_op_f2i32:
case nir_op_f2i16:
case nir_op_f2i8:
case nir_op_f2f16_rtne:
case nir_op_f2f16_rtz:
- case nir_op_f2f16_undef:
+ case nir_op_f2f16:
/* TODO how to handle rounding mode? */
case nir_op_i2f16:
case nir_op_u2f16:
case nir_op_f2f32:
case nir_op_f2f16_rtne:
case nir_op_f2f16_rtz:
- case nir_op_f2f16_undef:
+ case nir_op_f2f16:
case nir_op_f2i32:
case nir_op_f2i16:
case nir_op_f2i8:
* BRW_OPCODE_F32TO16 when/if we work for HF support on gen7.
*/
- case nir_op_f2f16_undef:
+ case nir_op_f2f16:
inst = bld.MOV(result, op[0]);
inst->saturate = instr->dest.saturate;
break;