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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user