[Mesa-dev] [PATCH 5/7] i965/vs: Add support for bit-shift operations.
Eric Anholt
eric at anholt.net
Tue Sep 27 15:08:39 PDT 2011
---
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 8 +++++++-
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 a32451f..af6a00c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1236,8 +1236,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:
--
1.7.5.4
More information about the mesa-dev
mailing list