summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/int64.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl/int64.glsl')
-rw-r--r--src/compiler/glsl/int64.glsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/glsl/int64.glsl b/src/compiler/glsl/int64.glsl
index f5fb01013c7..a2bec011e3e 100644
--- a/src/compiler/glsl/int64.glsl
+++ b/src/compiler/glsl/int64.glsl
@@ -17,3 +17,14 @@ umul64(uvec2 a, uvec2 b)
return result;
}
+
+ivec2
+sign64(ivec2 a)
+{
+ ivec2 result;
+
+ result.y = a.y >> 31;
+ result.x = result.y | int((a.x | a.y) != 0);
+
+ return result;
+}