aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/macros.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-30 06:43:04 +0000
committermarha <marha@users.sourceforge.net>2011-03-30 06:43:04 +0000
commit2039567395da75a3ae318fb82738cdcf2caa05a1 (patch)
tree23caaf9e0f6867d85f5cffc284d008c591ae99cb /mesalib/src/mesa/main/macros.h
parent24abc56b37a3ec32a03b7eafccd96607ae13ea89 (diff)
downloadvcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.gz
vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.bz2
vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.zip
mesa git update 30 Mar 2011
Diffstat (limited to 'mesalib/src/mesa/main/macros.h')
-rw-r--r--mesalib/src/mesa/main/macros.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/macros.h b/mesalib/src/mesa/main/macros.h
index b2ec0ba9b..86a58cc6b 100644
--- a/mesalib/src/mesa/main/macros.h
+++ b/mesalib/src/mesa/main/macros.h
@@ -58,8 +58,7 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
#define BYTE_TO_FLOAT_TEX(B) ((B) == -128 ? -1.0F : (B) * (1.0F/127.0F))
/** Convert GLfloat in [-1.0,1.0] to GLbyte in [-128,127], texture/fb data */
-#define FLOAT_TO_BYTE_TEX(X) ( (GLint) (127.0F * (X)) )
-
+#define FLOAT_TO_BYTE_TEX(X) CLAMP( (GLint) (127.0F * (X)), -128, 127 )
/** Convert GLushort in [0,65535] to GLfloat in [0.0,1.0] */
#define USHORT_TO_FLOAT(S) ((GLfloat) (S) * (1.0F / 65535.0F))