[Mesa-dev] [PATCH v2 41/78] i965/nir/vec4: Implement non-vector comparison ops

Eduardo Lima Mitev elima at igalia.com
Thu Jul 23 03:17:21 PDT 2015


From: Antia Puentes <apuentes at igalia.com>

Adds NIR ALU operations:
   * nir_op_flt
   * nir_op_ilt
   * nir_op_ult
   * nir_op_fge
   * nir_op_ige
   * nir_op_uge
   * nir_op_feq
   * nir_op_ieq
   * nir_op_fne
   * nir_op_ine
---
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 2939fa1..dc8b082 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -911,6 +911,20 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
    case nir_op_fddy_fine:
       unreachable("derivatives are not valid in vertex shaders");
 
+   case nir_op_flt:
+   case nir_op_ilt:
+   case nir_op_ult:
+   case nir_op_fge:
+   case nir_op_ige:
+   case nir_op_uge:
+   case nir_op_feq:
+   case nir_op_ieq:
+   case nir_op_fne:
+   case nir_op_ine:
+      emit(CMP(dst, op[0], op[1],
+               brw_conditional_for_nir_comparison(instr->op)));
+      break;
+
    default:
       unreachable("Unimplemented ALU operation");
    }
-- 
2.1.4



More information about the mesa-dev mailing list