diff options
author | Jason Ekstrand <[email protected]> | 2014-08-01 16:41:16 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2014-08-05 10:56:16 -0700 |
commit | 452d64986bd510753d13b56b33951f1b4348e3a9 (patch) | |
tree | 52a573b8b2990899baf15a3c5f874bf72a38ada6 /src/mesa/main | |
parent | 850fb0d1dca616179d3239a7b7bd94fe1979604c (diff) |
mesa/imports: Add a _mesa_half_is_negative helper function
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/imports.h | 5 |
1 files changed, 5 insertions, 0 deletions
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, |