i965/fs: Add support for bit-shift operations.

Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt
2011-09-27 14:32:42 -07:00
parent 344f94bb00
commit 7de6e749df
+7 -1
View File
@@ -445,8 +445,14 @@ fs_visitor::visit(ir_expression *ir)
break;
case ir_binop_lshift:
inst = emit(BRW_OPCODE_SHL, this->result, op[0], op[1]);
break;
case ir_binop_rshift:
assert(!"GLSL 1.30 features unsupported");
if (ir->type->base_type == GLSL_TYPE_INT)
inst = emit(BRW_OPCODE_ASR, this->result, op[0], op[1]);
else
inst = emit(BRW_OPCODE_SHR, this->result, op[0], op[1]);
break;
}
}