projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92ac216
)
glsl: Add "built-in" functions to do fmin/fmax(fp64)
author
Matt Turner
<mattst88@gmail.com>
Fri, 9 Nov 2018 05:34:05 +0000
(21:34 -0800)
committer
Matt Turner
<mattst88@gmail.com>
Thu, 10 Jan 2019 00:42:40 +0000
(16:42 -0800)
Reviewed-by: Elie Tournier <tournier.elie@gmail.com>
src/compiler/glsl/float64.glsl
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/float64.glsl
b/src/compiler/glsl/float64.glsl
index 1a434b1fd596262d8bf19ef7476246b149ee2ba1..88ce0a749579148a504a2cc43695d95f182928e9 100644
(file)
--- a/
src/compiler/glsl/float64.glsl
+++ b/
src/compiler/glsl/float64.glsl
@@
-1425,3
+1425,23
@@
__fround64(uint64_t __a)
a.y = aHi;
return packUint2x32(a);
}
+
+uint64_t
+__fmin64(uint64_t a, uint64_t b)
+{
+ if (__is_nan(a)) return b;
+ if (__is_nan(b)) return a;
+
+ if (__flt64_nonnan(a, b)) return a;
+ return b;
+}
+
+uint64_t
+__fmax64(uint64_t a, uint64_t b)
+{
+ if (__is_nan(a)) return b;
+ if (__is_nan(b)) return a;
+
+ if (__flt64_nonnan(a, b)) return b;
+ return a;
+}