i965/fs: Add support for translating ir_triop_fma into MAD.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_fs_visitor.cpp
index 6186a9c0c5039f40d781c62df607b5df3eb6e627..b0494364a1ddd93cbf384f0ebc51fec52898680d 100644 (file)
@@ -718,6 +718,13 @@ fs_visitor::visit(ir_expression *ir)
       break;
    }
 
+   case ir_triop_fma:
+      /* Note that the instruction's argument order is reversed from GLSL
+       * and the IR.
+       */
+      emit(MAD(this->result, op[2], op[1], op[0]));
+      break;
+
    case ir_triop_lrp:
       emit_lrp(this->result, op[0], op[1], op[2]);
       break;