From: Elie Tournier <tournier.e...@gmail.com>

Signed-off-by: Elie Tournier <elie.tourn...@collabora.com>
---
 src/compiler/glsl/ir_optimization.h | 4 +++-
 src/compiler/glsl/lower_64bit.cpp   | 7 +++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ir_optimization.h 
b/src/compiler/glsl/ir_optimization.h
index 17db074..b5f8c45 100644
--- a/src/compiler/glsl/ir_optimization.h
+++ b/src/compiler/glsl/ir_optimization.h
@@ -63,8 +63,10 @@
 #define ABS64                     (1U << 4)
 #define NEG64                     (1U << 5)
 #define EQ64                      (1U << 6)
+#define LT64                      (1U << 7)
+
+#define LOWER_ALL_DOUBLE_OPS (ABS64 | NEG64 | SIGN64 | EQ64 | LT64)
 
-#define LOWER_ALL_DOUBLE_OPS (ABS64 | NEG64 | SIGN64 | EQ64)
 /**
  * \see class lower_packing_builtins_visitor
  */
diff --git a/src/compiler/glsl/lower_64bit.cpp 
b/src/compiler/glsl/lower_64bit.cpp
index d5e0f32..24cc3cd 100644
--- a/src/compiler/glsl/lower_64bit.cpp
+++ b/src/compiler/glsl/lower_64bit.cpp
@@ -457,6 +457,13 @@ lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue)
       }
       break;
 
+   case ir_binop_less:
+      if (lowering(LT64)) {
+         if (ir->operands[0]->type->base_type == GLSL_TYPE_DOUBLE)
+            *rvalue = handle_op(ir, "__builtin_flt64", generate_ir::flt64);
+      }
+      break;
+
    case ir_binop_mod:
       if (lowering(MOD64)) {
          if (ir->type->base_type == GLSL_TYPE_UINT64) {
-- 
2.9.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to