From 423a75c5d607a33cb5fe76a0a9c903cccc645fa7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 6 May 2010 15:52:05 -0700 Subject: ir_to_mesa: Add ir_unop_f2i -> OPCODE_TRUNC. --- ir_to_mesa.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ir_to_mesa.cpp') 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; } -- cgit v1.2.3