diff options
author | Elie Tournier <[email protected]> | 2017-08-08 14:28:48 +0100 |
---|---|---|
committer | Matt Turner <[email protected]> | 2019-01-09 16:42:40 -0800 |
commit | 3e4d5ea7b8dda32ee6a8a2d23f6ab4f00f4334e7 (patch) | |
tree | a15738b223446c69d7fc2a25ce3188fec3d8e7c3 /src | |
parent | ec6e823a99168b7359e76f274641424f778211ef (diff) |
glsl: Add utility function to extract 64-bit sign
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/glsl/float64.glsl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/glsl/float64.glsl b/src/compiler/glsl/float64.glsl index 2cf85bbcafc..5f2804a8a34 100644 --- a/src/compiler/glsl/float64.glsl +++ b/src/compiler/glsl/float64.glsl @@ -159,3 +159,10 @@ __fne64(uint64_t a, uint64_t b) return !__feq64_nonnan(a, b); } + +/* Returns the sign bit of the double-precision floating-point value `a'.*/ +uint +__extractFloat64Sign(uint64_t a) +{ + return unpackUint2x32(a).y >> 31; +} |