projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
glsl: Add "built-in" function for 64-bit integer sign()
[mesa.git]
/
src
/
compiler
/
glsl
/
int64.glsl
diff --git
a/src/compiler/glsl/int64.glsl
b/src/compiler/glsl/int64.glsl
index f5fb01013c76512c426e47bd4f31b547239df0f1..a2bec011e3e0771fd08afe11dc4a7999cf964342 100644
(file)
--- 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;
+}