From 7f95564a22d11ee3f54915ee02f9fa1f78c6adcf Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 26 Apr 2018 21:06:08 +0200 Subject: nir: rename f2f16_undef to f2f16 we need rounding modes on other conversions involving floats and it is easier to rename f2f16_undef than renaming all the other ones. v2: rebased on master Reviewed-by: Jason Ekstrand Acked-by: Rob Clark Signed-off-by: Karol Herbst --- src/compiler/nir/nir_opcodes_c.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler/nir/nir_opcodes_c.py') diff --git a/src/compiler/nir/nir_opcodes_c.py b/src/compiler/nir/nir_opcodes_c.py index 4603cd3d74f..8bfcda6d719 100644 --- a/src/compiler/nir/nir_opcodes_c.py +++ b/src/compiler/nir/nir_opcodes_c.py @@ -73,10 +73,10 @@ nir_type_conversion_op(nir_alu_type src, nir_alu_type dst, nir_rounding_mode rnd 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"); -- cgit v1.2.3