From: José Fonseca Date: Tue, 24 Jun 2008 05:22:09 +0000 (+0900) Subject: gallium: Avoid double arithmetic. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9dfa6063be5ea506cc5a43d352fa2f7dcfa68dff;p=mesa.git gallium: Avoid double arithmetic. --- diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index 17e37d17458..4c8179ffa87 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -121,7 +121,7 @@ emit_##NAME(const float *attrib, void *ptr) \ #define FROM_16_SNORM(i) ((float) ((short *) ptr)[i] / 32767.0f) #define FROM_32_SNORM(i) ((float) ((int *) ptr)[i] / 2147483647.0f) -#define FROM_32_FIXED(i) (((int *) ptr)[i] / 65536.0) +#define FROM_32_FIXED(i) (((int *) ptr)[i] / 65536.0f) #define TO_64_FLOAT(x) ((double) x) #define TO_32_FLOAT(x) (x)