summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/lower_int64.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2016-10-17 13:55:54 -0700
committerIan Romanick <[email protected]>2017-01-20 15:41:23 -0800
commit50d52df278c547ffd53505a3ebf98f13cba5bd56 (patch)
treedb2258c845386c5fd3c93f549f349c7b6e8c574f /src/compiler/glsl/lower_int64.cpp
parent6b03b345eb64e15e577bc8b2cf04b314a4c70537 (diff)
glsl: Add a lowering pass for 64-bit integer sign()
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/compiler/glsl/lower_int64.cpp')
-rw-r--r--src/compiler/glsl/lower_int64.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/lower_int64.cpp b/src/compiler/glsl/lower_int64.cpp
index 5952de51c2e..a12eba85c58 100644
--- a/src/compiler/glsl/lower_int64.cpp
+++ b/src/compiler/glsl/lower_int64.cpp
@@ -361,6 +361,13 @@ lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue)
assert(ir != NULL);
switch (ir->operation) {
+ case ir_unop_sign:
+ if (lowering(SIGN64)) {
+ *rvalue = handle_op(ir, "__builtin_sign64", generate_ir::sign64);
+ this->progress = true;
+ }
+ break;
+
case ir_binop_mul:
if (lowering(MUL64)) {
*rvalue = handle_op(ir, "__builtin_umul64", generate_ir::umul64);