From: Matt Turner Date: Fri, 9 Nov 2018 06:05:56 +0000 (-0800) Subject: glsl: Add "built-in" functions to do ffract(fp64) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e213f3871fb1e9839715e517d5a003d4982690c6;p=mesa.git glsl: Add "built-in" functions to do ffract(fp64) Reviewed-by: Elie Tournier --- 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))); +}