mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
mesa: added UNCLAMPED_FLOAT_TO_SHORT macro
This commit is contained in:
parent
880e04ba74
commit
6274bb865f
1 changed files with 3 additions and 0 deletions
|
|
@ -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) )
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue