zink: use OpFUnordNotEqual for nir_op_fne
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 25 Jun 2020 13:25:45 +0000 (09:25 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 26 Jun 2020 14:07:35 +0000 (14:07 +0000)
we want to detect NaNs here, and OpFUnordNotEqual is the variant which does this

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 00410a75b79e36ec1ca19484909596d87c50fb75..76fd90ed24b5926e89274109a12d0e63e988bec7 100644 (file)
@@ -1291,7 +1291,7 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
    BINOP(nir_op_flt, SpvOpFOrdLessThan)
    BINOP(nir_op_fge, SpvOpFOrdGreaterThanEqual)
    BINOP(nir_op_feq, SpvOpFOrdEqual)
-   BINOP(nir_op_fne, SpvOpFOrdNotEqual)
+   BINOP(nir_op_fne, SpvOpFUnordNotEqual)
    BINOP(nir_op_ishl, SpvOpShiftLeftLogical)
    BINOP(nir_op_ishr, SpvOpShiftRightArithmetic)
    BINOP(nir_op_ushr, SpvOpShiftRightLogical)