From ba9bd708cb3480817e18cc47e57d83a4e4c305bb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 29 Jun 2010 16:36:42 -0700 Subject: [PATCH] ir_to_mesa: Add support for dFdx, dFdy. --- src/mesa/shader/ir_to_mesa.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp index f045181..152cb1d 100644 --- a/src/mesa/shader/ir_to_mesa.cpp +++ b/src/mesa/shader/ir_to_mesa.cpp @@ -628,6 +628,14 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_unop_cos: ir_to_mesa_emit_scalar_op1(ir, OPCODE_COS, result_dst, op[0]); break; + + case ir_unop_dFdx: + ir_to_mesa_emit_op1(ir, OPCODE_DDX, result_dst, op[0]); + break; + case ir_unop_dFdy: + ir_to_mesa_emit_op1(ir, OPCODE_DDY, result_dst, op[0]); + break; + case ir_binop_add: ir_to_mesa_emit_op2(ir, OPCODE_ADD, result_dst, op[0], op[1]); break; -- 2.7.4