Mesa (master): mesa/imports: Add a _mesa_half_is_negative helper function

Jason Ekstrand jekstrand at kemper.freedesktop.org
Tue Aug 5 18:08:22 UTC 2014


Module: Mesa
Branch: master
Commit: 452d64986bd510753d13b56b33951f1b4348e3a9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=452d64986bd510753d13b56b33951f1b4348e3a9

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Aug  1 16:41:16 2014 -0700

mesa/imports: Add a _mesa_half_is_negative helper function

Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/imports.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 09e55eb..023ef2e 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -552,6 +552,11 @@ _mesa_float_to_half(float f);
 extern float
 _mesa_half_to_float(GLhalfARB h);
 
+static inline bool
+_mesa_half_is_negative(GLhalfARB h)
+{
+   return h & 0x8000;
+}
 
 extern void *
 _mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, 




More information about the mesa-commit mailing list