summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorKarl Schultz <kschultz@freedesktop.org>2005-07-01 15:58:02 +0000
committerKarl Schultz <kschultz@freedesktop.org>2005-07-01 15:58:02 +0000
commit7fe8696d017faaebce8d4238b447adabd00a9f4b (patch)
treef0d1b3f06842e13d0f37ec4720ee61f3156818be /src/mesa/tnl
parent9b5678198604a3f959af990f5a4dd39d799ef667 (diff)
Use frexp on Windows; frexpf is not available.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c
index 96311ff17b..508233cf31 100644
--- a/src/mesa/tnl/t_vb_arbprogram.c
+++ b/src/mesa/tnl/t_vb_arbprogram.c
@@ -345,7 +345,11 @@ static void do_LOG( struct arb_vp_machine *m, union instruction op )
const GLfloat *arg0 = m->File[op.alu.file0][op.alu.idx0];
GLfloat tmp = FABSF(arg0[0]);
int exponent;
+#ifdef _WIN32
+ GLfloat mantissa = (GLfloat) frexp((double)tmp, &exponent);
+#else
GLfloat mantissa = frexpf(tmp, &exponent);
+#endif
result[0] = (GLfloat) (exponent - 1);
result[1] = 2.0 * mantissa; /* map [.5, 1) -> [1, 2) */