<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 28, 2018 at 4:14 AM, Karol Herbst <span dir="ltr"><<a href="mailto:kherbst@redhat.com" target="_blank">kherbst@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">we need rounding modes on other conversions involving floats and it is easier<br>
to rename f2f16_undef than renaming all the other ones.<br>
<br>
Signed-off-by: Karol Herbst <<a href="mailto:kherbst@redhat.com">kherbst@redhat.com</a>><br>
---<br>
src/compiler/nir/nir_opcodes.<wbr>py | 4 ++--<br>
src/compiler/nir/nir_opcodes_<wbr>c.py | 8 ++++----<br>
src/intel/compiler/brw_fs_nir.<wbr>cpp | 2 +-<br>
3 files changed, 7 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/compiler/nir/nir_<wbr>opcodes.py b/src/compiler/nir/nir_<wbr>opcodes.py<br>
index 89a6c6becc2..7070f53adef 100644<br>
--- a/src/compiler/nir/nir_<wbr>opcodes.py<br>
+++ b/src/compiler/nir/nir_<wbr>opcodes.py<br>
@@ -180,9 +180,9 @@ for src_t in [tint, tuint, tfloat]:<br>
bit_sizes = [8, 16, 32, 64]<br>
for bit_size in bit_sizes:<br>
if bit_size == 16 and dst_t == tfloat and src_t == tfloat:<br>
- rnd_modes = ['rtne', 'rtz', 'undef']<br>
+ rnd_modes = ['_rtne', '_rtz', '']<br>
for rnd_mode in rnd_modes:<br>
- unop_convert("{0}2{1}{2}_{3}".<wbr>format(src_t[0], dst_t[0],<br>
+ unop_convert("{0}2{1}{2}{3}".<wbr>format(src_t[0], dst_t[0],<br>
bit_size, rnd_mode),<br>
dst_t + str(bit_size), src_t, "src0")<br>
else:<br>
diff --git a/src/compiler/nir/nir_<wbr>opcodes_c.py b/src/compiler/nir/nir_<wbr>opcodes_c.py<br>
index 8afccca9504..3edf1d4c225 100644<br>
--- a/src/compiler/nir/nir_<wbr>opcodes_c.py<br>
+++ b/src/compiler/nir/nir_<wbr>opcodes_c.py<br>
@@ -71,10 +71,10 @@ nir_type_conversion_op(nir_<wbr>alu_type src, nir_alu_type dst, nir_rounding_mode rnd<br>
case ${dst_bits}:<br>
% if src_t == 'float' and dst_t == 'float' and dst_bits == 16:<br>
switch(rnd) {<br>
-% for rnd_t in ['rtne', 'rtz', 'undef']:<br>
- case nir_rounding_mode_${rnd_t}:<br>
- return ${'nir_op_{0}2{1}{2}_{3}'.<wbr>format(src_t[0], dst_t[0],<br>
- dst_bits, rnd_t)};<br>
+% for rnd_t in [('rtne', '_rtne'), ('rtz', '_rtz'), ('undef', '')]:<br>
+ case nir_rounding_mode_${rnd_t[0]}:<br>
+ return ${'nir_op_{0}2{1}{2}{3}'.<wbr>format(src_t[0], dst_t[0],<br>
+ dst_bits, rnd_t[1])};<br>
% endfor<br>
default:<br>
unreachable("Invalid 16-bit nir rounding mode");<br>
diff --git a/src/intel/compiler/brw_fs_<wbr>nir.cpp b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
index 9698a0111ef..681f29ea761 100644<br>
--- a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
+++ b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
@@ -753,7 +753,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)<br>
* BRW_OPCODE_F32TO16 when/if we work for HF support on gen7.<br>
*/<br>
<br>
- case nir_op_f2f16_undef:<br>
+ case nir_op_f2f16:<br>
case nir_op_i2i16:<br>
case nir_op_u2u16: {<br>
/* TODO: Fixing aligment rules for conversions from 32-bits to<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>