summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-09-10 08:16:24 -0600
committerEmil Velikov <emil.l.velikov@gmail.com>2014-11-06 14:55:49 +0000
commitd5700dc276008decb2a5d63bfa38522c5f4ad3f3 (patch)
treee84e06ce4b589ad51ce49b414a4e325672b84fa1
parentd5ada3364f4ea2722237eb79252e3d493d673442 (diff)
mesa: fix UNCLAMPED_FLOAT_TO_UBYTE() macro for MSVC
MSVC replaces the "F" in "255.0F" with the macro argument which leads to an error. s/F/FLT/ to avoid that. It turns out we weren't using this macro at all on MSVC until the recent "mesa: Drop USE_IEEE define." change. Reviewed-by: Roland Scheidegger <sroland@vmware.com> (cherry picked from commit 9608193cbc6ea14e49adcd0193f9e7c6058d5a2f) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85918 Nominated-by: Roland Scheidegger <sroland@vmware.com>
-rw-r--r--src/mesa/main/macros.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 2d54ca5aec1..4e6f8c0e90f 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -144,10 +144,10 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
/* This function/macro is sensitive to precision. Test very carefully
* if you change it!
*/
-#define UNCLAMPED_FLOAT_TO_UBYTE(UB, F) \
+#define UNCLAMPED_FLOAT_TO_UBYTE(UB, FLT) \
do { \
fi_type __tmp; \
- __tmp.f = (F); \
+ __tmp.f = (FLT); \
if (__tmp.i < 0) \
UB = (GLubyte) 0; \
else if (__tmp.i >= IEEE_ONE) \
@@ -157,10 +157,10 @@ extern GLfloat _mesa_ubyte_to_float_color_tab[256];
UB = (GLubyte) __tmp.i; \
} \
} while (0)
-#define CLAMPED_FLOAT_TO_UBYTE(UB, F) \
+#define CLAMPED_FLOAT_TO_UBYTE(UB, FLT) \
do { \
fi_type __tmp; \
- __tmp.f = (F) * (255.0F/256.0F) + 32768.0F; \
+ __tmp.f = (FLT) * (255.0F/256.0F) + 32768.0F; \
UB = (GLubyte) __tmp.i; \
} while (0)
#else