projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
880e04b
)
mesa: added UNCLAMPED_FLOAT_TO_SHORT macro
author
Brian Paul
<brianp@vmware.com>
Mon, 10 May 2010 01:25:52 +0000
(19:25 -0600)
committer
Brian Paul
<brianp@vmware.com>
Mon, 10 May 2010 03:19:42 +0000
(21:19 -0600)
src/mesa/main/macros.h
patch
|
blob
|
history
diff --git
a/src/mesa/main/macros.h
b/src/mesa/main/macros.h
index a8624574de4e031a26f9f409cd1bd7c5ec1fb348..40e17e53d6ce1f2bf383f39836609d2eb47e5ec1 100644
(file)
--- a/
src/mesa/main/macros.h
+++ b/
src/mesa/main/macros.h
@@
-127,6
+127,9
@@
extern GLfloat _mesa_ubyte_to_float_color_tab[256];
#define CLAMPED_FLOAT_TO_USHORT(us, f) \
us = ( (GLushort) IROUND( (f) * 65535.0F) )
+#define UNCLAMPED_FLOAT_TO_SHORT(s, f) \
+ s = ( (GLshort) IROUND( CLAMP((f), -1.0F, 1.0F) * 32767.0F) )
+
/*@}*/