summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-01-26 10:32:30 -0800
committerMatt Turner <mattst88@gmail.com>2015-01-28 19:22:25 -0800
commit907da53fe822ae1bda8b15a79c471e90fa50453d (patch)
tree9e5ac3b295bedbb94a76f83ba35045f93cbfca94
parent9f5fee880470a7e317aad35d4521cd525714455f (diff)
i965/fs: add :f :d :dadd-f-d-d
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index f5d73838763..4adc463c5be 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -627,6 +627,21 @@ fs_visitor::visit(ir_expression *ir)
/* Deal with the real oddball stuff first */
switch (ir->operation) {
+ case ir_unop_i2f:
+ case ir_unop_u2f: {
+ ir_expression *expr = ir->operands[0]->as_expression();
+ if (expr && expr->operation == ir_binop_add) {
+ expr->operands[0]->accept(this);
+ op[0] = this->result;
+ expr->operands[1]->accept(this);
+ op[1] = this->result;
+
+ this->result = vgrf(glsl_type::float_type);
+ emit(ADD(this->result, op[0], op[1]));
+ return;
+ }
+ break;
+ }
case ir_binop_add:
if (brw->gen <= 5 && try_emit_line(ir))
return;