i965/nir/vec4: Implement logical operators
authorAntia Puentes <apuentes@igalia.com>
Wed, 17 Jun 2015 07:07:20 +0000 (09:07 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 16:40:49 +0000 (09:40 -0700)
Adds NIR ALU operations:
   * nir_op_inot
   * nir_op_ixor
   * nir_op_ior
   * nir_op_iand

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp

index 3ee7ac29333b4e54dabc0481338f534cf9655d20..549ed1ba5dc2d123023fdb961ebdba01a7136a88 100644 (file)
@@ -989,6 +989,22 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
       break;
    }
 
+   case nir_op_inot:
+      emit(NOT(dst, op[0]));
+      break;
+
+   case nir_op_ixor:
+      emit(XOR(dst, op[0], op[1]));
+      break;
+
+   case nir_op_ior:
+      emit(OR(dst, op[0], op[1]));
+      break;
+
+   case nir_op_iand:
+      emit(AND(dst, op[0], op[1]));
+      break;
+
    default:
       unreachable("Unimplemented ALU operation");
    }