summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-27 14:48:56 -0700
committerEric Anholt <[email protected]>2011-09-28 12:09:09 -0700
commit158a5854502ce071e3f07d4ad9622b8ddb3c9859 (patch)
treeb59cb2dcb33f30e4530e20fb7a4b7acb3d06943e
parent0045a674183b7716a2b64f3f81223e5a0ca5e074 (diff)
i965/vs: Add support for bit-shift operations.
Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index e5eda221044..98ecd251ddf 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1254,8 +1254,14 @@ vec4_visitor::visit(ir_expression *ir)
break;
case ir_binop_lshift:
+ inst = emit(BRW_OPCODE_SHL, result_dst, 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, result_dst, op[0], op[1]);
+ else
+ inst = emit(BRW_OPCODE_SHR, result_dst, op[0], op[1]);
break;
case ir_quadop_vector: