aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2018-11-08 22:05:56 -0800
committerMatt Turner <[email protected]>2019-01-09 16:42:40 -0800
commite213f3871fb1e9839715e517d5a003d4982690c6 (patch)
tree852e8d0125d88f51a4d48902be596304f6e1391b /src
parent5c9a659f50d40bc7de291ed38cb1d6c76c15e731 (diff)
glsl: Add "built-in" functions to do ffract(fp64)
Reviewed-by: Elie Tournier <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/float64.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/float64.glsl b/src/compiler/glsl/float64.glsl
index c54835fbf78..7d12da50ac0 100644
--- a/src/compiler/glsl/float64.glsl
+++ b/src/compiler/glsl/float64.glsl
@@ -1458,3 +1458,9 @@ __fmax64(uint64_t a, uint64_t b)
if (__flt64_nonnan(a, b)) return b;
return a;
}
+
+uint64_t
+__ffract64(uint64_t a)
+{
+ return __fadd64(a, __fneg64(__ffloor64(a)));
+}