summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-27 14:32:42 -0700
committerEric Anholt <[email protected]>2011-09-28 12:09:09 -0700
commit7de6e749df90a214d1547956dd66cfec6edcb446 (patch)
tree535cb21b7e08ea17f31abfb156c970f3e1fe0658 /src/mesa
parent344f94bb006188931b09939aafc7cc96609c4f5a (diff)
i965/fs: Add support for bit-shift operations.
Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index e4746db6018..3af57807eff 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -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;
}
}