projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
344f94b
)
i965/fs: Add support for bit-shift operations.
author
Eric Anholt
<eric@anholt.net>
Tue, 27 Sep 2011 21:32:42 +0000
(14:32 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 28 Sep 2011 19:09:09 +0000
(12:09 -0700)
Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index e4746db60189933dca0a9a961a9826a0d5b87ad7..3af57807eff545100e75d607056a1cf0968e8869 100644
(file)
--- 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;
}
}