From d925c9173009e9e5d48df30b30aaef22753183aa Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 1 Jul 2010 10:37:11 -0700 Subject: glsl2: Add ir_unop_fract as an expression type. Most backends will prefer seeing this to seeing (a - floor(a)), so represent it explicitly. --- src/mesa/shader/ir_to_mesa.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp index b270e2da413..2f2096ef97b 100644 --- a/src/mesa/shader/ir_to_mesa.cpp +++ b/src/mesa/shader/ir_to_mesa.cpp @@ -782,6 +782,10 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_unop_floor: ir_to_mesa_emit_op1(ir, OPCODE_FLR, result_dst, op[0]); break; + case ir_unop_fract: + ir_to_mesa_emit_op1(ir, OPCODE_FRC, result_dst, op[0]); + break; + case ir_binop_min: ir_to_mesa_emit_op2(ir, OPCODE_MIN, result_dst, op[0], op[1]); break; -- cgit v1.2.3