summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2018-04-26 21:06:08 +0200
committerKarol Herbst <[email protected]>2018-07-24 20:40:05 +0200
commit7f95564a22d11ee3f54915ee02f9fa1f78c6adcf (patch)
tree81c6b13651bd7f88acec7b1a7e470491a984da72 /src/compiler/nir
parent2083cfb6eba9a9e7441c44fa0c8402dbc216eb3a (diff)
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 <[email protected]> Acked-by: Rob Clark <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_opcodes.py4
-rw-r--r--src/compiler/nir/nir_opcodes_c.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index b03c5da2eae..ed8e0ae9f39 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -181,9 +181,9 @@ for src_t in [tint, tuint, tfloat]:
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:
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");