mesa/imports: Add a _mesa_half_is_negative helper function
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 1 Aug 2014 23:41:16 +0000 (16:41 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 5 Aug 2014 17:56:16 +0000 (10:56 -0700)
Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/imports.h

index 09e55ebf0ff7eeb3a4aee5c0dc28df9caa4bf911..023ef2e6399a779a084f5b1ba8d5c9bad74f24d5 100644 (file)
@@ -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,