zink: handle signed and unsigned min/max ops in ntv
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 8 Jun 2020 17:59:02 +0000 (13:59 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 26 Jun 2020 14:07:35 +0000 (14:07 +0000)
fixes a number of piglit amd_shader_trinary_minmax tests

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5562>

src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

index dfe8a6e0d4eacf3d4d0b04eb8c498d7abf892a05..2460b479db1093ae3157da5db07561ed7911393a 100644 (file)
@@ -1317,6 +1317,10 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
 
    BUILTIN_BINOP(nir_op_fmin, GLSLstd450FMin)
    BUILTIN_BINOP(nir_op_fmax, GLSLstd450FMax)
+   BUILTIN_BINOP(nir_op_imin, GLSLstd450SMin)
+   BUILTIN_BINOP(nir_op_imax, GLSLstd450SMax)
+   BUILTIN_BINOP(nir_op_umin, GLSLstd450UMin)
+   BUILTIN_BINOP(nir_op_umax, GLSLstd450UMax)
 #undef BUILTIN_BINOP
 
    case nir_op_fdot2: