summaryrefslogtreecommitdiff
path: root/lib/mesa/src/util/half_float.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-01-29 10:51:18 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-01-29 10:51:18 +0000
commit726e4bceb8bf5b8123eda80e45a9fdeb016f3790 (patch)
tree32ed745d6aeb44b4c130f647e49d6627320a3857 /lib/mesa/src/util/half_float.h
parent5c0a71df6e14d3ae04cc0faa6dad6e5d0a01d27a (diff)
Import Mesa 18.3.2
Diffstat (limited to 'lib/mesa/src/util/half_float.h')
-rw-r--r--lib/mesa/src/util/half_float.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mesa/src/util/half_float.h b/lib/mesa/src/util/half_float.h
index b3bc3f687..015574247 100644
--- a/lib/mesa/src/util/half_float.h
+++ b/lib/mesa/src/util/half_float.h
@@ -32,8 +32,13 @@
extern "C" {
#endif
+#define FP16_ONE 0x3C00
+#define FP16_ZERO 0
+
uint16_t _mesa_float_to_half(float val);
float _mesa_half_to_float(uint16_t val);
+uint8_t _mesa_half_to_unorm8(uint16_t v);
+uint16_t _mesa_uint16_div_64k_to_half(uint16_t v);
static inline bool
_mesa_half_is_negative(uint16_t h)