From: Jason Ekstrand Date: Fri, 1 Aug 2014 23:41:16 +0000 (-0700) Subject: mesa/imports: Add a _mesa_half_is_negative helper function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=452d64986bd510753d13b56b33951f1b4348e3a9;p=mesa.git mesa/imports: Add a _mesa_half_is_negative helper function Signed-off-by: Jason Ekstrand Reviewed-by: Brian Paul --- diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 09e55ebf0ff..023ef2e6399 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,