From cbc966b57bdb61f5bc158352a9c8dd57bf31b81e Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 18 Oct 2010 17:28:56 -0700 Subject: i965: Add bit operation support to the fragment shader backend. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index e322ee4f11..2ed59d3f5d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -923,12 +923,21 @@ fs_visitor::visit(ir_expression *ir) break; case ir_unop_bit_not: - case ir_unop_u2f: - case ir_binop_lshift: - case ir_binop_rshift: + inst = emit(fs_inst(BRW_OPCODE_NOT, this->result, op[0])); + break; case ir_binop_bit_and: + inst = emit(fs_inst(BRW_OPCODE_AND, this->result, op[0], op[1])); + break; case ir_binop_bit_xor: + inst = emit(fs_inst(BRW_OPCODE_XOR, this->result, op[0], op[1])); + break; case ir_binop_bit_or: + inst = emit(fs_inst(BRW_OPCODE_OR, this->result, op[0], op[1])); + break; + + case ir_unop_u2f: + case ir_binop_lshift: + case ir_binop_rshift: assert(!"GLSL 1.30 features unsupported"); break; } -- cgit v1.2.3