From e213f3871fb1e9839715e517d5a003d4982690c6 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 8 Nov 2018 22:05:56 -0800 Subject: [PATCH] glsl: Add "built-in" functions to do ffract(fp64) Reviewed-by: Elie Tournier --- src/compiler/glsl/float64.glsl | 6 ++++++ 1 file changed, 6 insertions(+) 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))); +} -- 2.30.2