projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b56781
)
Use frexp on Windows; frexpf is not available.
author
Karl Schultz
<kschultz@freedesktop.org>
Fri, 1 Jul 2005 15:58:02 +0000
(15:58 +0000)
committer
Karl Schultz
<kschultz@freedesktop.org>
Fri, 1 Jul 2005 15:58:02 +0000
(15:58 +0000)
src/mesa/tnl/t_vb_arbprogram.c
patch
|
blob
|
history
diff --git
a/src/mesa/tnl/t_vb_arbprogram.c
b/src/mesa/tnl/t_vb_arbprogram.c
index 96311ff17ba356ef51f82c86e5433ddc15ecbaca..508233cf316690053d2307bff5cbb9650c7e5048 100644
(file)
--- 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) */