summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-06-29 16:36:42 -0700
committerEric Anholt <[email protected]>2010-06-29 17:18:28 -0700
commitba9bd708cb3480817e18cc47e57d83a4e4c305bb (patch)
treec0d31aa9c2d80bff52074af900371627e6b9c1f4 /src/mesa/shader/ir_to_mesa.cpp
parentd4f7e660dd81e05b0829c1b70663b3959fd78f47 (diff)
ir_to_mesa: Add support for dFdx, dFdy.
Diffstat (limited to 'src/mesa/shader/ir_to_mesa.cpp')
-rw-r--r--src/mesa/shader/ir_to_mesa.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index f04518175d1..152cb1d9e55 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;