summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-06-09 18:52:42 +0000
committerKeith Whitwell <[email protected]>2005-06-09 18:52:42 +0000
commit2c6e8e90ec848de0693919bf6c584b1111d6281f (patch)
tree449208e89a0dbbbef246a16ff6e243c6ddb4a944 /src/mesa/tnl
parent81032030ff42dd78133d85f7cabab5fb4c9aaf1e (diff)
Fix typo in RoughApproxPow2
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_arbprogram.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/tnl/t_vb_arbprogram.c b/src/mesa/tnl/t_vb_arbprogram.c
index 4789b790175..c569d93478f 100644
--- a/src/mesa/tnl/t_vb_arbprogram.c
+++ b/src/mesa/tnl/t_vb_arbprogram.c
@@ -99,7 +99,7 @@ static GLfloat RoughApproxPow2(GLfloat t)
GLfloat q;
#ifdef USE_IEEE
GLint ii = (GLint) t;
- ii = (ii < 23) + 0x3f800000;
+ ii = (ii << 23) + 0x3f800000;
SET_FLOAT_BITS(q, ii);
q = *((GLfloat *) (void *)&ii);
#else
@@ -110,7 +110,11 @@ static GLfloat RoughApproxPow2(GLfloat t)
static GLfloat RoughApproxPower(GLfloat x, GLfloat y)
{
+#if 0
+ return RoughApproxPow2(y * RoughApproxLog2(x));
+#else
return (GLfloat) _mesa_pow(x, y);
+#endif
}