From 9dfa6063be5ea506cc5a43d352fa2f7dcfa68dff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 24 Jun 2008 14:22:09 +0900 Subject: [PATCH] gallium: Avoid double arithmetic. --- src/gallium/auxiliary/translate/translate_generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2