summaryrefslogtreecommitdiff
path: root/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-06 15:52:05 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:20 -0700
commit423a75c5d607a33cb5fe76a0a9c903cccc645fa7 (patch)
tree1b16568dbae8cf4946236899a6d6120df05f48fb /ir_to_mesa.cpp
parent878740bedf418e5bf42ed6d350c938d29abaaf25 (diff)
ir_to_mesa: Add ir_unop_f2i -> OPCODE_TRUNC.
Diffstat (limited to 'ir_to_mesa.cpp')
-rw-r--r--ir_to_mesa.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index b28747e6a2..77a8822934 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -365,9 +365,12 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
this->result = this->create_tree(MB_TERM_rsq_vec4, ir, op[0], op[1]);
break;
case ir_unop_i2f:
- /* Mesa IR lacks types, ints are stored as floats. */
+ /* Mesa IR lacks types, ints are stored as truncated floats. */
this->result = op[0];
break;
+ case ir_unop_f2i:
+ this->result = this->create_tree(MB_TERM_trunc_vec4, ir, op[0], NULL);
+ break;
default:
break;
}