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>
/* 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) \
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