[Mesa-dev] [PATCH v2 07/13] mesa/imports: Add a _mesa_half_is_negative helper function

Jason Ekstrand jason at jlekstrand.net
Sat Aug 2 13:11:26 PDT 2014


Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.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, 
-- 
2.0.4



More information about the mesa-dev mailing list