summaryrefslogtreecommitdiff
path: root/ir_to_mesa.cpp
diff options
context:
space:
mode:
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;
}