diff options
author | Eric Anholt <eric@anholt.net> | 2010-07-01 10:37:11 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-07-01 11:07:22 -0700 |
commit | d925c9173009e9e5d48df30b30aaef22753183aa (patch) | |
tree | e42ee590b44d75b69fb67ee7de8b42ce05ee1c11 /src/mesa | |
parent | 5e4dd061d17563828bcce5525400a0ce363aa15d (diff) |
glsl2: Add ir_unop_fract as an expression type.
Most backends will prefer seeing this to seeing (a - floor(a)), so
represent it explicitly.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/ir_to_mesa.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp index b270e2da41..2f2096ef97 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; |