Mesa (master): nir/ lower_int_to_float: Handle umax and umin

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 23 15:06:17 UTC 2020


Module: Mesa
Branch: master
Commit: ce4064fe2fecd919c4adbe32320f85c2381d82e8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce4064fe2fecd919c4adbe32320f85c2381d82e8

Author: Andreas Baierl <ichgeh at imkreisrum.de>
Date:   Thu Jul 23 07:43:09 2020 +0200

nir/ lower_int_to_float: Handle umax and umin

8e1b75b3 introduced umax/umin in order to lower iand/ior for (n)eq zero.
That breaks the lower_int_to_float pass, because umax and umin weren't
handled there.

Tested with lima. The other users of nir_lower_int_to_float
(etnaviv, freedreno) should also have that issue.

Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Andreas Baierl <ichgeh at imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6043>

---

 src/compiler/nir/nir_lower_int_to_float.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compiler/nir/nir_lower_int_to_float.c b/src/compiler/nir/nir_lower_int_to_float.c
index d1e77daf1fe..e526108d904 100644
--- a/src/compiler/nir/nir_lower_int_to_float.c
+++ b/src/compiler/nir/nir_lower_int_to_float.c
@@ -86,6 +86,8 @@ lower_alu_instr(nir_builder *b, nir_alu_instr *alu)
    case nir_op_ineg: alu->op = nir_op_fneg; break;
    case nir_op_imax: alu->op = nir_op_fmax; break;
    case nir_op_imin: alu->op = nir_op_fmin; break;
+   case nir_op_umax: alu->op = nir_op_fmax; break;
+   case nir_op_umin: alu->op = nir_op_fmin; break;
 
    case nir_op_ball_iequal2:  alu->op = nir_op_ball_fequal2; break;
    case nir_op_ball_iequal3:  alu->op = nir_op_ball_fequal3; break;



More information about the mesa-commit mailing list