summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2018-10-30 21:48:01 -0700
committerMatt Turner <[email protected]>2019-01-09 16:42:40 -0800
commit92ac2169fb015b7bb0b8e5fc2c99131e3c652cbb (patch)
treeb8f47c2c03ade96dc5c43c0009f1581a285c7274 /src/compiler
parent3db81b5d9f7f6e475462ca4f9306678bcc9d495c (diff)
glsl: Add "built-in" functions to do ffma(fp64)
Definitely not actually a fused-multiply add. Reviewed-by: Elie Tournier <[email protected]>
Diffstat (limited to 'src/compiler')
-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 e09655e5055..1a434b1fd59 100644
--- a/src/compiler/glsl/float64.glsl
+++ b/src/compiler/glsl/float64.glsl
@@ -798,6 +798,12 @@ __fmul64(uint64_t a, uint64_t b)
return __roundAndPackFloat64(zSign, zExp, zFrac0, zFrac1, zFrac2);
}
+uint64_t
+__ffma64(uint64_t a, uint64_t b, uint64_t c)
+{
+ return __fadd64(__fmul64(a, b), c);
+}
+
/* Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the
* number of bits given in `count'. Any bits shifted off are lost. The value
* of `count' can be arbitrarily large; in particular, if `count' is greater