nir/vtn: Handle LessOrGreater deprecated opcode
authorJesse Natalie <jenatali@microsoft.com>
Tue, 23 Jun 2020 12:44:39 +0000 (05:44 -0700)
committerJesse Natalie <jenatali@microsoft.com>
Mon, 17 Aug 2020 22:34:13 +0000 (15:34 -0700)
Reviewed-by Boris Brezillon <boris.brezillon@collabora.com>

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6355>

src/compiler/spirv/vtn_alu.c

index 794f82eac449497a3c79c301a6915e22e63bc6af..41be1a18dc86567c919518caa6598e21b11f170d 100644 (file)
@@ -281,6 +281,7 @@ vtn_nir_alu_op_for_spirv_opcode(struct vtn_builder *b,
    case SpvOpFOrdEqual:                            return nir_op_feq;
    case SpvOpFUnordEqual:                          return nir_op_feq;
    case SpvOpINotEqual:                            return nir_op_ine;
+   case SpvOpLessOrGreater:                        /* Deprecated, use OrdNotEqual */
    case SpvOpFOrdNotEqual:                         return nir_op_fne;
    case SpvOpFUnordNotEqual:                       return nir_op_fne;
    case SpvOpULessThan:                            return nir_op_ult;
@@ -548,6 +549,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
       break;
    }
 
+   case SpvOpLessOrGreater:
    case SpvOpFOrdNotEqual: {
       /* For all the SpvOpFOrd* comparisons apart from NotEqual, the value
        * from the ALU will probably already be false if the operands are not