nir: fix ir_binop_gequal glsl_to_nir conversion
authorErico Nunes <nunes.erico@gmail.com>
Sat, 14 Apr 2018 19:14:41 +0000 (21:14 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 16 Apr 2018 14:59:25 +0000 (07:59 -0700)
ir_binop_gequal needs to be converted to nir_op_sge when native integers
are not supported in the driver.
Otherwise it becomes no different than ir_binop_less after the
conversion.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/glsl/glsl_to_nir.cpp

index 17d58acc4c221e94a3b54b0457559ea721006056..8e5e9c34912294085a4d9e6ff5b094027884880c 100644 (file)
@@ -1832,7 +1832,7 @@ nir_visitor::visit(ir_expression *ir)
          else
             result = nir_uge(&b, srcs[0], srcs[1]);
       } else {
-         result = nir_slt(&b, srcs[0], srcs[1]);
+         result = nir_sge(&b, srcs[0], srcs[1]);
       }
       break;
    case ir_binop_equal: